Tag Archives: linux

[Solved] FATAL CONFIG FILE ERROR: Bad directive or wrong number of arguments

Error message

Error reporting reason

The reason is that it is not allowed to add comments after the same valid code line in some configuration files (such as. Conf files, which are widely seen here), which will compile and execute the following comments as the parameters passed in from the current command line; If there are no parameters in the command configuration or the format of the parameters is wrong, an error will be reported naturally
for example:

Solution

Divide the original configuration into two lines of commands and comments

Error response from daemon: OCI runtime exec failed: exec failed: container_linux.go:345:

        An error was reported when using docker to enter the specified container today. The screenshot of the error is as follows:

        After careful verification, the command is correct, but it can’t get into the container. After checking the data, it is realized that there is a problem with the docker. It can be understood in combination with the error report:

Error response from daemon: OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown

        The above is complete error reporting information, of which the key information is as follows:

"/bin/bash\": stat /bin/bash: no such file or directory": unknown

        That is, there is no directory/bin/bash, so an error will be reported when you want to enter the container according to the initial command.

        You can enter by using the following command. The screenshot is as follows:

docker exec -it mqtt /bin/sh

      Perfect solution, record notes!

 

[Solved] PHP getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL

Today, I encountered a problem with the client application server (CentOS). When using getimagesize(), an error is always reported:

PHP getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_ get_ server_ certificate:certificate verify failed

It is preliminarily judged that openssl.cafile in php.ini is not set. After opening the PHP configuration file, it is found that it is set. The current setting value is:

openssl.cafile=/etc/pki/tls/certs/ca-bundle.crt

After that, it was suspected that the certificate might expire. First, compare the contents of the file on your own server. If you find that the size is inconsistent, copy and paste the contents from your own server. After saving, the problem of reloading PHP configuration still exists;

Remember that similar problems have occurred on Windows systems before. At that time, curl.cainfo was configured, so from this website
: http://curl.haxx.se/ca/cacert.pem Download the certificate and put it in the /usr/local/OpenSSL/ directory to modify the configuration

[curl]
curl.cainfo = /usr/local/openssl/cacert.pem

[openssl]
openssl.cafile=/usr/local/openssl/cacert.pem

When this problem occurs on the Internet, the solutions found are also operated in this way. However, the overload configuration problem remains after saving. Change the configuration back again.

Finally, see this article on: https://stackoverflow.com/questions/17084886/ssl-error-routinesssl3-get-server-certificatecertificate-verify-failed

It is found that the Linux system has the command to update the local certificate. The commands are different for different systems. The CentOS operation is as follows:

#Install ca certificate tool
yum install ca-certificates -y

# Update Certificate
update-ca-trust

Problem-solving.

[Solved] ERROR: The kernel module failed to load, because it was not signed by a key that is trusted by the

ubuntu encountered the following problem installing the graphics card driver
ERROR: The kernel module failed to load, because it was not signed by a key that is trusted by the kernel. Please try installing the driver again.
and sign the kernel when prompted to do so.
ERROR:  Unable to load the kernel module ‘nvidia.ko’. This happens most
frequently when this kernel module was built against the wrong or
improperly configured kernel sources, with a version of gcc that
differs from the one used to build the target kernel(1), or if a driver
such as rivafb, nvidiafb. or nouveau is present and prevents the
NVIDIA kernel module from obtaining ownership of the NVIDIA
graphics device(s), or no NVIDIA GPU installed in this system is
supported by this NVIDIA Linux graphics driver release.

 

Solution:
Enter BIOS to turn off Secure Boot

QInotifyFileSystemWatcherEngine::addPaths: inotify_add_Watch failed: there is no space on the device

When Ubuntu runs many programs and monitors too many files, it may prompt: qinotifyfilesystemwatcherengine:: addpaths: inotify when running other programs_ add_ Watch failed: there is no space on the device

This involves the concept of Linux file system event monitoring framework

terms of settlement:

Add maximum number of monitoring files

Command settings: sudo sysctl fs.inotify.max_ user_ watches=524288

Effective: sudo sysctl – P

This method can only be solved temporarily. It will recover after restart. Enter the above two lines of commands every time you encounter this problem

How to Solve Oracle startup monitoring error

Solve the error of Oracle startup monitoring

On the Linux virtual machine, start the Oracle listening service:

[oracle@localhost ~]$ lsnrctl start

As a result, a listening error message appears, as follows:

TNS-12537: TNS:connection closed
 TNS-12560: TNS:protocol adapter error
  TNS-00507: Connection closed
   Linux Error: 29: Illegal seek

After many attempts and data access, it is found that the error is caused by the default hostname. At this time, the following steps can be taken to solve the above error reporting problem:

    1. modify hostname
[root@localhost oracle]# hostname oracle

Add “host IP oracle” in the/etc/hosts file

[root@oracle oracle]# vim /etc/hosts
...
localhost ip oracle

Add “hostname = oracle” in the etc/sysconfig/network file

[root@oracle oracle]# vim /etc/sysconfig/network
...
hostname=oracle

Restart listening

[root@oracle oracle]# lsnrctl start

After a wave of configuration, monitoring is successfully enabled:

[Solved] Ubuntu Update source error: Certificate verification failed: The certificate is NOT trusted.

Updating the Ubuntu source today always reports an error

Ign:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease
Ign:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease
Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease
Ign:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security InRelease
Err:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]
Err:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]
Err:7 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]
Err:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]
Reading package lists... Done
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Finally, refer to the method of online leaders, change HTTPS in the software source to HTTP, and solve it successfully.

# The source image is commented by default to improve the speed of apt update, you can uncomment it if needed
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

Docker: How to Solve MYSQL8 & Navicat remote connection error

1. Download Image

docker pull mysql:8.0.26

2. Operation container

docker run -p 3306:3306 --restart=always -e MYSQL_ROOT_PASSWORD=ang123 --name mysql -d mysql:8.0.26

3. At this time, an error will be reported when using Navicat to log in, because the encryption methods of mysql8 and 5 are different, and the encryption method needs to be modified

4. Enter MySQL container

docker exec -it mysql bash

5. Log in to MySQL and modify the encryption method

mysql -uroot -pang123;

use mysql;

#Modify encryption method
alter user 'root'@'%' identified with mysql_native_password by 'root';

#View modified data
select host,user,plugin from user;

Revised as follows:

6.At this time, the local Navicat remote connection to MySQL in Linux still reports an error 1045, but the password is correct, and the grant authorization does not solve the problem

The final solution is as follows. Just change the password again. The password is still the original password

ALTER USER 'root'@'%' IDENTIFIED WITH MYSQL_NATIVE_PASSWORD BY 'ang123';

#Make changes effective
flush privileges;

7. At this time, Navicat can be used for remote connection

Running realsense ROS reports an error, USB cam overflow, hardware error

Run the command roslaunch realsense2_ camera rs_ The following error message appears in camera.launch:

resolvent:

The reason for this problem is not that the driver is not installed properly, but because the realsense is connected to the computer through the USB2.0 interface, the transmission speed is slow, resulting in data overflow and loss. The problem can be solved by connecting through USB3.0.