【发布时间】:2020-01-20 12:44:10
【问题描述】:
我最近请求更改我的 root 密码,这很成功,我可以在控制台上使用它。但是,我的 IP 地址停止工作。访问我的域和 SSH 都响应连接超时错误。
在我更改 root 密码并重新启动服务器之前,它工作正常。
我使用这个命令检查了错误日志:
tail -50 /var/log/apache2/error.log
这就是我得到的:
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 994] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Jan 20 00:47:06.157921 2020] [core:notice] [pid 994] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 981] AH00169: caught SIGTERM, shutting down
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 970] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Jan 20 00:47:06.157921 2020 [core:notice] [pid 970] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 903] AH00169: caught SIGTERM, shutting down
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 903] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Jan 20 00:47:06.157921 2020] [core:notice] [pid 994] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 994] AH00169: caught SIGTERM, shutting down
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 970] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Jan 20 00:47:06.157921 2020] [core:notice] [pid 990] AH00094: Command line: '/usr/sbin/apache2'
注意到SIGTERM, shutting down了吗?我认为 Apache 正在崩溃并且服务正在自动重启。
一开始我以为是内存占用低的结果,后来我用这个命令检查了free -mh
这里是结果。我的 Ram 就足够了:
total used free shared buff/cache available
Mem: 1.9G 259M 1.4G 612K 258M 1.6G
Swap: 0B 0B 0B
防火墙处于非活动状态,因此没有任何东西阻塞端口 80
sudo ufw status
Status: Inactive
我也运行这个命令来查看正在收听的内容
sudo lsof -iTCP -sTCP:LISTEN -P
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sshd 812 root 3u IPv4 18468 0t0 TCP localhost:53 (LISTEN)
sshd 812 root 4u IPv6 18468 0t0 TCP *:22 (LISTEN)
mysqld 899 mysql 29u IPv4 19368 0t0 TCP localhost:3306 (LISTEN)
master 1089 root 13u IPv4 19478 0t0 TCP *:25 (LISTEN)
master 1089 root 14u IPv6 19479 0t0 TCP *:25 (LISTEN)
我可以成为我的 Apache 配置吗?
这是我的 /etc/apache2/ports.conf 上正在收听的内容
grep "Listen" /etc/apache2/*.conf
etc/apache2/ports.conf: Listen 0.0.0.0
etc/apache2/ports.conf: Listen 433
etc/apache2/ports.conf: Listen 433
我什至无法重新启动 apache,它不允许我
service apache2 restart
Job for apache2.service failed because the control proccess exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
在运行该命令时,我得到了这个:
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset
Drop-In: /lib/systemd/system/apache2.service.d
apache-system.conf
Active: failed (Result: exit-code) since Mon 2020-01-20 12:16:35 UTC; 4min 9s
Process: 1616 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE
这正常吗?请帮忙
【问题讨论】:
标签: apache digital-ocean