Category Archives: Linux

[Solved] ioctl_cfg80211.c:1141:45: error: ‘struct wireless_dev’ has no member named ‘sme_state’

Environmental description

System: centos7 (3.10.0)

Driver version: 00014996-rtl8192eu_linux_v5.6.3.1_34030_COEX20171113-0047.20190613.zip

Network card: Realtek rtl8192eu

Error log

rtl8192EU_WiFi_linux_v5.6.3.1_34030.20190613_COEX20171113-0047/os_dep/linux/ioctl_cfg80211.c:1141:45: error: ‘struct wireless_dev’ has no member named ‘sme_state’
   RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
                                             ^

rtl8192EU_WiFi_linux_v5.6.3.1_34030.20190613_COEX20171113-0047/os_dep/linux/ioctl_cfg80211.c:1152:45: error: ‘struct wireless_dev’ has no member named ‘sme_state’
   RTW_INFO("pwdev->sme_state(a)=%d\n", pwdev->sme_state);
                                             ^

rtl8192EU_WiFi_linux_v5.6.3.1_34030.20190613_COEX20171113-0047/os_dep/linux/ioctl_cfg80211.c:1207:45: error: ‘struct wireless_dev’ has no member named ‘sme_state’
   RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
                                             ^

/home/w1206/RTL8192EU_linux_v5.6.3.1_34030_COEX20171113-0047.20190613/driver/rtl8192EU_WiFi_linux_v5.6.3.1_34030.20190613_COEX20171113-0047/os_dep/linux/ioctl_cfg80211.c:1209:12: error: ‘struct wireless_dev’ has no member named ‘sme_state’
   if (pwdev->sme_state == CFG80211_SME_CONNECTING) {
            ^
/home/w1206/RTL8192EU_linux_v5.6.3.1_34030_COEX20171113-0047.20190613/driver/rtl8192EU_WiFi_linux_v5.6.3.1_34030.20190613_COEX20171113-0047/os_dep/linux/ioctl_cfg80211.c:1209:27: error: ‘CFG80211_SME_CONNECTING’ undeclared (first use in this function)
   if (pwdev->sme_state == CFG80211_SME_CONNECTING) {
                           ^
/home/w1206/RTL8192EU_linux_v5.6.3.1_34030_COEX20171113-0047.20190613/driver/rtl8192EU_WiFi_linux_v5.6.3.1_34030.20190613_COEX20171113-0047/os_dep/linux/ioctl_cfg80211.c:1213:19: error: ‘struct wireless_dev’ has no member named ‘sme_state’
   } else if (pwdev->sme_state == CFG80211_SME_CONNECTED) {
                   ^
/home/w1206/RTL8192EU_linux_v5.6.3.1_34030_COEX20171113-0047.20190613/driver/rtl8192EU_WiFi_linux_v5.6.3.1_34030.20190613_COEX20171113-0047/os_dep/linux/ioctl_cfg80211.c:1213:34: error: ‘CFG80211_SME_CONNECTED’ undeclared (first use in this function)
   } else if (pwdev->sme_state == CFG80211_SME_CONNECTED) {
                                  ^

Solution:

Modify IOCTL_cfg80211.c

 	} else {
-		#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
+		#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) || defined(COMPAT_KERNEL_RELEASE) //change by wellnw 20211213
 		RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
 		#endif
 
@@ -1148,7 +1158,7 @@
 				, pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6
 				, pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6
 				, WLAN_STATUS_SUCCESS, GFP_ATOMIC);
-		#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
+		#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) || defined(COMPAT_KERNEL_RELEASE)//change by wellnw 20211213
 		RTW_INFO("pwdev->sme_state(a)=%d\n", pwdev->sme_state);
 		#endif
 	}
@@ -1203,7 +1213,7 @@
 	_enter_critical_bh(&pwdev_priv->connect_req_lock, &irqL);
 
 	if (padapter->ndev_unregistering || !rtw_wdev_not_indic_disco(pwdev_priv)) {
-		#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
+		#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) || defined(COMPAT_KERNEL_RELEASE)//change by wellnw 20211213
 		RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
 
 		if (pwdev->sme_state == CFG80211_SME_CONNECTING) {
@@ -1217,6 +1227,7 @@

[Solved] Docker failed to delete image error: no such image: CentOS

The docker image cannot be deleted. If you view the image through docker images, it clearly exists, but it cannot be deleted.

Deletion prompt: error: no such image: XXXXXXXX

The specific screenshots are as follows:

Problem solving:

get into

cd /var/lib/docker/image/overlay2/imagedb/content/sha256

This directory is all the image files in docker

Which to delete? Don’t panic, image ID in docker images can determine the image file.

Delete the file after confirmation: RM -rf + file name

After deletion, there is no in the docker images list.

error: inlining failed in call to always_inline [How to Solve]

When compiling an open source project DB engine paradigms,

The project GitHub address reported an error as follows

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h:10325:1: error: inlining failed in call to always_inline '__m256i _mm256_mmask_i32gather_epi32(__m256i, __mmask8, __m256i, const int*, int)': target specific option mismatch
 _mm256_mmask_i32gather_epi32 (__m256i __v1_old, __mmask8 __mask,

As soon as I see it, I’ll put cmakelists under the root directory of this project.txt

Add -mavx512vl! it’s awesome!

# Compiler flags for the different targets
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native -std=c++14 -fPIC -Wall -Wextra -Wno-psabi -fno-omit-frame-pointer -Wno-unknown-pragmas -mavx512vl")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -Wextra -fno-omit-frame-pointer -march=native -fdiagnostics-color -mavx512vl")

cstdio [Error] ‘::fpos_t‘ has not been declared [How to Solve]

2	0	C:\Users\Administrator\Desktop\abcd\main.cpp	In file included from main.cpp
99	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fpos_t' has not been declared
101	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::clearerr' has not been declared
102	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fclose' has not been declared
103	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::feof' has not been declared
104	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::ferror' has not been declared
105	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fflush' has not been declared
106	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fgetc' has not been declared
107	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fgetpos' has not been declared
108	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fgets' has not been declared
109	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fopen' has not been declared
110	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fprintf' has not been declared
111	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fputc' has not been declared
112	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fputs' has not been declared
113	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fread' has not been declared
114	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::freopen' has not been declared
115	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fscanf' has not been declared
116	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fseek' has not been declared
117	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fsetpos' has not been declared
118	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::ftell' has not been declared
119	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fwrite' has not been declared
120	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::getc' has not been declared
121	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::getchar' has not been declared
124	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::gets' has not been declared
126	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::perror' has not been declared
127	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::printf' has not been declared
128	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::putc' has not been declared
129	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::putchar' has not been declared
130	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::puts' has not been declared
131	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::remove' has not been declared
132	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::rename' has not been declared
133	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::rewind' has not been declared
134	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::scanf' has not been declared
135	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::setbuf' has not been declared
136	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::setvbuf' has not been declared
137	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::sprintf' has not been declared
138	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::sscanf' has not been declared
139	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::tmpfile' has not been declared
141	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::tmpnam' has not been declared
143	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::ungetc' has not been declared
144	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vfprintf' has not been declared
145	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vprintf' has not been declared
146	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vsprintf' has not been declared
175	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::snprintf' has not been declared
176	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vfscanf' has not been declared
177	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vscanf' has not been declared
178	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vsnprintf' has not been declared
179	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vsscanf' has not been declared
185	22	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '__gnu_cxx::snprintf' has not been declared
186	22	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '__gnu_cxx::vfscanf' has not been declared
187	22	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '__gnu_cxx::vscanf' has not been declared
188	22	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '__gnu_cxx::vsnprintf' has not been declared
189	22	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '__gnu_cxx::vsscanf' has not been declared
C:\Users\Administrator\Desktop\abcd\main.cpp	In function 'int main()':
5	30	C:\Users\Administrator\Desktop\abcd\main.cpp	[Error] 'freopen' was not declared in this scope
29		C:\Users\Administrator\Desktop\abcd\Makefile.win	recipe for target 'main.o' failed

The above problem is that there is a problem with the dev environment. After closing dev, open it again and you will be prompted

Solution, reinstall dev

[Solved] CentOS Network Card startup error: RTNETLINK answers: File exist

Error Messages:

Dec 09 15:26:16 test01 network[7599]: Bringing up loopback interface:  [  OK  ]
Dec 09 15:26:16 test01 network[7599]: Bringing up interface ens33:  Error: Connection activation failed: No suitable device found for this connection.
Dec 09 15:26:16 test01 network[7599]: [FAILED]
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 systemd[1]: network.service: control process exited, code=exited status=1
Dec 09 15:26:16 test01 systemd[1]: Failed to start LSB: Bring up/down networking.
Dec 09 15:26:16 test01 systemd[1]: Unit network.service entered failed state.
Dec 09 15:26:16 test01 systemd[1]: network.service failed.

 

Solution:
Stop NetworkManager service
systemctl stop NetworkManager
systemctl disable NetworkManager
restart network
systemctl restart network

Reason:
The reason for this failure under centos is that there is a conflict between the two services that start the network: network and NetworkManager, I think.
Fundamentally, the conflict is caused by NetworkMaganager (NM), so disable NetworkManager to solve it. Just restart it.

[Solved] Linux Service Start Error: *.service: Main process exited, code=exited, status=203/EXEC

Error when starting rocketmq service:

[root@rocketmq1-nameserver-test bin]# systemctl start rocketmq-nameserver
[root@rocketmq1-nameserver-test bin]# systemctl status rocketmq-nameserver
● rocketmq-nameserver.service - nameserver
   Loaded: loaded (/usr/lib/systemd/system/rocketmq-nameserver.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2021-12-10 18:47:05 CST; 3s ago
  Process: 2414 ExecStart=/home/rocketmq/bin/mqnamesrv (code=exited, status=203/EXEC)
 Main PID: 2414 (code=exited, status=203/EXEC)

Dec 10 18:47:05 rocketmq1-nameserver-test systemd[1]: Started nameserver.
Dec 10 18:47:05 rocketmq1-nameserver-test systemd[1]: rocketmq-nameserver.service: Main process exited, code=exited, status=203/EXEC
Dec 10 18:47:05 rocketmq1-nameserver-test systemd[1]: rocketmq-nameserver.service: Failed with result 'exit-code'.


First, use journalctl – Xe to view the detailed error reports:

[root@rocketmq1-nameserver-test bin]# journalctl -xe
Dec 10 18:47:05 rocketmq1-nameserver-test systemd[1]: Started nameserver.
-- Subject: rocketmq-nameserver.service Unit has ended start
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
-- 
-- rocketmq-nameserver.service Unit has ended start.
-- 
-- The start result is "done".
Dec 10 18:47:05 rocketmq1-nameserver-test systemd[2414]: rocketmq-nameserver.service: Failed to execute command: Permission denied
Dec 10 18:47:05 rocketmq1-nameserver-test systemd[2414]: rocketmq-nameserver.service: Failed at step EXEC spawning /home/rocketmq/bin/mqnamesrv: Permission denied
-- Subject: progression /home/rocketmq/bin/mqnamesrv could not be executed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
-- 
-- process /home/rocketmq/bin/mqnamesrv could not be executed and has failed.
-- 
-- The process returns an error code of 13.
Dec 10 18:47:05 rocketmq1-nameserver-test systemd[1]: rocketmq-nameserver.service: Main process exited, code=exited, status=203/EXEC
Dec 10 18:47:05 rocketmq1-nameserver-test systemd[1]: rocketmq-nameserver.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
-- 
-- The unit rocketmq-nameserver.service has entered the 'failed' state with result 'exit-code'.
Dec 10 18:47:05 rocketmq1-nameserver-test dbus-daemon[970]: [system] Activating service name='org.fedoraproject.Setroubleshootd' requested by ':1.4' (uid=0 pid=948 comm="/usr/sbin/sedispatch " label="system_u:system_r:auditd_t:s0") (using servicehelper)
Dec 10 18:47:05 rocketmq1-nameserver-test dbus-daemon[2417]: [system] Failed to reset fd limit before activating service: org.freedesktop.DBus.Error.AccessDenied: Failed to restore old fd limit: Operation not permitted
Dec 10 18:47:07 rocketmq1-nameserver-test dbus-daemon[970]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
Dec 10 18:47:07 rocketmq1-nameserver-test setroubleshoot[2417]: AnalyzeThread.run(): Cancel pending alarm
Dec 10 18:47:07 rocketmq1-nameserver-test setroubleshoot[2417]: failed to retrieve rpm info for /home/rocketmq/bin/mqnamesrv
Dec 10 18:47:07 rocketmq1-nameserver-test dbus-daemon[970]: [system] Activating service name='org.fedoraproject.SetroubleshootPrivileged' requested by ':1.94' (uid=995 pid=2417 comm="/usr/libexec/platform-python -Es /usr/sbin/setroub" label="system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023") (using servicehelper)
Dec 10 18:47:07 rocketmq1-nameserver-test dbus-daemon[2431]: [system] Failed to reset fd limit before activating service: org.freedesktop.DBus.Error.AccessDenied: Failed to restore old fd limit: Operation not permitted
Dec 10 18:47:09 rocketmq1-nameserver-test dbus-daemon[970]: [system] Successfully activated service 'org.fedoraproject.SetroubleshootPrivileged'
Dec 10 18:47:10 rocketmq1-nameserver-test setroubleshoot[2417]: SELinux is preventing /usr/lib/systemd/systemd from 'read, open' accesses on the file /home/rocketmq/bin/mqnamesrv. For complete SELinux messages run: sealert -l e1b1100f-c8cb-44d7-b3de-1559f1d87286
Dec 10 18:47:10 rocketmq1-nameserver-test setroubleshoot[2417]: SELinux is preventing /usr/lib/systemd/systemd from 'read, open' accesses on the file /home/rocketmq/bin/mqnamesrv.
                                                                  
                                                                  *****  Plugin restorecon (99.5 confidence) suggests   ************************
                                                                  
                                                                  If you want to fix the label. 
                                                                  /home/rocketmq/bin/mqnamesrv default label should be home_bin_t.
                                                                  Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
                                                                  Do
                                                                  # /sbin/restorecon -v /home/rocketmq/bin/mqnamesrv
                                                                  
                                                                  *****  Plugin catchall (1.49 confidence) suggests   **************************
                                                                  
                                                                  If you believe that systemd should be allowed read open access on the mqnamesrv file by default.
                                                                  Then you should report this as a bug.
                                                                  You can generate a local policy module to allow this access.
                                                                  Do
                                                                  allow this access for now by executing:
                                                                  # ausearch -c '(qnamesrv)' --raw | audit2allow -M my-qnamesrv
                                                                  # semodule -X 300 -i my-qnamesrv.pp


There is a passage:

Dec 10 18:47:07 rocketmq1-nameserver-test dbus-daemon[2431]: [system] Failed to reset fd limit before activating service: org.freedesktop.DBus.Error.AccessDenied: Failed to restore old fd limit: Operation not permitted
Dec 10 18:47:09 rocketmq1-nameserver-test dbus-daemon[970]: [system] Successfully activated service 'org.fedoraproject.SetroubleshootPrivileged'
Dec 10 18:47:10 rocketmq1-nameserver-test setroubleshoot[2417]: SELinux is preventing /usr/lib/systemd/systemd from 'read, open' accesses on the file /home/rocketmq/bin/mqnamesrv. For complete SELinux messages run: sealert -l e1b1100f-c8cb-44d7-b3de-1559f1d87286

As mentioned above, we run: sealert – L e1b1100f-c8cb-44d7-b3de-1559f1d87286

[root@rocketmq1-nameserver-test bin]# sealert -l e1b1100f-c8cb-44d7-b3de-1559f1d87286
SELinux is preventing /usr/lib/systemd/systemd from 'read, open' accesses on the file /home/rocketmq/bin/mqnamesrv.

*****  Plugin restorecon (99.5 confidence level) Recommended ******************************************

If you want to fix the tags. /home/rocketmq/bin/mqnamesrv the default tag should be home_bin_t.
Then you can run restorecon. access attempts may have stopped due to insufficient permissions to access the parent directory, in which case try changing the following command accordingly.
Do
# /sbin/restorecon -v /home/rocketmq/bin/mqnamesrv

***** plug-in catchall (1.49 confidence level) Recommended ********************************************

If you believe (qnamesrv) should allow _BASE_PATH read open access to the mqnamesrv file by default.
Then this should be reported as a bug.
A local policy module can be generated to allow this access.
Do
Temporarily allow this access execute: #ausearch -c '(qnamesrv)'--raw | audit2allow -M my-qnamesrv #semodule -X 300 -i my-qnamesrv.pp
Omit the following

The last sentence above is to run the command: #ausearch – C ‘(qnamesrv)’ – raw | audit2alow – m my qnamesrv semodule – x 300 – I my qnamesrv pp

However, after running, it still reports an error
after verifying the data, it is the problem of SELinux:
SELinux believes that binary files can only be executed from some locations, and my user-defined directory is not clearly marked as allowed. It var_ T from/SRV /* (I think) inherited the type.

To get an extensive list of current rules for all directories, you can run semanage fcontext — list

I added an exception using the following ansible task:

name: set SELinux permissions on ts3server binaries
sefcontext:
target: “/srv/teamspeak/versions/[^/]+/ts3server”
setype: bin_ tname: reload SELinux policy to ensure that ts3server is executable
command: restorecon -irv /srv/teamspeak/
when: tarball. Changed
you can achieve the same goal by using the command followed by semanage fcontext restorecon – IRV/SRV/TeamSpeak/
therefore, we need to add a rocketmq startup flag:

restorecon -irv /home/rocketmq/bin/

Restart service succeeded:

[root@rocketmq1-nameserver-test bin]# semodule -i my-qnamesrv.pp
[root@rocketmq1-nameserver-test bin]# systemctl start rocketmq-nameserver
[root@rocketmq1-nameserver-test bin]# systemctl status rocketmq-nameserver
● rocketmq-nameserver.service - nameserver
   Loaded: loaded (/usr/lib/systemd/system/rocketmq-nameserver.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2021-12-10 18:47:48 CST; 1min 15s ago
 Main PID: 2459 (mqnamesrv)
    Tasks: 36 (limit: 10931)
   Memory: 172.9M
   CGroup: /system.slice/rocketmq-nameserver.service
           ├─2459 /bin/sh /home/rocketmq/bin/mqnamesrv
           ├─2463 sh /home/rocketmq/bin/runserver.sh org.apache.rocketmq.namesrv.NamesrvStartup
           └─2480 /usr/local/jdk1.8.0_151/bin/java -server -Xms256m -Xmx256m -Xmn128m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSP

Error: Too many open files in system error [How to Solve]

Too many open files in system error handling scheme

Such system problems can be solved at the terminal as follows:
view file limits>

// Check the limit of files
launchctl limit maxfiles  // maxfiles  256   unlimited

Open administrator privileges with sudo

// use sudo to open the administator
sudo vim /etc/sysctl.conf

after entering the editing mode, paste and copy the following code, and then ESC exits the editing mode

// increase the limit
kern.maxfiles=65536
kern.maxfilesperproc=65536

input: WQ exit, and then restart the computer

[Solved] Gbase Install Error: service cgconfig is not exist on hosts

Gbase8a install Error:

Environmental Checking on gcluster nodes.
Cgconfig service is not exist on host [‘192.168.48.18’, ‘192.168.48.19’, ‘192.168.48.20’], resource manangement can not be used, continue ([Y,y]/[N,n])?

Check whether the following installation packages are installed, if they are missing, please install

yum list installed | grep libcgroup
yum list installed | grep libcgroup-tools

Install if missing

yum -y install libcgroup
yum -y install libcgroup-tools

Set CGroup service startup after installation

systemctl enable cgconfig.service

Start cgconfig service

systemctl start cgconfig.service 

Here if the execution reports an error.

Job for cgconfig.service failed because the control process exited with error code. See “systemctl status cgconfig.service” and “journalctl -xe” for details.

Then use the command to check the cause of the error

systemctl status cgconfig.service

If the reasons are as follows.

Error: cannot mount cpu to /cgroup/cpu: Device or resource busy
or
Failed to start Control Group configuration service.

then execute

cgclear - unload the cgroup filesystem
systemctl start cgconfig.service

Then restart the installer.

[Solved] Error in invoking target ‘agent nmhs‘ of makefile

Error in invoking target ‘agent nmhs’ of makefile when installing Oracle 11g in Linux 7

Solution
add parameters linking libnnz11 Library in makefile
Modify $Oracle_HOME/sysman/lib/ins_ emagent. MK, modify
$(mk_event_nmectl) to $(mk_event_nmectl) – lnnz11
it is recommended to back up the original file before modification
[ oracle@ysserver ~]$ cd $ORACLE_ HOME/sysman/lib
[ oracle@ysserver lib]$ cp ins_emagent.mk ins_emagent.mk.bak
[ oracle@ysserver lib]$ vi ins_emagent. mk

After entering the VI editor, enter/nmectl in the command mode to quickly locate the line to be modified
append parameters -lnnz11 þ the first is the letter L þ the last two are the numbers 1

Save and exit retry