Category Archives: How to Fix

[Linux] [kernel] bug: scheduling while atomic problem analysis

The kernel module local_clients is used to listen for DHCP packages and write the host name, IP, MAC, etc to file /proc/local_clients/local_clients_info, and the Webserver parses this question. MyPhone
/TMP # cat /proc/local_clients/local_clients_info
58-7f-57-8b-bc-0d 192.168.0.100 myPhone
now we need to improve this module by adding monitoring DNS messages to determine the IP and MAC of the host connected to AP. The result is written to /proc/local_clients/local_clients_info, and the problem is resolved in user space. If an entry with an UNKNOWN hostname is found, the hostname is obtained through the user program client_mGMT via NBNS or MDNS.
/TMP # cat /proc/local_clients/local_clients_info
14-cc-20-16-fb-da 192.168.0.110 UNKNOWN
Problem: The function of resolving host name was realized, but it took more than 2 hours to run, and the serial port appeared abnormal printing as follows:
[3419.912000] BUG: scheduling while atomic:client_mgmt/1051/0x00000100
[3419.916000] Modules linked in: Umac ath_dev(P)ath_rate_atheros(P) ath_hal(P) asf(P) adf(P) athrs_gmac local_clients
[3419.928000] Cpu 0
[3419.932000]

0:00 000000000000010000000000000000 [3419.936000]
4:000041 832e4500 000000fe 23c637bb
[3419.944000]

And b9aca00129b0ea4c4ec4e0cfffffff8 [3419.948000]
12 :fffffffe 592f6656 00000004031a4
[3419.952000]

16:00 000 d5b832d0000000010000041a1a8 [3419.960000]
20 :825c3e98 000000041a1a8 00001000
[3419.964000]

00000 f800b22c8 24:00 [3419.972000]
28 :825c2000 825c3e50 825c3f10 832c42c0
[3419.976000] Hi :000fd669
[3419.980000] Lo :2c3458d0
[3419.980000] epc :832d42d8 remove_timeout_stas+0x4c/0x8c [local_clients]
[local_clients] 3419.988000] Tainted: P
[3419.992000] ra: 832 d42c0 remove_timeout_stas + 0 x34/0 x8c [local_clients]
[3420.000000] Status: 1000 ff03 KERNEL EXL IE
[3420.004000] Cause: PrId :00019374 (MIPS 24Kc)
~ #
~ # ps
PID USER VSZ STAT COMMAND
1 root 1512 S init
2 root 0 SW< [kthreadd]
3 root 0 SW< [ksoftirqd/0]
4 root 0 SW< [events/0]
5 root 0 SW< [khelper]
6 root 0 SW< [async/mgr]
7 root 0 SW< [kblockd/0]
8 root 0 SW [pdflush]
9 root 0 SW [pdflush]
10 root 0 SW< [kswapd0]
13 root 0 SW< [mtdblockd]
1059 root 1512 S sh -c cat /proc/local_clients/local_clients_info >/TMP /log.txt
1060 root 1504 D cat /proc/local_clients/local_clients_info
1071 root 3716 S /usr/bin/httpserver
1072 root 1512 S sh-c client_mgmt -s 192.168.0.101
1073 root 1196 D Client_mgmt-s 192.168.0.101
1074 root 1512 s sh-c cat /proc/local_clients/local_clients_info >/TMP /log.txt
1075 root 1504 D cat /proc/local_clients/local_clients_info
1164 root 3716 S /usr/bin/httpserver
1165 root 1512 S sh-c client_mgmt-s 192.168.0.101
1166 root 1196 D /usr/bin/httpserver
1165 root 1512 S sh-c client_mgmt-s 192.168.0.101
1166 root 1196 D Client_mgmt-s 192.168.0.101
1167 root 1512 s sh-c cat /proc/local_clients/local_clients_info >/TMP /log.txt
1168 root 1504 D cat /proc/local_clients/local_clients_info
1225 root 3716 S /usr/bin/httpserver
1226 root 1512 S sh-c client_mgmt-s 192.168.0.101
1227 root 1196 D /usr/bin/httpserver Client_mgmt-s 192.168.0.101
1228 root 1512 s sh-c cat /proc/local_clients/local_clients_info >/TMP /log.txt
1229 root 1504 D cat /proc/local_clients/local_clients_info
1441 root 3716 S /usr/bin/httpserver
1442 root 1512 S sh-c client_mgmt -s 192.168.0.101
1443 root 1196 D Client_mgmt-s 192.168.0.101
1444 root 1512 s sh-c cat /proc/local_clients/local_clients_info > /tmp/log.txt
1445 root 1504 D cat /proc/local_clients/local_clients_info
Remove_timeout_stas is an aging operation on the global variable l_clientS_info_list. The whole process is protected by a MUtex. It is suspected to be a mutex deadlock, but when I check the code, I find no place where unlock does not return. A special tip found in the logs: Scheduling Whileatomic; Search the key word, found that article: http://blog.csdn.net/cfy_phonex/article/details/12090943; When the Linux kernel prints bugs: scheduling from the idlethread “and” bad: scheduling from the idlethread “, it is usually a function called in the interrupt processing function that can sleep, such as semaphore,mutex,sleep, etc. It’s related to mutex. But the puzzle is when dealing with interrupts. Where are the interruptions?
looks at the log and finds that cat processes are all stuck. Could it be the interrupt caused by cat?Looking up the instructions for CAT, CAT prints a file to the standard output device. Since CAT produces interrupts, interrupt processing is to open the file and output it to the terminal, focusing on the processing function that reads the PROc file.
kernel module local_clients registers a method for manipulating proc files/here’s another one to explore/:
static structseq_operations clients_seq_ops = {
.start = clients_seq_start,
.next = clients_seq_next,
.stop = clients_seq_stop,
.show = clients_seq_show
}; When the cat/proc/local_clients/local_clients_info is called, clients_seq_start is executed first and clients_seq_show, clients_seq_start is executed next:
{
printk(” pos = % LLD \n “, *pos);
remove_timeout_stas();/Mutex_lock (& amp; amp) is called in this function. local_clients_mutex);/
//mutex_lock(& local_clients_mutex);
if (*pos > = MAX_WIRELESS_CLIENTS_NUM)
{
return NULL;
}
printk(” return addr: %p, pos = % LLD \n “,l_clients_info_list + *pos, *pos);

return l_clients_info_list + *pos;

}
problem caused by: two operations called mutex_lock; A cat-triggered interrupt invokes the read /proc/local_clients/local_clients_info. A cat-triggered interrupt invokes the read function clients_seq_start in the proc file system. Local_clients_mutex).
another is that when a HOST in WLAN issues a DNS message and local_clients listens to a DNS message, it also invokes mutex_lock(& amp; amp) before adding the IP, MAC, and HOST information of the HOST sending the message to the file local_clients_info. Local_clients_mutex);
means that there are two orders. One is that when the cat interrupt handler is called, local_clients adds an entry that causes the cat interrupt handler to be scheduled and reports an error. Alternatively, local_clients calls mutex_lock when adding an entry, and cat interrupts trigger calls mutex_lock, and the mutex_lock in the interrupt waits, so the interrupt handler goes to sleep, which is against the purpose of the interrupt handling mechanism.
Solution: Use spin_lock instead of mutex_lock. The difference between the two is: spin_lock, which can be checked repeatedly to see if the lock can be obtained, but will not fall asleep (busy waiting, so the spin_lock protection code should be short and dry, not consuming too much CPU time). The semaphore, while waiting for the signal to be released, goes to sleep until it is awakened; The interrupt handler cannot go to sleep (that is, cannot call sleep, or wait for a semaphore resource).

test 1)
tests mutex_lock before modification and spin_lock after modification. Shell script is used to loop cat /proc/local_clients/local_clients_info file, and a bat script is used for nslookup operation on WLAN terminal PC to make PC continuously send DNS message. The test finds that mutex_lock is used to give error prompt:
/TMP # tftp-g 192.168.0.104-r test.sh; Chmod 777 test. Sh
test. 100% sh | * * * * * * * * * * * * * * * * * * * * * | 78 ETA
/TMP 0:00:00 # 192.168.0.104 TFTP – g – r test. Sh. Chmod 777 test. Sh
test. 100% sh | * * * * * * * * * * * * * * * * * * * * * | 78 0:00:00 ETA #.
/TMP/test. The sh
[193.176000] BUG: scheduling while atomic: Cat /1835/0x00000100
[193.184000] Modules linked in: Umac ath_dev(P) ath_rate_atheros(P) ath_hal(P) asf(P) adf(P) athrs_gmac local_clients tp_domain parentCtrl
[193.196000] Cpu 0
[193.200000]

0:00 000000000000010000000100000000 [193.204000]
4:000030 832e32ac 00000080 c4653600
[193.208000]

And b9aca00364c598bc4ec4d38fffffff8 [193.216000]
12:0000002d 592f59ba 0000003f 00455924
[193.220000]

16:00 0000 c1832d0000000010007fc7fc70 [193.224000]
20:825cde98 00000000 7fc7fc70 00001000
[193.232000]

0000 a9800b22c8 24:00 [193.236000]
28:825cc000 825cde50 825cdf10 832d42c0
[193.240000] Hi: 001a99e2
[193.244000] Lo: 8f4e21b0
[193.248000] 832 d42d8 remove_timeout_stas + 0 x4c/0 x8c [local_clients]
[193.256000] Tainted: P
[193.260000] ra: 832 d42c0 remove_timeout_stas + 0 x34/0 x8c [local_clients]
[193.264000] the Status: 1000ff03 KERNEL EXL IE
[193.268000] Cause: 10800400
[193.272000] PrId: 00019374 (MIPS 24Kc)
test 2)
whether it is possible to be caused by multiple cat mutex_lock calls lead to problems
execute multiple cat call scripts in the shell, run for a long time, there is no problem; Cat is a user-mode process, so does the kernel perform two open files at the same time?
the answer is no, it involves the process scheduling, cat is the user mode process, and the punching file belongs to the kernel mode operation, from the user mode to the kernel mode operation, there are two ways, 1 is the system call, 2 is the interrupt, here is obviously the use of system call. If the system is in a core mindset and is processing system calls, then no other process in the system can steal CPU time and the scheduler must wait for the system call to complete before it can choose another process to execute, but an interrupt can terminate the system call. So the problem is probably caused by mutex_lock.
Cont:
in AP(MTK7628), when the mi 6 connection, there is a similar problem, causing other wireless devices can not connect to AP, but in the latest version of MIUI V8.2.23.0 this problem has been fixed.
[06-07 12:03:49]BUG: scheduling while atomic: RtmpMlmeTask/154/0x00000100
[06-07 12:03:49]Modules linked in: mt_wifi
[06-07 12:03:49]Cpu 0
[06-07 12:03:49]

00000000000000 c03582ec00000002 0:00 [06-0712:03:49]
4 : c0503000 c05e2728 00000000 c050a6ef
[06-07 12:03:49]

8: c050a6fc80f53d3e0000000480f53d44 [06-0712:03:49]
12 : 00044000 00000004 00000002 00000000
[06-07 12:03:49]

16:00 000002 c05e2728c0503000c0360000 [06-0712:03:49]
20 : c04844bc c03e0000 c048436c c043fdac
[06-07 12:03:49]

000000 c0358e28 24:00 [06-0712:03:49]
28 : 80f52000 80f53db8 c0484284 c03e334c
[06-07 12:03:49]Hi : 00000000
[06-07 12:03:49]Lo : 00000040
[06-07 12:03:49]epc : c03582ec RTMPCheckEntryEnableAutoRateSwitch+0x0/0x90 [mt_wifi]
[06-07 12:03:49] Not tainted
[06-07 12:03:49]ra : c03e334c APMlmeDynamicTxRateSwitching+0x130/0x9a8 [mt_wifi]
[06-07 12:03:49]Status: 1100ff03 KERNEL EXL IE
[06-07 12:03:49]Cause : 50808000
[06-07 12:03:49]PrId : 00019655 (MIPS 24Kc)

SevenZipSharp

github:https://github.com/tomap/SevenZipSharp
The compression ratio is very high, with a 32-bit core of 64 bits

if (Environment.Is64BitProcess)
{
      SevenZipBase.SetLibraryPath("7z64.dll");
}
else
{
      SevenZipBase.SetLibraryPath("7z.dll");
}

Reference: https://www.cnblogs.com/gdouzz/p/7090710.html

Ranger yarn plug-in installation

Ranger-0.6.0-yarn-plugin is installed to all ResourceManager nodes of the Yarn. Other NodeManager nodes
do not need to be installed.
Landing HDFS install user, garrison/zdh1234 hadoop (user group), obtain installation package decompression
SCP/home/backup/ranger/ranger – 0.6.0 – yarn – plugin. Tar. Gz.
the tar – ZXVF ranger – 0.6.0 – yarn – plugin. Tar. Gz.
vi install properties
modify parameters is as follows:

POLICY_MGR_URL=http://10.43.159.245:6080
SQL_CONNECTOR_JAR=/usr/share/java/mysql-connector-java.jar
REPOSITORY_NAME=yarndev
CUSTOM_USER=garrison
CUSTOM_GROUP=hadoop

To install the Ranger Yarn Plugin, note:./ enabled-plugin. sh script should be run as root. :
./ enableyarn-plugin. sh
needs to restart after the creation of the Yarn.
ZDH – 245 bales to garrison of ZDH – 240
SCP garrison @ ZDH – r – 245:/home/garrison/ranger – 0.6.0 – yarn – plugin.
root installation script execution, and restart the yarn.
The Service of HDFS plugin
YARN new Service registered in Ranger-Admin is modified as follows

Service Name = yarnpdev
UserName = garrison
Password = zdh1234
YARN REST URL = http://10.43.159.240:8188

Then click TestConnection to save successfully.
Close the all-queue policy,
create root.default policy, and give mysql users the right to submit the queue.
use mysql user to perform mapreduce task, give mysql access to the corresponding directory of HDFS:

export JAVA_HOME=/usr/share/java/jdk1.7.0_80
/home/garrison/hadoop-2.7.1/bin/hadoop jar /home/garrison/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar wordcount -Dmapreduce.job.queuename=default hdfs://gagcluster/usr/wordcout.txt /usr/wordresult_002
/home/garrison/hadoop-2.7.1/bin/hadoop fs -text /usr/wordresult_002/part-r-00000

User usersync cannot submit applications to queue root.default
Yarn queue permissions enable capacity schedule queues to implement
Yarn -site.xml configuration file to add configuration items:

<property>
    <name>yarn.resourcemanager.scheduler.class</name>    
    <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler</value>
</property>

The capacity-scheduler. XML configuration is as follows, allowing only the garrison user to submit a job:

<property>
  <name>yarn.scheduler.capacity.root.acl_submit_applications</name>
   <value>garrison</value>
   <description>
     The ACL of who can submit jobs to the root queue.
   </description>
 </property>
 <property>
  <name>yarn.scheduler.capacity.root.acl_administer_queue</name>
  <value>garrison</value>
  <description>
    The ACL of who can administer jobs on the default queue.
  </description>
</property>
<property>
  <name>yarn.scheduler.capacity.root.default.acl_submit_applications</name>
  <value>garrison</value>
  <description>
    The ACL of who can submit jobs to the default queue.
  </description>
</property>
<property>
  <name>yarn.scheduler.capacity.root.default.acl_administer_queue</name>
  <value>garrison</value>
  <description>
    The ACL of who can administer jobs on the default queue.
  </description>
</property>

Memory leak in Windows 8.1 with Killer E2200 and Windows Network Data Usage Monitoring

Recently upgraded to a new computer with Intel’s latest Haswell generation and Microsoft Windows 8.1. Although its performance has been stellar, a few days ago unexpectedly ran into severely degraded performance.
Saw in the Task Manager that all available memory was taken up by the Non-Paged Pool. After a system reboot the memory used by the Non-Paged Pool quickly started to increase until all memory was taken.
Looked up what information could fine online about memory leaks in Windows 8.1 and came upon this forum post in which others detailed similar experiences when using Windows 8 on hardware equipped with Qualcomm’s Killer ethernet networking products.

The actual cause of the memory leak seems to be the Windows Network Data Usage Monitoring Driver service which in combination with a Killer network driver starts to fill up the Non-Paged Pool memory.
Considering that my MSI H87-G43 Gaming motherboard is equipped with the Killer Ethernet E2200 and am using the Killer Network Manager driver, knew it had to be the same cause.
Applied the suggested fix of altering the registry key value of the “Start” entry to 4 in HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Ndu\ to disable the Windows Network Data Usage Monitor Driver from starting and after a reboot the issue seems properly solved!

How to Fix IDM has been Registered with a Fake Serial Number

Solutions to fix IDM has been registered with a fake serial number:
There are two methods to fix IDM has been registered with a fake serial number error. Prefer using the first one method as it is the better trick to fix the error. If the first method do not work for you then go for the second method.
Also Read: How can I create a PDF Document File for free?
Methods to fix IDM has been registered with a fake serial number error:
– Method 1: Editing the Hosts File
Close all the process of IDM from Task Manager. If it is already closed then move to the next step. Browse to C:\Windows\System32\drivers\etc\hosts. Right click on the “hosts” file and Select “Open with”. Now, choose Notepad.


_Open Hosts File with Notepad_

Paste the following Code at the end of the text and save it.
127.0.0.1           tonec.com
127.0.0.1           www.tonec.com
127.0.0.1           registeridm.com
127.0.0.1           www.registeridm.com
127.0.0.1           secure.registeridm.com
127.0.0.1           internetdownloadmanager.com
127.0.0.1           www.internetdownloadmanager.com
127.0.0.1           secure.internetdownloadmanager.com
127.0.0.1           mirror.internetdownloadmanager.com
127.0.0.1           mirror2.internetdownloadmanager.com
127.0.0.1           mirror3.internetdownloadmanager.com


_Paste the code at the end_

Also Read: How To Hide Facebook Status & Photos From Specific\Particular Friends.
If you are unable to save it and an error comes then follow the below steps:
Right click on “hosts” file. Choose “Properties”. Click on “Security” tab. Then click on “Edit” option as shown in the below image.


_Security Tab of Hosts File_

Now a box of Permissions would open on your screen. Choose your User and mark a tick on all permission properties as shown in the below image.


_Permission settings of Hosts File_

Click on OK. Now, try to edit the hosts file.
That’s it. You’re done. Restart your PC and run IDM without any interruption(中断). The error “IDM has been registered with a fake number” has been solved.
#NOTE: This method will work only after restarting your PC.
If Method 1 does not work for you then follow Method 2 below.
Also Read: How to Create fake Facebook Chat | Edit Facebook Chat Conversations.
– Method 2: Tweaking with IDM Files
Go to IDM Installation directory i.e.

C:\Program Files\Internet Download Manager for Windows XP.
C:\Program Files (x86)\Internet Download Manager for Windows 7 and 8.

Search for “IDMGrHlp. exe” file. Rename this file or delete it. I would suggest you to delete it.
– Now, whenever you open IDM, a new pop up message would appear on your screen “IDM cannot find 1 file that is necessary for browser and system integration. Please reinstall(重新设置) IDM”.


_Rename or Delete IDMGrHlp_

Search for “idmbroker. exe” file. Make a duplicate copy of this file and paste it in the same directory.


_Make a Duplicate copy of idmBroker and paste it in the same directory_

Now, rename this duplicate file to “IDMGrHlp.exe”.
That’s it. You’re done. Restart your PC and run IDM without any interruption(中断). The error “IDM has been registered with a fake number” has been solved.
Also Read: How to Fix SSL Connection Error in Google Chrome Browser – Causes and Solutions.

from:http://www.infocurse.com/solution-idm-has-been-registered-with-fake-serial-number-fixed/

转载于:https://www.cnblogs.com/lovepipi/p/4055356.html

How to Fix Session is not Connecting (How to Diagnose it)

In this blog post of FIX protocol tutorial series I would like to share my experience with connectivity issues around Fix Engines. to exchange message or say to trade electronically clients connect to broker using FIX protocol and for that they use FIX Engine. In FIX protocol connection between two FIX Engine is refereed as FIX Session and we normally say whether FIX Session is connected or not connected. FIX Session normally have there start time , end time and EOD time (End of day time) also called TradingSession start time , Trading Session End Time and Trading Session EOD time.

Fix Session Start time is the time when FIX Engine tries to connect each other , to connect successfully both client and broker must have agreed on Fix Session start time and there FIX engine must be running on that time to make them connect to each other.

Here I will mainly discuss issues I have faced during FIX Session establishment

These are very classic problems and should I say most common problem working with FIX protocol and almost everybody face this problem in there day to day work and has there own way to figure out what exactly is wrong  and how to fix that.

here I am listing some guideline or say an approach for people who just started working on FIX protocol to figure out what is wrong and how to fix that  hope this would help specially to newcomers on FIX protocol.

As per FIX protcol FIX Engine connects to each other over TCP connection on agreed host and port that’s why first check in your log that if there is any logon message 35=A ,if there is no logon message something is wrong on TCP(socket ) level and TCP connection between client FIX Engine  and  broker Fix Engine has not been established.

to verify this just check whether your host is connected to broker host or not by issuing following command.

netstat -a | grep port (port is the one which you are using to connect to broker)

if you don’t see a connection ESTABLISHED means no TCP connection has been established between your host and broker host and something is wrong either with broker FIX engine host or network.

Now check if broker host is pingable or not , to check broker host is alive and not down. you can use “telnet” command for checking that.

telnet hostname port  (here hostname and port is broker host and port)

if you just see “trying ………” means host is not reachable and something is wrong with network may network link issue or any firewall rule

issue, you need to involve network team here for further diagnosis.

Now come to other part , in case you see logon message (MsgType=A or 35=A) in your log and still session is not establish then check for logout

message (MsgType=5 or 35=5) by seeing Text(tag 58) here you can figure out why session is not connecting may be sequence number mismatch.

Now there could be two reason :

1) Either broker is logging you out because you are sending sequence no less than what broker is expecting. In this case you need to reset

your Outgoing sequence Number to what broker is expecting.

2) In case your Fix engine is logging out broker because broker is sending sequence number less than what your Fix Engine is expecting ,In this

case you need to reset your Incoming sequence number.

Sequence number reset can also be done on broker side in opposite way you are doing but before doing that intranet you need to think why sequence number got mismatched and in case of any replay there would not be any side effect.

–>

to read more about FIX protocol , please see my FIX protocol tutorial series

Read more: http://javarevisited.blogspot.com/2011/01/fix-protocol-tutorial-fix-session-is.html#ixzz2pmu2gBLp

[Warning] incompatible implicit declaration of built-in function ‘strcat’

After watching the machine learning course today, I changed to Learn C language for a while. It was also the first time I encountered the strcat function, the string concatenation function. Its general form is strcat (character array 1, character array 2). The function concatenates the strings of two character arrays, attaches string 2 to the end of string 1, and places the result in character array 1. The function call returns a function value — the address of character array 1. Such as:

#include<stdio.h>
int main()
{
	char str1[30] = {"People's Republic of "};
	char str2[] = {"China"};
	printf("%s",strcat(str1,str2));
	
	return 0;
}

Output code error:

In function 'main':
[Warning] incompatible implicit declaration of built-in function 'strcat'

Baidu once reason, little added header file

#include<stdlib.h>

#include<string.h>

After adding, the program output is normal:

Relative path and absolute path${ pageContext.request.contextPath }

Exe
relative path: the path from the current path, if the current path is C:\ Windows
to describe the path, just type
system32\ CMD. Exe
in fact, the strict relative path should be
.\system32\ CMD. Exe
, where. Represents the current path, which can be omitted in channel cases, but not in special cases.
if the current path is c:\program files
to invoke the above command, you need to type
.. \ Windows \system32\cmd.exe
where.. Is the parent directory.
if the current path is c:\program files\common files
then you need to enter
… .\windows\system32\cmd.exe
Hold on, this should make a lot more sense than it does in the program.
The ${pageContext. Request. ContextPath} is equivalent to the & lt; %=request.getContextPath()%> or you could say < %=request.getContextPath()%> EL version of
means to remove the deployment of the application name, or the current project name
such as my project name for SpringMVC in the browser input for http://localhost:8080/SpringMVC/login.jsp
The ${pageContext. Request. ContextPath} or & lt; %=request.getContextPath()%> is to take out/for SpringMVC, and "/" represents the meaning of is http://localhost:8080
so we project should write ${pageContext. Request. ContextPath}/login JSP
Just give me some examples. I'm going to start with the relative path, and in a lot of cases I'm going to get it right.

You see the delete, I also use the relative path, why it won't go wrong for me, because the request path only one layer, there is no placeholder, when converting HiddenHttpMethodFilter delete request will remove a layer, so will not go wrong, the request path into http://localhost:8080/emp/1001

but this edit is not so optimistic.

There is a placeholder in the path, so the conversion will not be complete.

This is the kind of farce that occurs when multiple layers of requests have no path for a Handler to process in the first place.
So use relative paths as often as possible.

When NPM install, make: G + +: command not found will be prompted

When NPM install is installed, an error may appear that prompts make:g++ Command not found, as follows:
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/yanyiwu/nodejieba/releases/download/2.4.1/nodejieba-v2.4.1-node-v72-linux-x64.tar.gz
node – pre – gyp WARN the pre – built binaries not found for [email protected] and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory /home/smart/jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build' CXX(target) Release/obj.target/nodejieba/lib/index.o make: g++: Command not found make: * * * [Release/obj. Target/nodejieba/lib/index o] make the Error 127: brigade directory /home/smart/Jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build '
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 3.10.0-957.21.3. El7.x86_64 The command "/ usr/local/nodejs/bin/node" "/ usr/local/nodejs/lib/node_modules/NPM/node_modules/node - gyp/bin/node - gyp. Js" "build" fallback "- - to - build" "- the module =/home/smart/Jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build/Release/nodejieba node" "- module_name = nodejieba" "- module_path =/home/smart/Jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build/Release" "- napi_version = 5" "- node_abi_napi = for a" "- napi_build_version = 0" "- node_napi_label = node - v72"
gyp ERR! cwd /home/smart/jenkins/workspace/microservice_vue_demo/node_modules/nodejieba
gyp ERR! Node-v v12.16.3 Node-gyp-v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/ usr/local/nodejs/bin/node/usr/local/nodejs/lib/node_modules/NPM/node_modules/node - gyp/bin/node - gyp. Js build - fallback - to - build --module=/home/smart/jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build/Release/nodejieba.node --module_name=nodejieba - module_path =/home/smart/Jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build/Release - napi_version = 5 - node_abi_napi = for a - napi_build_version = 0 - node_napi_label = node - v72 (1)
' node-pre-gyp ERR! stack at ChildProcess. (/home/smart/jenkins/workspace/microservice_vue_demo/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:310:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)

install g++, switch to root, and execute

root@linx:~# yum install gcc -c++

After waiting for the package installation to complete, execute g++ -v to see that g++ has been successfully installed

root@linx:~# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) 

Re-run NPM Install.

HBase checkandput() method

The common method for adding (modifying) data in a table in Hbase is void put(put put), which returns no value
But if you put the same data, you get an error, which is not very friendly
So, there’s also the checkAndPut() method

   * Atomically checks if a row/family/qualifier value matches the expected
   * value. If it does, it adds the put.  If the passed value is null, the check
   * is for the lack of column (ie: non-existance)


boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
    byte[] value, Put put) throws IOException

If the data (Row, family, Qualifier, value) is present, then put will not be performed and false will be returned; otherwise, true will be performed
Therefore, this method is safer than the put() method.

Windows 10 startup item repair an operating system wasn’t found

Recently, in the dual systems deepin15(Ubuntu is also applicable) and Windows10, a series of problems encountered when uninstalling Deepin are recorded as follows: after installing Deepin system in
Windows, the general boot will change into Deepin boot, which will cause the boot item to disappear, and the system will not automatically restore win boot, resulting in the failure to enter the system normally. Before deleting deepin’s partition, I could use Deepin’s official unload instruction to instruct me to use. However, it was invalid, so I had to delete the partition by myself, and then started it with the U disk for repair.
(1-2 steps) needs to be made on another working computer

    download old peach or U boot or Chinese cabbage. And install. Insert the USB flash drive and make it with one click. When finished, unplug the usb flash drive. Insert the usb flash drive into the computer that cannot be started normally, press F12 to select the entry of the usb flash drive (the name is usually the manufacturer of your usb flash drive). Select windows8 to boot your new computer. Wait for normal entry. Open DiskGenius, change the disk to the one that was in good condition before (normally, starting from the USB drive will change the initial disk character), and use the boot repair software to fix it automatically. Exit reboot.

If the Win system can be started normally after 6 is completed, the latter can be ignored. Otherwise, if an operating system wasn’t found appears, press CTRL+ALT+DEL to restart something. Reboot or repeat above 3-5 (not 6). And follow the steps below to continue

    after entering the PE system, click the Windows logo in the lower left corner and find Dism++ in the folder. Open, the top bar to find the system where the partition, and click, find tools repair boot. Reboot, and that’s it.