Category Archives: Linux

Ubuntu System Goland Error: External file changes sync may be slow: The current inotify(7) watch limit is too low


vim /etc/sysctl.conf

Increase the value of fs.inotify.max_user_watches inside (or add the following line if you don't have this value).

After saving, execute.
sysctl -p

Restart Goland it's OK


Linux transport error 202: bind failed: Address already in use

Let’s start with the conclusion: the remote debug port is occupied. Replace the port configured by your own script, or directly kill the process occupied by the port, and then occupy the port again

Linux server, starting the project, encountered the following problems:

The error log says that the transmission is wrong and the address has been occupied.

Use the losf - I: port number command to view the occupation of ports, as shown in the figure:

Non root users need to add sudo

Use the kill - 9 process number command to kill the process occupying the port, as shown in the figure:

Re run the project and it will start successfully.

Linux: How to configurate Environment Variables

Configure by modifying the ~ /. Bashrc file in the user directory:

vim ~/.bashrc

# add in the last line
export PATH=$PATH:/home/uusama/mysql/bin

matters needing attention:

Effective time: it takes effect when a new terminal is opened with the same user, or it takes effect manually source ~ /. Bashrc

Effective period: permanent

Effective range: only valid for the current user

If a subsequent environment variable loading file overwrites the Path definition, it may not take effect

Linux Error: _mysql.c:32:20: fatal error: Python.h: No such file or directory [Solved]

Error Description
When installing mysqlclient with pip3, an error occurs:  _mysql.c:32:20: fatal error: Python.h: No such file or directory

pip3 install mysqlclient==1.3.12

Error content

  _mysql.c:32:20: fatal error: Python.h: No such file or directory
     #include "Python.h"
    compilation terminated.
    error: command 'gcc' failed with exit status 1



At first, I saw command 'GCC' failed and thought it was the lack of GCC compilation package, so I installed GCC related tools using Yum or up2date

yum install gcc gcc-c++ kernel-devel

After the installation is completed, an error is still reported, so search:_ Mysql. C: 32:20: fatal error: Python. H: no such file or directory. It is found that python3 devel is missing

CentOS system

Python 2 version execution: sudo Yum install Python devel

Python 3 version execution: sudo Yum install Python 3 devel

Ubuntu, Debian system

Python 2 version execution: sudo apt get install Python dev

Python 3 version execution: sudo apt get install Python 3 dev

After installing the python 3-devel dependency, re-execute it to solve the problem

[Solved] Linux Core Compile Error: No rule to make … ipt_ecn.c

Problem phenomenon:

The following error occurred while compiling the kernel:

make[3]: *** No rule to make target 'net/ipv4/netfilter/ipt_ecn.c', needed by 'net/ipv4/netfilter/ipt_ecn.o'
make[2]: *** [net/ipv4/netfilter] Error 2
make[1]: *** [net/ipv4] Error 2
make: *** [net] Error 2

Cause analysis:

The main reason is that the Linux kernel code is decompressed under windows (I think a convenient reference is also needed on Windows), but some files (such as ipt_ecn. C, etc.) are case sensitive. When decompressing on windows, they overwrite each other because they are not case sensitive, resulting in the lack of files.


Just decompress your source code and compile it again. When decompressing under windows, you will be prompted whether the same files need to be processed. Select no for all.

Git Error: fatal: remote origin already exists.

Today, when using git to add a remote GitHub warehouse, you will be prompted with an error: fatal: remote origin already exists

Finally, the solutions are as follows:
1. Delete the remote git warehouse first

$ git remote rm origin

2. Add remote git warehouse

$ git remote add origin [email protected] :FBing/java-code-generator

If an error is reported when git remote RM origin is executed, we can manually modify the contents of the gitconfig file

$ vi .git/config

Nginx Error: nginx: [error] CreateFile() “D:\nginx-1.20.1/logs/” failed (2: The system cannot find the file specified)


After modifying the Nginx configuration file Nginx.conf, you want to restart Nginx to make the configuration take effect. CMD enter Nginx installation directory and enter the command:   Nginx -s reload

Error: nginx: [error] createfile() “D: \ nginx-1.20.1/logs/nginx. PID” failed (2: the system cannot find the file specified)

Cause analysis

The direct cause of the problem is that there is no file in the logs directory under the Nginx installation directory. Generally, the file will be automatically created when Nginx starts

To start or restart Nginx, you need to kill the original Nginx process. You need to find the original process according to Nginx.PID, where PID is actually the original process ID

The reason for this may be that Nginx is not started or Nginx.PID is manually deleted. Sometimes, when Nginx is started by double-clicking on the Windows system, the Nginx.PID file cannot be automatically generated in the logs directory

If Nginx is not started (and you are not sure whether it is started), do not use Nginx – s reload command as the start command to avoid this error



1. Find the original nginx process (if any) in Task Manager and close it, then use the cmd command to start nginx

2. cmd into the nginx installation directory

3. Enter the command start nginx or nginx.exe to start nginx

4. Go to the nginx directory under the logs directory and see if there is a file; if not, repeat the 123 operation

5. If has been generated, you can restart normally after modifying the configuration file

6.nginx -s reload

Linux: CentOS 7 executes service network restart error [Solved]

Today, we plan to build a Greenplum cluster environment with VirtualBox virtual machine, and the host agrees to install CentOS 7. As a result, an error is reported by Yum install after CentOS 7, indicating that there is no way to connect to the address of the image library, that is, there is no way to surf the Internet. Then curl prompts that the target cannot be found. The first thing I think about is the network problem. Let’s take a look at the ifconfig command first. The result prompts an unknown command, which is indeed a minimized installation. First, change the network settings of the virtual machine to bridge to ensure that cable connect is checked, and then go to the/etc/sysconfig/network scripts directory to check the settings of the eth0 network port. As a result, the ifcfg-eth0 file was not found.

First, use the IP address command to check the MAC address (that is, the string after link/ether)

Then VI/Etc/sysconfig/network scripts/ifcfg-eth0 add eth0 network port configuration

Save and exit, execute service network restart, and an error is directly reported

Restarting network (via systemctl):   Job  for  network.service failed because the control process exited with error code.

See  "systemctl status network.service"  and  "journalctl -xe"  for  details.     

After entering systemctl status network.service command according to the prompt, the following error message appears:

network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since 五 2017-07-14 19:01:47 CST; 1min 16s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 4681 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
   CGroup: /system.slice/network.service
           └─1192 /sbin/dhclient -H mini1 -1 -q -lf /var/lib/dhclient/ -pf /v...
7月 14 19:01:47 mini1 network[4681]: RTNETLINK answers: File exists
7月 14 19:01:47 mini1 network[4681]: RTNETLINK answers: File exists
7月 14 19:01:47 mini1 network[4681]: RTNETLINK answers: File exists
7月 14 19:01:47 mini1 network[4681]: RTNETLINK answers: File exists
7月 14 19:01:47 mini1 network[4681]: RTNETLINK answers: File exists
7月 14 19:01:47 mini1 network[4681]: RTNETLINK answers: File exists
7月 14 19:01:47 mini1 systemd[1]: network.service: control process exited, code=exited status=1
7月 14 19:01:47 mini1 systemd[1]: Failed to start LSB: Bring up/down networking.
7月 14 19:01:47 mini1 systemd[1]: Unit network.service entered failed state.
7月 14 19:01:47 mini1 systemd[1]: network.service failed.

Set startup to start a service named networkmanager-wait-online. The command is:
systemctl enable networkmanager-wait-online.service

Reboot restart the host

It is normal to re execute systemctl status network.service. Note that the MAC address behind the hwaddr of the newly created eth0 must be consistent with the local machine

Run curl again