Tag Archives: linux

[Solved] Rocketmq installation error: org.apache.rocketmq.remoting.exception.remotingconnectexception: connect to failed

1. Rocketmq org.apache.rocketmq.remoting.exception.remotingconnectexception: connect to failed
solution: modify the broker configuration in the server and add the server IP (public network)

vim /home/prod/rocketmq-all-4.3.0/distribution/target/apache-rocketmq/conf/broker.conf

add a new line
brokerIP1=xx.xx.xx.xx  # your public IP

Then restart the process, restart the broker must use the configuration file to start
nohup sh bin/mqbroker -n localhost:9876 -c conf/broker.conf &

Meanwhile, if you use alicloud, you must release port 10909, dashboard port 9876 in the security rules

MAC: Clion configure C compiler Error: The C compiler identification is unknown

1 click let cmake detect

View error message:
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/apple/CLionProjects/untitled16
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - broken
CMake Error at /Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.17/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler
 
    "/usr/bin/cc"
 
  is not able to compile a simple test program.
 
  It fails with the following output:
 
    Change Dir: /Users/apple/CLionProjects/untitled16/cmake-build-debug/CMakeFiles/CMakeTmp
    
    Run Build Command(s):xxxx(can not find /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/include:)

2 view environment variables

cd ~
vim .bash_profile

It is found that the error path is cflags (I wonder why I set cflags to be a python library?) Solution: comment out this line of code. Result: Although there is no error message in red in this interface, the program still cannot be compiled

Replace c compiler [key to solving the problem]

View all gcc compiler paths

brew list gcc
/usr/local/Cellar/gcc/11.2.0/bin/c++-11
/usr/local/Cellar/gcc/11.2.0/bin/cpp-11
/usr/local/Cellar/gcc/11.2.0/bin/g++-11
/usr/local/Cellar/gcc/11.2.0/bin/gcc-11
/usr/local/Cellar/gcc/11.2.0/bin/gcc-ar-11
/usr/local/Cellar/gcc/11.2.0/bin/gcc-nm-11
/usr/local/Cellar/gcc/11.2.0/bin/gcc-ranlib-11
/usr/local/Cellar/gcc/11.2.0/bin/gcov-11
/usr/local/Cellar/gcc/11.2.0/bin/gcov-dump-11
/usr/local/Cellar/gcc/11.2.0/bin/gcov-tool-11
/usr/local/Cellar/gcc/11.2.0/bin/gdc
/usr/local/Cellar/gcc/11.2.0/bin/gdc-11
/usr/local/Cellar/gcc/11.2.0/bin/gfortran
/usr/local/Cellar/gcc/11.2.0/bin/gfortran-11
/usr/local/Cellar/gcc/11.2.0/bin/lto-dump-11
/usr/local/Cellar/gcc/11.2.0/bin/x86_64-apple-darwin20-c++-11
/usr/local/Cellar/gcc/11.2.0/bin/x86_64-apple-darwin20-g++-11
/usr/local/Cellar/gcc/11.2.0/bin/x86_64-apple-darwin20-gcc-11
/usr/local/Cellar/gcc/11.2.0/bin/x86_64-apple-darwin20-gcc-11.2.0
/usr/local/Cellar/gcc/11.2.0/bin/x86_64-apple-darwin20-gcc-ar-11
/usr/local/Cellar/gcc/11.2.0/bin/x86_64-apple-darwin20-gcc-nm-11
/usr/local/Cellar/gcc/11.2.0/bin/x86_64-apple-darwin20-gcc-ranlib-11
/usr/local/Cellar/gcc/11.2.0/bin/x86_64-apple-darwin20-gdc-11
/usr/local/Cellar/gcc/11.2.0/bin/x86_64-apple-darwin20-gfortran-11
/usr/local/Cellar/gcc/11.2.0/include/c++/ (796 files)
/usr/local/Cellar/gcc/11.2.0/lib/gcc/ (1304 files)
/usr/local/Cellar/gcc/11.2.0/libexec/gcc/ (15 files)
/usr/local/Cellar/gcc/11.2.0/share/gcc-11.2.0/ (4 files)
/usr/local/Cellar/gcc/11.2.0/share/man/ (12 files)

C compiler and C + + compiler use respectively:

/usr/local/Cellar/gcc/11.2.0/bin/gcc-11
/usr/local/Cellar/gcc/11.2.0/bin/g++-11

After selection, Clion automatically compiles and succeeds.

Linux apt-get update Error: Error in `appstreamcli‘: double free or corruption … Aborted (core dumped)

Reason:
the built-in libappstream of Ubuntu 16.0.4 is a version before 2.0. We must update it to a version above 3.0

Solution:

Clear libappstream3 (purge cleans more configuration files than remove)

sudo apt-get purge libappstream3

Operation results:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gnome-software-common libgtkspell3-3-0
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  appstream* gnome-software* libappstream3* ubuntu-software*
0 upgraded, 0 newly installed, 4 to remove and 281 not upgraded.
After this operation, 1,759 kB disk space will be freed.
Do you want to continue?[Y/n] y
(Reading database ... 214637 files and directories currently installed.)
Removing ubuntu-software (3.20.1+git20160420.1.ca63436.ubuntu-xenial-0ubuntu2) ...
Removing gnome-software (3.20.1+git20160420.1.ca63436.ubuntu-xenial-0ubuntu2) ...
Purging configuration files for gnome-software (3.20.1+git20160420.1.ca63436.ubuntu-xenial-0ubuntu2) ...
Removing appstream (0.9.4-1) ...
Purging configuration files for appstream (0.9.4-1) ...
rmdir: failed to remove '/var/cache/app-info/': Directory not empty
Removing libappstream3:amd64 (0.9.4-1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.48.2-0ubuntu4.8) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu11.3) ...
yg@ubuntu:~$ 

Continue:

sudo apt autoremove

result:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  gnome-software-common libgtkspell3-3-0
0 upgraded, 0 newly installed, 2 to remove and 280 not upgraded.
After this operation, 2,744 kB disk space will be freed.
Do you want to continue?[Y/n] y
(Reading database ... 214577 files and directories currently installed.)
Removing gnome-software-common (3.20.1+git20160420.1.ca63436.ubuntu-xenial-0ubuntu2) ...
Removing libgtkspell3-3-0:amd64 (3.0.7-2) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu11.3) ...

Execution:

sudo apt-get update

result:

yg@ubuntu:~$ sudo apt-get update
Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
Hit:2 http://mirrors.aliyun.com/ubuntu xenial InRelease
Hit:3 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease                  
Hit:4 http://mirrors.aliyun.com/ubuntu xenial-backports InRelease                
Hit:5 http://mirrors.aliyun.com/ubuntu xenial-security InRelease                 
Reading package lists... Done                     
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:4
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (multiverse/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:4
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (multiverse/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
yg@ubuntu:~$ 

No more mistakes

Failed to get HbA FCP target mapping in lanfree backup

Premise: dataark software lanfree backup
establishes a connection with the client through the FC card

First execute the following three commands

echo 1>/ sys/class/fc_ host/host15/issue_ lip
echo ‘- – -’ >/ sys/class/scsi_ host/host15/scan
/opt/scutech/dbackup3/bin/lsscsi

Then initiate the backup job in the client umount/MNT directory

VirtualBox reports an error supr3hardenedwinrespawn what 5 when opening the virtual machine

Phenomenon:

After installing virtuabox for the first time, you can open the software normally and successfully install the Ubuntu virtual machine. However, once you restart the computer (win10 enterprise 1607), open the VirtualBox software again and click start the virtual machine, an error will appear: “VirtualBox sur3hardenedwinrespawn what 5 Verr_ invalid_ name (-104)”

resolvent:

Open registry as administrator: regedit

Find HKEY_ LOCAL_ MACHINE\SYSTEM\CurrentControlSet\services\VBoxDrv

Change the start attribute value from 1 to 3

Create a script file, start_ VBoxDrv .bat

 

Script content:

@echo off

sc start vboxdrv

pause

Run start as Administrator_ Vboxdrv. Bat, and then restart the computer. After starting, run start again as an administrator_ Vboxdrv. Bat, and then you can use the VirtualBox virtual machine normally

Conclusion:

be careful:

Run start every time you restart the system_ Vboxdrv.bat, and then open the virtual machine to solve this problem

reference material:

https://forums.virtualbox.org/viewtopic.php?f=6&amp ; t=82277

Solutions to errors in ipvsadm startup

Centos7 Yum – y install ipvadm. After installing, start ipvsadm with an error.


# systemctl status ipvsadm. Service finally, I see a reliable solution. Manually generate this file:

ipvsadm --save > /etc/sysconfig/ipvsadm

Service ipvsadm start – confirm

[Solved] `handle_argument_error‘: ERROR: “rails console“ was called with arguments [“production“]

 

Problem background

An error occurs when gitlab modifies the root password:

`handle_ argument_ error’: ERROR: “rails console” was called with arguments [“production”] (Thor::InvocationError)

As shown in the figure:

Note that the following prompt: Usage: “rails console [options]” is incorrect

Change password normally

There are only two parameters in total. After trying, the correct instruction is as follows:

gitlab-rails console -e production

be accomplished!

Error while loading error while loading shared libraries [How to Solve]

Error while loading error while loading shared libraries solution

If it’s missing, find it and put it back

Distribution: archlinux
as stated in the title, take the yaourt encountered before writing this article as an example:

➜  ~ yaourt -Ss uswsusp
yaourt: error while loading shared libraries: libalpm.so.12

After looking at the in the system, I found that libalpm. So has been upgraded to 13

➜  ~ ls -l /usr/lib/libalpm.so*
lrwxrwxrwx 1 root root     13 Jul 16 03:26 /usr/lib/libalpm.so -> libalpm.so.13
lrwxrwxrwx 1 root root     17 Jul 16 03:26 /usr/lib/libalpm.so.13 -> libalpm.so.13.0.0
-rwxr-xr-x 1 root root 243608 Jul 16 03:26 /usr/lib/libalpm.so.13.0.0

Well, the problem is very simple. The library has been upgraded, but the dependent software developers have not upgraded.

Next, only three steps are required:
confirm the software from libalpm. So and download the old version (which may contain 12 generally open the package. You can directly find the corresponding link library and copy it to under /usr/Lib My detailed steps:
the search discovery may be in the Pacman package

➜  ~ pacman -Ss libalpm
core/pacman 6.0.0-5 (base-devel) [installed]
    A library-based package manager with dependency support
extra/pyalpm 0.10.6-1
    Python 3 bindings for libalpm
(..... Other insignificant packages)

To download the old software package of archlinux, you need to find it in arch archive.

In the /packages/P/Pacman/ directory, I tried to download the previous version of the current version (v6.0.0), pacman-5.2.2-4-x86_ 64.pkg.tar.zst

Open it directly and find libalpm. So. 12

finally, copy the extracted libalpm. So. * to /usr/lib ( Be careful not to copy the one without version suffix ( libalpm. So )

Mgr [error]: library file libdmhs_exec.so not found, error: 0

DM8 reports an error when building DMHS
Mgr [error]: library file libdmhs_ Exec.so not found, error: 0

DMHS> start exec
CSL[ERROR]: Failed to load execution module

view log

MGR[INFO]: Loading execution module...
MGR[ERROR]: Library file libdmhs_exec.so not found, Error: 0
MGR[ERROR]: Log execution failed to start

Solution:
LDD tracking library file

[dmdba@DM bin]$ ldd libdmhs_exec.so
	linux-vdso.so.1 =>  (0x00007ffe819f6000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f3897ed8000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f3897bd5000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f38979cd000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f38977b1000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f38975ac000)
	libdmhs_pub.so => ./libdmhs_pub.so (0x00007f3897280000)
	libdmhs_ucvt.so => ./libdmhs_ucvt.so (0x00007f3896d25000)
	libdmhs_dm_obj.so => ./libdmhs_dm_obj.so (0x00007f3896b0f000)
	libdmhs_cvt.so => ./libdmhs_cvt.so (0x00007f3896886000)
	libdodbc.so => /opt/dmdbms/bin/libdodbc.so (0x00007f389665a000)
	/lib64/ld-linux-x86-64.so.2 (0x0000563b938c3000)
	libdmhs_exp.so => ./libdmhs_exp.so (0x00007f3896284000)
	libdmhs_xml.so => ./libdmhs_xml.so (0x00007f3896075000)
	libdmoci.so => not found
	libdmdpi.so => /opt/dmdbms/bin/libdmdpi.so (0x00007f3895406000)
	libdmfldr.so => /opt/dmdbms/bin/libdmfldr.so (0x00007f38947d5000)
	libdmelog.so => /opt/dmdbms/bin/libdmelog.so (0x00007f38945ce000)
	libdmutl.so => /opt/dmdbms/bin/libdmutl.so (0x00007f38943bc000)
	libdmclientlex.so => /opt/dmdbms/bin/libdmclientlex.so (0x00007f3894189000)
	libdmos.so => /opt/dmdbms/bin/libdmos.so (0x00007f3893f5c000)
	libdmcvt.so => /opt/dmdbms/bin/libdmcvt.so (0x00007f389387d000)
	libdmstrt.so => /opt/dmdbms/bin/libdmstrt.so (0x00007f3893669000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f3893360000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f389314a000)
	libdmmem.so => /opt/dmdbms/bin/libdmmem.so (0x00007f3892f3c000)
	libdmcalc.so => /opt/dmdbms/bin/libdmcalc.so (0x00007f3892cb7000)

Libdmoci.so not found

[dmdba@DM bin]$ pwd
/home/dmdba/dmhs/bin
[dmdba@DM bin]$ find -name libdmoci.so
./stat/libdmoci.so
[dmdba@DM bin]$ cat /home/dmdba/.bash_profile 
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/dmdbms/bin"
export DM_HOME="/opt/dmdbms"
export DMHS_HOME=/home/dmdba/dmhs
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/dmdba/dmhs/bin
[dmdba@DM bin]$ cp ./stat/libdmoci.so ./

Find and find it in/home/dmdba/DMHS/bin/STAT/libdmoci.so, but LD_ LIBRARY_ Path is not specified in this directory. Copy libdmoci.so to LD_ LIBRARY_ Under the directory specified by path, or add LD_ LIBRARY_ The path points to/home/dmdba/DMHS/bin/STAT
(if find is not found, you need to download one online)

Try LDD it again

[dmdba@DM bin]$ ldd libdmhs_exec.so
	linux-vdso.so.1 =>  (0x00007ffcf27be000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f8c25479000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f8c25176000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f8c24f6e000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8c24d52000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f8c24b4d000)
	libdmhs_pub.so => ./libdmhs_pub.so (0x00007f8c24821000)
	libdmhs_ucvt.so => ./libdmhs_ucvt.so (0x00007f8c242c6000)
	libdmhs_dm_obj.so => ./libdmhs_dm_obj.so (0x00007f8c240b0000)
	libdmhs_cvt.so => ./libdmhs_cvt.so (0x00007f8c23e27000)
	libdodbc.so => /opt/dmdbms/bin/libdodbc.so (0x00007f8c23bfb000)
	/lib64/ld-linux-x86-64.so.2 (0x00005591fe1ef000)
	libdmhs_exp.so => ./libdmhs_exp.so (0x00007f8c23825000)
	libdmhs_xml.so => ./libdmhs_xml.so (0x00007f8c23616000)
	libdmoci.so => ./libdmoci.so (0x00007f8c22ba6000)
	libdmdpi.so => /opt/dmdbms/bin/libdmdpi.so (0x00007f8c21f38000)
	libdmfldr.so => /opt/dmdbms/bin/libdmfldr.so (0x00007f8c21307000)
	libdmelog.so => /opt/dmdbms/bin/libdmelog.so (0x00007f8c21100000)
	libdmutl.so => /opt/dmdbms/bin/libdmutl.so (0x00007f8c20eee000)
	libdmclientlex.so => /opt/dmdbms/bin/libdmclientlex.so (0x00007f8c20cbb000)
	libdmos.so => /opt/dmdbms/bin/libdmos.so (0x00007f8c20a8e000)
	libdmcvt.so => /opt/dmdbms/bin/libdmcvt.so (0x00007f8c203af000)
	libdmstrt.so => /opt/dmdbms/bin/libdmstrt.so (0x00007f8c2019b000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f8c1fe92000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f8c1fc7c000)
	libdmmem.so => /opt/dmdbms/bin/libdmmem.so (0x00007f8c1fa6e000)
	libdmcalc.so => /opt/dmdbms/bin/libdmcalc.so (0x00007f8c1f7e9000)

When it is normal, restart DMHS and try to start exec again

Apache Cannot Start: SSL Library Error: -8181 Certificate has expired

After the server restarts one day, Apache cannot start. Check the Apache error log:

cat /var/log/httpd/error_log

The following errors are found:

[Wed Aug 25 18:49:00.134257 2021] [:error] [pid 1607] SSL Library Error: -8181 Certificate has expired
[Wed Aug 25 18:49:00.134318 2021] [:error] [pid 1607] Unable to verify certificate 'Server-Cert'. Add "NSSEnforceValidCerts off" to nss.conf so the server can start until the problem can be resolved.

Use the following command to view the certificate information and find that the certificate has expired:

certutil -d /etc/httpd/alias -L -n Server-Cert
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 4 (0x4)
        Signature Algorithm: PKCS #1 SHA-256 With RSA Encryption
        Issuer: "CN=Certificate Shack,O=example.com,C=US"
        Validity:
            Not Before: Fri Jan 24 15:03:11 2017
            Not After : Wed Jan 24 15:03:11 2021

You can use temporary methods to solve this problem:
first set the certificate inspection prohibition, and then cancel this setting after the certificate is updated. Operation method:
add the nssenforcevalidcerts off setting in the/etc/httpd/conf.d/nss.conf file to temporarily cancel the certificate inspection.

The permanent solution is to regenerate the certificate. The command is as follows:

yum install httpd mod_nss
certutil -d /etc/httpd/alias -L -n Server-Cert
cd /etc/httpd/alias
rm -f *.db
/usr/sbin/gencert /etc/httpd/alias > /etc/httpd/alias/install.log 2>&1

Then check that the certificate expiration date is normal.

certutil -d /etc/httpd/alias -L -n Server-Cert
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 4 (0x4)
        Signature Algorithm: PKCS #1 SHA-256 With RSA Encryption
        Issuer: "CN=Certificate Shack,O=example.com,C=US"
        Validity:
            Not Before: Fri Aug 27 07:27:30 2021
            Not After : Wed Aug 27 07:27:30 2025

Try to start Apache and find that it still can’t be started. Check the error log again and find a new error report:

[Fri Aug 27 15:38:17.483837 2021] [:error] [pid 15043] Server user apache lacks read access to NSS key database /etc/httpd/alias/key3.db.

It should be that the Apache user does not have permission to the key3.db file
let’s check the file attributes:

ls -l /etc/httpd/alias/
total 88
-rw-------. 1 root root 65536 Oct 26 17:26 cert8.db
-rw-------. 1 root root    5872 Oct 26 17:26 install.log
-rw-------. 1 root root 16384 Oct 26 17:26 key3.db
lrwxrwxrwx. 1 root root      24 Nov 15 10:58 libnssckbi.so -> /usr/lib64/libnssckbi.so
-rw-------. 1 root root 16384 Oct 26 17:26 secmod.db

Then modify the attributes of all DB files in the/etc/httpd/alias/Directory:

chown :apache /etc/httpd/alias/*.db 
chmod u=rw,g=r  *.db

The effect is the same with the following two commands:

chown root.apache /etc/httpd/alias/*.db
chmod 0640 /etc/httpd/alias/*.db

After modification, check the properties of the DB file:

ls -l /etc/httpd/alias/
total 88
-rw-r-----. 1 root apache 65536 Oct 26 17:26 cert8.db
-rw-------. 1 root root    5872 Oct 26 17:26 install.log
-rw-r-----. 1 root apache 16384 Oct 26 17:26 key3.db
lrwxrwxrwx. 1 root root      24 Nov 15 10:58 libnssckbi.so -> /usr/lib64/libnssckbi.so
-rw-r-----. 1 root apache 16384 Oct 26 17:26 secmod.db

Finally, start Apache:

systemctl start httpd

Start successfully!