ターミナルからWebサーバーがダウンした後にApache2を起動しようとしています
Sudo service Apache2 restart
しかし、それは言う
Job for Apache2.service failed because the control process exited with error code. See "systemctl status Apache2.service" and "journalctl -xe" for details.
journalctl -xe
を実行してみると
Nov 11 15:39:39 sd-101534 sshd[7011]: PAM service(sshd) ignoring max retries; 6 > 3
Nov 11 15:39:39 sd-101534 sshd[7013]: Failed password for root from 58.218.198.169 port 61692 ssh2
Nov 11 15:39:39 sd-101534 sshd[7013]: Received disconnect from 58.218.198.169 port 61692:11: [preauth]
Nov 11 15:39:39 sd-101534 sshd[7013]: Disconnected from 58.218.198.169 port 61692 [preauth]
Nov 11 15:39:39 sd-101534 sshd[7013]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=58.218.198.169 user=root
Nov 11 15:39:40 sd-101534 sshd[7015]: Failed password for root from 58.242.83.32 port 58820 ssh2
Nov 11 15:39:43 sd-101534 sshd[7035]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=58.242.83.20 user=root
Nov 11 15:39:43 sd-101534 sshd[7015]: Failed password for root from 58.242.83.32 port 58820 ssh2
Nov 11 15:39:43 sd-101534 sshd[7015]: error: maximum authentication attempts exceeded for root from 58.242.83.32 port 58820 ssh2 [preauth]
Nov 11 15:39:43 sd-101534 sshd[7015]: Disconnecting: Too many authentication failures [preauth]
Nov 11 15:39:43 sd-101534 sshd[7015]: PAM 5 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=58.242.83.32 user=root
Nov 11 15:39:43 sd-101534 sshd[7015]: PAM service(sshd) ignoring max retries; 6 > 3
Nov 11 15:39:45 sd-101534 sshd[7035]: Failed password for root from 58.242.83.20 port 37618 ssh2
Nov 11 15:39:48 sd-101534 sshd[7035]: Failed password for root from 58.242.83.20 port 37618 ssh2
Nov 11 15:39:48 sd-101534 sshd[7039]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=58.242.83.32 user=root
Nov 11 15:39:50 sd-101534 sshd[7039]: Failed password for root from 58.242.83.32 port 17432 ssh2
Nov 11 15:39:50 sd-101534 sshd[7035]: Failed password for root from 58.242.83.20 port 37618 ssh2
Nov 11 15:39:51 sd-101534 sshd[7037]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=58.218.198.169 user=root
Nov 11 15:39:52 sd-101534 sshd[7037]: Failed password for root from 58.218.198.169 port 48911 ssh2
Nov 11 15:39:52 sd-101534 sshd[7039]: Failed password for root from 58.242.83.32 port 17432 ssh2
Nov 11 15:39:53 sd-101534 sshd[7035]: Failed password for root from 58.242.83.20 port 37618 ssh2
Nov 11 15:39:55 sd-101534 Sudo[7041]: jazuly : TTY=pts/0 ; PWD=/home/jazuly ; USER=root ; COMMAND=/bin/journalctl -xe
Nov 11 15:39:55 sd-101534 Sudo[7041]: pam_unix(Sudo:session): session opened for user root by jazuly(uid=0)
その後、nano /var/log/Apache2/error.log
を実行します
私はこれを得た
$[Sat Nov 11 15:31:10.188122 2017] [mpm_prefork:notice] [pid 797] AH00169: caught SIGTERM, shutting down
Sudo systemctl status Apache2.service
を実行します
● Apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/Apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/Apache2.service.d
└─Apache2-systemd.conf
Active: failed (Result: exit-code) since Sat 2017-11-11 15:42:06 CET; 16min ago
Docs: man:systemd-sysv-generator(8)
Process: 6744 ExecStop=/etc/init.d/Apache2 stop (code=exited, status=0/SUCCESS)
Process: 25897 ExecReload=/etc/init.d/Apache2 reload (code=exited, status=0/SUCCESS)
Process: 7132 ExecStart=/etc/init.d/Apache2 start (code=exited, status=1/FAILURE)
Nov 11 15:42:06 sd-101534 Apache2[7132]: * The Apache2 configtest failed.
Nov 11 15:42:06 sd-101534 Apache2[7132]: Output of config test was:
Nov 11 15:42:06 sd-101534 Apache2[7132]: AH00526: Syntax error on line 12 of /etc/Apache2/mods-enabled/mpm_prefork.conf:
Nov 11 15:42:06 sd-101534 Apache2[7132]: Invalid command 'MazClients', perhaps misspelled or defined by a module not included in the server configuration
Nov 11 15:42:06 sd-101534 Apache2[7132]: Action 'configtest' failed.
Nov 11 15:42:06 sd-101534 Apache2[7132]: The Apache error log may have more information.
Nov 11 15:42:06 sd-101534 systemd[1]: Apache2.service: Control process exited, code=exited status=1
Nov 11 15:42:06 sd-101534 systemd[1]: Failed to start LSB: Apache2 web server.
Nov 11 15:42:06 sd-101534 systemd[1]: Apache2.service: Unit entered failed state.
Nov 11 15:42:06 sd-101534 systemd[1]: Apache2.service: Failed with result 'exit-code'.
私のウェブを通常に戻すために私がしなければならないこと。
無効な設定オプションがあります。これが、Apacheが起動できず、'configtest' failed
と表示される理由です。実際にsystemctl status
から出力を読み取ることで、通常、このような問題を特定し、ソフトウェアが適切に実行されていない主要な理由を特定するのに十分です。私はいつもそれを見ます。
とはいえ、これはsystemctl
ステータス出力で詳述されている特定のエラーです。
Nov 11 15:42:06 sd-101534 Apache2[7132]: AH00526: Syntax error on line 12 of /etc/Apache2/mods-enabled/mpm_prefork.conf:
Nov 11 15:42:06 sd-101534 Apache2[7132]: Invalid command 'MazClients', perhaps misspelled or defined by a module not included in the server configuration
参照するファイル(/etc/Apache2/mods-enabled/mpm_prefork.conf
)を編集し、MazClients
をMaxClients
に置き換えてから、Apacheを再起動してください。実際の問題は、MySQLではなくMPM Preforkにあるように思えます。