Rootop 服务器运维与web架构

ubuntu中atp安装的openproject意外断电后无法启动,访问提示503错误

浏览器访问80时实际是通过apache反向代理的6000端口,netstat查看监听端口6000并没有监听,说明openproject的web服务并未启动。

通过手动启动查看是否有报错

root@rd:/opt/openproject# /usr/bin/openproject run web
=> Booting Puma
=> Rails 7.1.4.1 application starting in production 
=> Run `bin/rails server --help` for more startup options
A server is already running. Check /opt/openproject/tmp/pids/server.pid.
Exiting

提示已经在运行,实际是因为pid文件没有正确关闭删除,导致pid文件存在。
将其删除后再次启动。

root@rd:/opt/openproject# cd /opt/openproject/tmp/pids
root@rd:/opt/openproject/tmp/pids# ll
total 12
drwxrwxr-x 2 openproject openproject 4096 Dec  9 00:44 ./
drwxr-xr-x 6 openproject openproject 4096 Dec 11 01:47 ../
-rw-r--r-- 1 openproject openproject    4 Dec  9 00:44 server.pid
root@rd:/opt/openproject/tmp/pids# rm -f server.pid 

root@rd:/opt/openproject/tmp/pids# systemctl start openproject.service
systemctl start openproject-web-1.service
systemctl start openproject-web.service
systemctl start openproject-worker-1.service
systemctl start openproject-worker.service
root@rd:/opt/openproject/tmp/pids# ll
total 8
drwxrwxr-x 2 openproject openproject 4096 Dec 11 03:30 ./
drwxr-xr-x 6 openproject openproject 4096 Dec 11 01:47 ../

启动需要一定时间
root@rd:/opt/openproject/tmp/pids# ll
total 12
drwxrwxr-x 2 openproject openproject 4096 Dec 11 03:32 ./
drwxr-xr-x 6 openproject openproject 4096 Dec 11 01:47 ../
-rw-r--r-- 1 openproject openproject    4 Dec 11 03:32 server.pid
root@rd:/opt/openproject/tmp/pids# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:45432         0.0.0.0:*               LISTEN      3179/postgres       
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      788/systemd-resolve 
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      819/memcached       
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      891/sshd: /usr/sbin 
tcp        0      0 127.0.0.1:6000          0.0.0.0:*               LISTEN      6270/puma 6.4.3 (tc 
tcp        0      0 127.0.0.1:6011          0.0.0.0:*               LISTEN      6166/sshd: rd@pts/2 
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      1219/sshd: rd@pts/0 
tcp6       0      0 ::1:6010                :::*                    LISTEN      1219/sshd: rd@pts/0 
tcp6       0      0 ::1:6011                :::*                    LISTEN      6166/sshd: rd@pts/2 
tcp6       0      0 :::80                   :::*                    LISTEN      993/apache2         
tcp6       0      0 :::22                   :::*                    LISTEN      891/sshd: /usr/sbin 
root@rd:/opt/openproject/tmp/pids# 

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/5506.html

作者:Venus

服务器运维与性能优化

评论已关闭。