zepho
New Pleskian
Hey together,
a few weeks ago I had to restore a server. We run nginx as reverse proxy and were not able to start nginx the normal way. After:
Journal-log is complaining about an "argument" concerning the test command.
So I took a look at /lib/systemd/system/nginx.service:
Without further testing, it looks to me like $NGINX_ENABLED is not defined.
To get nginx to start I comment it out to:
With that quirky patch everything worked fine the last weeks. But I am wondering what causes the problem.
"plesk repair" and "plesk sbin nginxmng --enable" already happend.
My specs:
- Debian v8.4
- Plesk v12.5.30_build1205150826.19 os_Debian 8.0
- nginx v1.11.1
What am I missing? Can you help me?
Any suggestions?
Thanks in advance.
a few weeks ago I had to restore a server. We run nginx as reverse proxy and were not able to start nginx the normal way. After:
Code:
systemctl restart nginx.service
Journal-log is complaining about an "argument" concerning the test command.
Code:
● nginx.service - Startup script for nginx service
Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
Active: failed (Result: exit-code) since Tue 2016-07-26 02:36:56 CEST; 2min 57s ago
Process: 2838 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)
Process: 2842 ExecStartPre=/usr/bin/test $NGINX_ENABLED = yes (code=exited, status=2)
Main PID: 2023 (code=exited, status=0/SUCCESS)
... sub.host.tld test[2842]: /usr/bin/test: missing argument after ‘yes’
... sub.host.tld systemd[1]: nginx.service: control process exited, code=exited status=2
... sub.host.tld systemd[1]: Failed to start Startup script for nginx service.
... sub.host.tld systemd[1]: Unit nginx.service entered failed state.
So I took a look at /lib/systemd/system/nginx.service:
Code:
ExecStartPre=/usr/bin/test $NGINX_ENABLED = "yes"
ExecStartPre=/usr/sbin/nginx -t
ExecStart=/usr/sbin/nginx
ExecReload=/usr/bin/test $NGINX_ENABLED = "yes"
ExecReload=/usr/sbin/nginx -t
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
Without further testing, it looks to me like $NGINX_ENABLED is not defined.
To get nginx to start I comment it out to:
Code:
#ExecStartPre=/usr/bin/test $NGINX_ENABLED = "yes"
ExecStartPre=/usr/sbin/nginx -t
ExecStart=/usr/sbin/nginx
#ExecReload=/usr/bin/test $NGINX_ENABLED = "yes"
ExecReload=/usr/sbin/nginx -t
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
With that quirky patch everything worked fine the last weeks. But I am wondering what causes the problem.
"plesk repair" and "plesk sbin nginxmng --enable" already happend.
My specs:
- Debian v8.4
- Plesk v12.5.30_build1205150826.19 os_Debian 8.0
- nginx v1.11.1
What am I missing? Can you help me?
Any suggestions?
Thanks in advance.