AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??

我這邊在配置的時候,預見下面的錯誤:

gerrit1@pc:/etc/apache2$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
   ...fail!
 * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
gerrit1@pc:/etc/apache2$

根據提示查找log:注意log在  /var/log/apache2 這個路徑下面

zhaojigao@pc:/var/log/apache2$ ls -l
總用量 8
-rw-r----- 1 root adm 190  1月 24 22:25 access.log
-rw-r----- 1 root adm 686  1月 24 22:29 error.log
-rw-r----- 1 root adm   0  1月 24 22:25 other_vhosts_access.log
zhaojigao@pc:/var/log/apache2$ cat error.log

zhaojigao@pc:/var/log/apache2$ cat error.log
[Thu Jan 24 22:25:08.854131 2019] [mpm_event:notice] [pid 5850:tid 140386707171200] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Thu Jan 24 22:25:08.854275 2019] [core:notice] [pid 5850:tid 140386707171200] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 24 22:29:48.731147 2019] [mpm_event:notice] [pid 5850:tid 140386707171200] AH00491: caught SIGTERM, shutting down
[Thu Jan 24 22:29:49.784471 2019] [proxy_balancer:emerg] [pid 6025:tid 140012646508416] AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
[Thu Jan 24 22:29:49.784522 2019] [:emerg] [pid 6025:tid 140012646508416] AH00020: Configuration Failed, exiting
[Thu Jan 24 22:32:17.631101 2019] [mpm_event:notice] [pid 6172:tid 140688010782592] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Thu Jan 24 22:32:17.631248 2019] [core:notice] [pid 6172:tid 140688010782592] AH00094: Command line: '/usr/sbin/apache2'
zhaojigao@pc:/var/log/apache2$ 

 

 發現主要報錯如下:AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??

然後在網上搜這個錯誤碼之後發現,有個博客上給出了原因:https://blog.csdn.net/snihcel/article/details/38844667

意思就是說啓動的時候需要加載 mod_slotmem_shm.so 文件,但是這個文件沒有找到。

但是找了好久發現 conf/httpd.conf 文件中並沒有它所說的那句話。最後經過分析發現處理方法如下:

gerrit1@pc:/etc/apache2$ grep -rn slotmem_shm_module  ./
./mods-available/slotmem_shm.load:1:LoadModule slotmem_shm_module /usr/lib/apache2/modules/mod_slotmem_shm.so
gerrit1@pc:/etc/apache2$ 
gerrit1@pc:/etc/apache2$ sudo ln -s /etc/apache2/mods-available/slotmem_shm.load /etc/apache2/mods-enabled/slotmem_shm.load
gerrit1@pc:/etc/apache2$ 
gerrit1@pc:/etc/apache2$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
   ...done.
gerrit1@pc:/etc/apache2$

首先grep 查找下這句話在哪個文件裏面,然後通過軟連接將這個文件鏈接進來即可。然後就可以正常啓動了

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章