信息:
- 使用的 Zammad 版本:6.2.0-1704877727.2bda00c4.focal
- 所用 Zammad 安装类型:软件包 操作系统:Ubuntu 20.04 浏览器+版本:Brave、Edge、Firefox
我在虚拟机中运行 Zammad 实例。主机是 Windows 10。由于更新而强制重启 Windows 后,我再次使用 Zammad 启动了 VM。通常可以正常工作,但现在我在浏览器中收到错误 503。在 apache2 日志中,我看到 zammad 的其中一个 Web 服务存在问题:
[Fri Jan 12 12:58:11.766781 2024] [proxy:error] [pid 1057:tid 140234859714304] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:3000 (127.0.0.1) failed
[Fri Jan 12 12:58:11.766820 2024] [proxy_http:error] [pid 1057:tid 140234859714304] [client 192.168.178.39:60787] AH01114: HTTP: failed to make connection to backend: 127.0.0.1
[Fri Jan 12 12:58:12.489425 2024] [proxy:error] [pid 1057:tid 140234842928896] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:3000 (127.0.0.1) failed
[Fri Jan 12 12:58:12.489467 2024] [proxy_http:error] [pid 1057:tid 140234842928896] [client 192.168.178.39:60788] AH01114: HTTP: failed to make connection to backend: 127.0.0.1
在端口 3000 的环回上运行的服务是:zammad-web.service 这已在 ss -tulpen 中得到确认
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
udp UNCONN 0 0 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=699,fd=12)) uid:101 ino:21708 sk:1 <->
udp UNCONN 0 0 192.168.178.65%enp0s3:68 0.0.0.0:* users:(("systemd-network",pid=697,fd=19)) uid:100 ino:23741 sk:2 <->
udp UNCONN 0 0 [fe80::a00:27ff:feec:3515]%enp0s3:546 [::]:* users:(("systemd-network",pid=697,fd=20)) uid:100 ino:23798 sk:3 v6only:1 <->
tcp LISTEN 0 80 127.0.0.1:3306 0.0.0.0:* users:(("mysqld",pid=906,fd=18)) uid:114 ino:26342 sk:4 <->
tcp LISTEN 0 10 127.0.0.1:587 0.0.0.0:* users:(("sendmail-mta",pid=1201,fd=5)) ino:27911 sk:5 <->
tcp LISTEN 0 511 127.0.0.1:6379 0.0.0.0:* users:(("redis-server",pid=998,fd=6)) uid:116 ino:24554 sk:6 <->
tcp LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=699,fd=13)) uid:101 ino:21709 sk:7 <->
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=925,fd=3)) ino:26789 sk:8 <->
tcp LISTEN 0 10 127.0.0.1:25 0.0.0.0:* users:(("sendmail-mta",pid=1201,fd=4)) ino:27910 sk:9 <->
tcp LISTEN 0 100 127.0.0.1:6042 0.0.0.0:* users:(("ruby",pid=8569,fd=9)) uid:997 ino:64526 sk:a <->
tcp LISTEN 0 511 [::1]:6379 [::]:* users:(("redis-server",pid=998,fd=7)) uid:116 ino:24555 sk:b v6only:1 <->
tcp LISTEN 0 4096 [::ffff:127.0.0.1]:9200 *:* users:(("java",pid=719,fd=162)) uid:115 ino:28420 sk:c v6only:0 <->
tcp LISTEN 0 4096 [::1]:9200 [::]:* users:(("java",pid=719,fd=161)) uid:115 ino:28419 sk:d v6only:1 <->
tcp LISTEN 0 511 *:80 *:* users:(("apache2",pid=1060,fd=4),("apache2",pid=1059,fd=4),("apache2",pid=1058,fd=4)) ino:28683 sk:e v6only:0 <->
tcp LISTEN 0 4096 [::ffff:127.0.0.1]:9300 *:* users:(("java",pid=719,fd=159)) uid:115 ino:30734 sk:f v6only:0 <->
tcp LISTEN 0 4096 [::1]:9300 [::]:* users:(("java",pid=719,fd=158)) uid:115 ino:30727 sk:10 v6only:1 <->
tcp LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=925,fd=4)) ino:26791 sk:11 v6only:1 <->
tcp LISTEN 0 511 *:443 *:* users:(("apache2",pid=1060,fd=6),("apache2",pid=1059,fd=6),("apache2",pid=1058,fd=6)) ino:28687 sk:12 v6only:0 <->
没有端口 3000。
systemctl 显示该服务已启动并正在运行:
sudo systemctl status zammad-web
● zammad-web.service
Loaded: loaded (/etc/systemd/system/zammad-web.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-01-12 16:35:39 UTC; 3h 48min ago
Main PID: 759 (sleep)
Tasks: 1 (limit: 9425)
Memory: 264.0K
CGroup: /system.slice/zammad-web.service
└─759 /bin/sleep infinity
Jan 12 16:35:39 helpdeskadmin systemd[1]: Started zammad-web.service.
我尝试用 PID 杀死它,但没有成功
ps aux | grep zammad-web.service
helpdes+ 148790 0.0 0.0 6440 720 pts/0 S+ 09:35 0:00 grep --color=auto zammad-web.service
sudo kill 148790
kill: (148790): No such process
...找不到它,所以我跑了sudo journalctl -xe
,在我看来,该服务正在非常快地重启并进入死亡状态。
A start job for unit zammad-web-1.service has finished successfully.
--
-- The job identifier is 505980.
Jan 14 13:33:42 helpdeskadmin zammad-web-1.service[172119]: Could not find server ''.
Jan 14 13:33:42 helpdeskadmin zammad-web-1.service[172119]: Run `bin/rails server --help` for more options.
Jan 14 13:33:42 helpdeskadmin systemd[1]: zammad-web-1.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit zammad-web-1.service has successfully entered the 'dead' state.
Jan 14 13:33:42 helpdeskadmin systemd[1]: zammad-web-1.service: Scheduled restart job, restart counter is at 5313.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit zammad-web-1.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jan 14 13:33:42 helpdeskadmin systemd[1]: Stopped zammad-web-1.service.
-- Subject: A stop job for unit zammad-web-1.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit zammad-web-1.service has finished.
--
-- The job identifier is 506075 and the job result is done.
Jan 14 13:33:42 helpdeskadmin systemd[1]: Started zammad-web-1.service.
-- Subject: A start job for unit zammad-web-1.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit zammad-web-1.service has finished successfully.
--
-- The job identifier is 506075.
Jan 14 13:33:43 helpdeskadmin sudo[172089]: helpdeskadmin : TTY=pts/0 ; PWD=/home/helpdeskadmin ; USER=root ; COMMAND=/usr/bin/journalctl -xe
Jan 14 13:33:43 helpdeskadmin sudo[172089]: pam_unix(sudo:session): session opened for user root by helpdeskadmin(uid=0)
有人有想法吗?