Tag Archives: linux

How to Solve gtid master-slave replication connecting Issue

Project scenario:

Master slave connection method


Problem Description:

Last_IO_Errno: 2003 Last_IO_Error: error connecting to master '[email protected]:3306' - retry-time: 60 retries: 7

Cause analysis:

    1. when trying to log in to the master database to copy users from the server, an error of 113 is found

[ root@localhost mysql]# mysql -urepl -p123 -h 192.168.8.131 -P 3306 mysql: [Warning] Using a password on the command line interface can be insecure. Error 2003 (HY000): can't connect to MySQL server on '192.168.8.131' (113)

    1. check whether the main server firewall is closed. It is found that it is closed. It is speculated that the port is not open

systemctl status firewalld service

    1. 3. Check whether the 3306 port of the main database is open to the public. It is found that it is no

firewall CMD -- zone = public -- Query port = 3306/TCP

    1. 4 Open 3306 port

firewall CMD -- zone = public -- add port = 3306/TCP -- permanent

    1. 5 Update firewall

firewall CMD -- reload

 

Solution:

The master-slave replication connecting problem is mainly caused by the master and slave libraries can not be connected, after this problem found that although the firewall has been closed, but the port is not necessarily open to the public state, you need to set their own.

Ubuntu update source error: E: Problem executing scripts APT::Update::Post-Invoke-Success…

UBUNTU update source error:

E: Problem executing scripts APT::Update::Post-Invoke-Success ‘if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi’ E: Sub-process returned an error code

 

Solution:

apt-get purge libappstream3
apt-get update

[Solved] Sshd startup error: Failed at step CGROUP spawning /usr/sbin/sshd: No space left on device

sshd restart error:
systemctl restart sshd.service
The screenshot is as following:

Error Messages:

Failed at step CGROUP spawning /usr/sbin/sshd: No space left on device
Failed to create cgroup /system.slice/sshd.service: No such file or directory

 

The reason for this is that the cgroup is not mounted.

Solution:
Mount the cgroup directory
mount -t tmpfs cgroup_root /sys/fs/cgroup
umount -t tmpfs cgroup_root /sys/fs/cgroup
umount /sys/fs/cgroup

then restart to connect normally
systemctl start sshd.service

linux(aarch64): How to Fix kettle Startup Error Issue

Because of the work requirements, recently have been engaged in kettle-related business, in the deployment environment is not known to be linux (in the standard Kirin), has been doing conversions and operations under windows, on the recent to deploy to production, the problem is also exposed, in the environment to start kettle when the error reported:

Solution.
According to the error message: SWT package could not be loaded, so go online and search for downloading swt.jar .
Place the downloaded jar package under the kettle path of the installation: data-integration/libswt/linux/aarch64/
If there is no aarch64 folder, create one and put it there.
Then modify the spoon.sh configuration information:

When you’re done, restart ./spoon.sh and you’re done!

Kylin arm64 linux configure: error: cannot guess build type; you must specify one

error

uname -m = aarch64
uname -r = 4.19.90-23.8.v2101.ky10.aarch64
uname -s = Linux
uname -v = #1 SMP Mon May 17 17:07:38 CST 2021

/usr/bin/uname -p = aarch64
/bin/uname -X     = 

hostinfo               = 
/bin/universe          = 
/usr/bin/arch -k       = 
/bin/arch              = aarch64
/usr/bin/oslevel       = 
/usr/convex/getsysinfo = 

UNAME_MACHINE = aarch64
UNAME_RELEASE = 4.19.90-23.8.v2101.ky10.aarch64
UNAME_SYSTEM  = Linux
UNAME_VERSION = #1 SMP Mon May 17 17:07:38 CST 2021
configure: error: cannot guess build type; you must specify one

Solution:

./configure --build=aarch64-unknown-linux

effect

...
checking whether to include histogram support... no
checking whether to include dirty support... no
checking whether to include demo support... no
checking whether to include Unix-domain socket tests... no
checking whether to include DLPI tests... no
checking whether to include DCCP tests... no
checking whether to include OMNI tests... yes
checking whether to include XTI tests... no
checking whether to include SDP tests... no
checking whether to include ICSC-EXS tests... no
checking whether to include SCTP tests... no
checking whether to include paced send (intervals) support... no
checking whether paced sends should spin... no
checking whether to include initial burst support in _RR tests... yes
checking which CPU utilization measurement type to use... "procstat - auto"
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/netperf_version.h
config.status: creating src/Makefile
config.status: creating src/missing/Makefile
config.status: creating src/missing/m4/Makefile
config.status: creating doc/Makefile
config.status: creating doc/examples/Makefile
config.status: creating netperf.spec
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

Centos7.2 Install vscode Error: error while loading shared libraries: libxkbcommon.so.0: cannot open shared pro

1. I recently needed to install vscode on centos 7.2, and after installing it, I ran it and found that it kept reporting the following error

2. Using the #ldd code command, I found that libxkbcommon.so.0 is indeed missing

3. Then install libxkbcommon

yum install libxkbcommon

4. The following problems occur during operation

5. Then install NSS

yum install nss

6. Running, OK

Linux Use dtc generate dtb Error: “FATAL ERROR: Unable to parse input tree“

Error: 
linux-5.10>$ dtc -I dts -O dtb arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts -o fsl-ls1046a-rdb.dtb
Error: fsl-ls1046a-rdb.dts:13.1-9 syntax error
FATAL ERROR: Unable to parse input tree

Solution:
linux-5.10>$ export ARCH=arm64
linux-5.10>$ export CROSS_COMPILE=aarch64-linux-gnu-
linux-5.10>$ make defconfig
linux-5.10>$ make dtbs or
linux-5.10>$ make freescale/fsl-ls1046a-rdb.dtb

[Solved] dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

Problem phenomenon

sudo apt install nvidia-340
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libargtable2-0 libass5 libavcodec-ffmpeg56 libavdevice-ffmpeg56
  libavfilter-ffmpeg5 libavformat-ffmpeg56 libavresample-ffmpeg2
  libavutil-ffmpeg54 libbluray1 libboost-random1.58.0 libboost-regex1.58.0
  libboost-thread1.58.0 libcryptopp-dev libethereum libfdk-aac0 libjsoncpp1
  libjsonrpccpp-client0 libjsonrpccpp-common0 libjsonrpccpp-server0
  libleveldb1v5 libmicrohttpd10 libmicrohttpd12 libnvidia-common-396
  libopencv-core2.4v5 libopencv-imgproc2.4v5 libopenjpeg5 libpostproc-ffmpeg53
  libschroedinger-1.0-0 libsdl-ttf2.0-0 libswresample-ffmpeg1
  libswscale-ffmpeg3 libtbb2 libva1 libx264-148 libx265-79 miniupnpc
  nvidia-kernel-common-396 nvidia-kernel-source-396 nvidia-prime php7.1-common
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  nvidia-340
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/51,9 MB of archives.
After this operation, 274 MB of additional disk space will be used.
(Reading database ... 345463 files and directories currently installed.)
Preparing to unpack .../nvidia-340_340.107-0ubuntu0~gpu18.04.1_amd64.deb ...
diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGL.so to /usr/lib/x86_64-linux-gnu/libGL.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so to /usr/lib/x86_64-linux-gnu/libGL.so.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGL.so to /usr/lib/i386-linux-gnu/libGL.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGL.so to /usr/lib/i386-linux-gnu/libGL.so.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libEGL.so.1 to /usr/lib/x86_64-linux-gnu/libEGL.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libEGL.so.1 to /usr/lib/x86_64-linux-gnu/libEGL.so.1.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libEGL.so.1 to /usr/lib/i386-linux-gnu/libEGL.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libEGL.so.1 to /usr/lib/i386-linux-gnu/libEGL.so.1.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libEGL.so to /usr/lib/x86_64-linux-gnu/libEGL.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libEGL.so to /usr/lib/x86_64-linux-gnu/libEGL.so.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libEGL.so to /usr/lib/i386-linux-gnu/libEGL.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libEGL.so to /usr/lib/i386-linux-gnu/libEGL.so.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so to /usr/lib/x86_64-linux-gnu/libGLESv2.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so to /usr/lib/x86_64-linux-gnu/libGLESv2.so.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGLESv2.so to /usr/lib/i386-linux-gnu/libGLESv2.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGLESv2.so to /usr/lib/i386-linux-gnu/libGLESv2.so.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 to /usr/lib/x86_64-linux-gnu/libGLESv2.so.2.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 to /usr/lib/x86_64-linux-gnu/libGLESv2.so.2.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGLESv2.so.2 to /usr/lib/i386-linux-gnu/libGLESv2.so.2.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGLESv2.so.2 to /usr/lib/i386-linux-gnu/libGLESv2.so.2.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so to /usr/lib/x86_64-linux-gnu/libGL.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libGL.so to /usr/lib/i386-linux-gnu/libGL.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libEGL.so.1 to /usr/lib/x86_64-linux-gnu/libEGL.so.1.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libEGL.so.1 to /usr/lib/i386-linux-gnu/libEGL.so.1.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libEGL.so to /usr/lib/x86_64-linux-gnu/libEGL.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libEGL.so to /usr/lib/i386-linux-gnu/libEGL.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so to /usr/lib/x86_64-linux-gnu/libGLESv2.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libGLESv2.so to /usr/lib/i386-linux-gnu/libGLESv2.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 to /usr/lib/x86_64-linux-gnu/libGLESv2.so.2.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libGLESv2.so.2 to /usr/lib/i386-linux-gnu/libGLESv2.so.2.distrib by nvidia-340'
Unpacking nvidia-340 (340.107-0ubuntu0~gpu18.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-340_340.107-0ubuntu0~gpu18.04.1_amd64.deb (--unpack):
 trying to overwrite '/lib/udev/rules.d/71-nvidia.rules', which is also in package nvidia-kernel-common-396 396.45-0ubuntu0~gpu18.04.2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nvidia-340_340.107-0ubuntu0~gpu18.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Solution:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/nvidia-340_340.107-0ubuntu0~gpu18.04.1_amd64.deb

This will resolve “the trying to overwrite error” with the mighty force of dpkg. 😃
Then run:

sudo apt -f install

to fix if any broken packages.

VScode connect Remote Linux Server Error: Resolver error: Error

Problem Description
When using vscode to connect to a remote linux server ssh login suddenly fails to connect, showing Resolver error: Error

 

Personal solution:

1. Use other remote connection software to log in to the server, the blogger used Tabby
2. Use the command to find your own related processes: ps -ef | grep user_name
3. Find the pid of the process corresponding to .vscode, end the corresponding process: kill -9 $pid
4. vscode reconnect

Note:
For the time being, we do not know the reason for this frequent problem, but the above method can solve the connection failure problem.

[Solved] Except CvBridgeError,e:SyntaxError:invalid syntax

Error reporting for problem:

File “file location”, line 40

Except CvBridgeError,e:

SyntaxError:invalid syntax

 

Solution:

This is the result of a python version mismatch.

    1. 1. Find the code file according to the file location after File, and find the problematic line of code according to line
    1. 2. Change the code line to except CvBridgeError as e:
    1. 3. Save and exit

[Solved] Homebrew Error: xcrun: error: invalid active developer path

Recently, I found an error when installing things with homebrew. It turned out that homebrew was not adapted after my Mac updated maxos big sur11. In addition, the Xcode tool was deleted before, resulting in the following error:

Input directly at the terminal and xcrun will be installed

xcode-select --install

It can be used directly after installation