簡體   English   中英

(apache2.service 的作業失敗,因為控制進程退出並出現錯誤代碼)在嘗試激活 webdav 模塊后發生

[英](Job for apache2.service failed because the control process exited with error code) occured after trying to activate webdav module

我試圖啟動我的 apache 網絡服務器,但我不能。 每次我輸入:

sservice apache2 start

我得到錯誤:

Job for apache2.service failed because the control process exited with error code.

在我嘗試激活 apache2 的 WebDAV 模塊后,我第一次收到錯誤。 但我已經停用了它。 我也重新啟動了服務器,但沒有效果。

我在我的第二台電腦上運行 apache 並通過 SSH 訪問它。

這是我的日志文件:

--
-- A start job for unit phpsessionclean.service has begun execution.
--
-- The job identifier is 1448.
Jul 28 18:39:31 Server-MS-7B28 systemd[1]: phpsessionclean.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit phpsessionclean.service has successfully entered the 'dead' state.
Jul 28 18:39:31 Server-MS-7B28 systemd[1]: Finished Clean php session files.
-- Subject: A start job for unit phpsessionclean.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit phpsessionclean.service has finished successfully.
--
-- The job identifier is 1448.
Jul 28 18:40:25 Server-MS-7B28 sshd[2785]: Received disconnect from 222.186.31.166 port 58094:11:  [preauth]
Jul 28 18:40:25 Server-MS-7B28 sshd[2785]: Disconnected from 222.186.31.166 port 58094 [preauth]
Jul 28 18:40:37 Server-MS-7B28 sshd[2787]: Received disconnect from 112.85.42.104 port 12119:11:  [preauth]
Jul 28 18:40:37 Server-MS-7B28 sshd[2787]: Disconnected from 112.85.42.104 port 12119 [preauth]
Jul 28 18:41:43 Server-MS-7B28 sudo[2793]: pam_unix(sudo:auth): Couldn't open /etc/securetty: Datei oder Verzeichnis nicht gefunden
Jul 28 18:41:46 Server-MS-7B28 sudo[2793]: pam_unix(sudo:auth): Couldn't open /etc/securetty: Datei oder Verzeichnis nicht gefunden
Jul 28 18:41:46 Server-MS-7B28 sudo[2793]: elias-server : TTY=pts/0 ; PWD=/home/elias-server ; USER=root ; COMMAND=/bin/bash
Jul 28 18:41:46 Server-MS-7B28 sudo[2793]: pam_unix(sudo:session): session opened for user root by elias-server(uid=0)
Jul 28 18:41:53 Server-MS-7B28 audit[2808]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/lib/snapd/snap-confine" pid=2808 comm="apparmor_parser"
Jul 28 18:41:53 Server-MS-7B28 audit[2808]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=28>
Jul 28 18:41:53 Server-MS-7B28 kernel: audit: type=1400 audit(1595954513.320:3245): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/lib/snapd/snap-confine" pi>
Jul 28 18:41:53 Server-MS-7B28 kernel: audit: type=1400 audit(1595954513.320:3246): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/lib/snapd/snap-confine//mo>
Jul 28 18:42:09 Server-MS-7B28 systemd[1]: Starting The Apache HTTP Server...
-- Subject: A start job for unit apache2.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit apache2.service has begun execution.
--
-- The job identifier is 1515.
Jul 28 18:42:09 Server-MS-7B28 apachectl[2837]: AH00526: Syntax error on line 32 of /etc/apache2/sites-enabled/000-default.conf:
Jul 28 18:42:09 Server-MS-7B28 apachectl[2837]: Invalid command 'DAV', perhaps misspelled or defined by a module not included in the server configuration
Jul 28 18:42:09 Server-MS-7B28 apachectl[2817]: Action 'start' failed.
Jul 28 18:42:09 Server-MS-7B28 apachectl[2817]: The Apache error log may have more information.
Jul 28 18:42:09 Server-MS-7B28 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit apache2.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Jul 28 18:42:09 Server-MS-7B28 systemd[1]: apache2.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit apache2.service has entered the 'failed' state with result 'exit-code'.
Jul 28 18:42:09 Server-MS-7B28 systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: A start job for unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit apache2.service has finished with a failure.
--
-- The job identifier is 1515 and the job result is failed.

謝謝你的幫助,埃利亞斯

檢查端口 80 是否已被使用。 參考鏈接了解更多

使用它來停止所有 docker 容器 docker stop $(docker ps -a -q)

問題是因為一些配置文件被刪除了,你必須重新安裝它。

重新安裝 APACHE2:

要替換已刪除的配置文件,而不清除 package,您可以執行以下操作:

sudo apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2

要完全刪除 apache2 配置文件,您應該:

sudo apt-get purge apache2

然后,您可以通過以下方式以通常的方式重新安裝它:

sudo apt-get install apache2

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM