我有一台安装了 redmine 的 Ubuntu 服务器。我不知道具体细节,因为另一个人安装了所有东西,但他不再与我们合作了。
我们重启了服务器进行维护,此后 redmine 无法启动。当我指向该服务器地址时,浏览器上出现了 NGINX 错误页面:
We're sorry, but something went wrong.
The issue has been logged for investigation. Please try again later.
Technical details for the administrator of this website
Error ID:
dbda8097
Details:
Web application could not be started by the Phusion Passenger application server.
Please read the Passenger log file (search for the Error ID) to find the details of the error.
You can also get a detailed report to appear directly on this page, but for security reasons it is only provided if Phusion Passenger is run with environment set to development and/or with the friendly error pages option set to on.
For more information about configuring environment and friendly error pages, see:
Nginx integration mode
Apache integration mode
Standalone mode
因此我去/opt/nginx/logs/error.log
检查错误,并获取与该 ID 相关的以下片段。
App 1388 output: /usr/local/rvm/gems/ruby-2.3.8/gems/passenger-6.0.4/src/helper-scripts/rack-preloader.rb:29:in `<main>'
[ E 2020-06-23 13:47:54.8167 1104/Tm age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/data/redmine: The application encountered the following error: Child already added (RuntimeError)
Error ID: dbda8097
Error details saved to: /tmp/passenger-error-Gfstmf.html
[ E 2020-06-23 13:47:54.8234 1104/T9 age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 1-3] Cannot checkout session because a spawning error occurred. The identifier of the error is dbda8097. Please see earlier logs for details about the error.
该文件/tmp/passenger-error-Gfstmf.html
不存在所以我无法检查其内容。
我不知道错误是什么意思。
这是配置文件nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /usr/local/rvm/gems/ruby-2.3.8/gems/passenger-6.0.4;
passenger_ruby /usr/local/rvm/gems/ruby-2.3.8/wrappers/ruby;
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
root /var/data/redmine/public;
passenger_enabled on;
client_max_body_size 10m;
}
}
重启之前此文件未被修改。
我应该从哪里开始检查?我已经看到此文件中引用的所有文件夹都存在,并且我不认为这是 redmine 的问题,而是 ngix 的问题,因为它在其日志中,而不是 redmine 日志中。
我应该怎么做才能调试并解决这个问题?