Service NGINX down |NGINX service failed to restart
Hello,
Suddenly NGINX service is down. I tried restart NGINX, reboot server but failed.
follow this guide but failed:
https://docs.cpanel.net/knowledge-base/nginx/nginx-troubleshooting/#nginx-will-not-restart
from email:
Reason : Service check failed to complete Unable to connect to port 80 on 127.0.0.1: Connection refused: Died
- systemd[1]: Starting nginx - high performance web server...
- nginx[961]: nginx: [emerg] module "/etc/nginx/modules/ngx_http_js_module.so" version 1029001 instead of 1026003 in /etc/nginx/conf.d/modules/ngx_ njs_module.conf:1
- systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
- systemd[1]: nginx.service: Failed with result 'exit-code'.
- systemd[1]: Failed to start nginx - high performance web server.
- systemd[1]: /usr/lib/systemd/system/nginx.service:10: PIDFile= references a path below legacy directory /var/run/, updating /var/run/nginx.pid → /run/nginx.pid; please update the unit file accordingly.
Installed Apache module:
nginx
nginx-brotli
nginx-echo
nginx-gzip
nginx-headers-more
nginx-njs
-
Hey there! This type of error is almost always due to some package conflict on the system. Can you run this command on the server to what package controls that file?
rpm -qf rpm -qf /etc/nginx/modules/ngx_http_js_module.so
Once you know the package, can you try reinstalling that specific package on the machine to see if that resolves the issue?
0 -
After remove/uninstall nginx-njs then NGINX server functional. but when I reinstall nginx-njs NGINX server down again. Also, down all the websites.
Note: nginx-http2 is not installed.
0 -
I can't say for sure what is happening with that behavior as that is one of the default cPanel packages we include. It would be best to create a ticket so this can be investigated directly on the server, especially since it is a time-sensitive issue.
0 -
I am using the latest version of cPanel. Is the nginx-njs package necessary?
0 -
No, that package isn't a requirement to use Nginx on cPanel so there's no reason that *has* to be installed.
0 -
Hello,
Are these packages absolutely necessary? Can I remove them?nginx
nginx-brotli
nginx-echo
nginx-gzip
nginx-headers-more
nginx-njs0 -
No - there is nothing that requires you to run Nginx at all on a cPanel server.
0 -
How to get the service up kindly share step to get it up
0 -
Keshav Infotech - you'll need to contact your hosting provider if you are having those types of issues with the system.
0 -
cPRex there are any news regarding the update of this module for the current nginx ea build?
We need it operational because we have a few nginx configs with nginx-njs.0 -
Emanuel Vicente - I'm not aware of any general issues with Nginx at this time, unless I've missed something. Can you let me know what issues you're seeing?
0 -
It looks like the Nginx JavaScript module provided by cPanel (ea-nginx-njs), which is at the root of the issue mentioned in this thread, has not been updated yet. When installing it, the emerg error still occurs:
nginx: [emerg] module "/etc/nginx/modules/ngx_http_js_module.so" version 1029001 instead of 1026003 in /etc/nginx/conf.d/modules/ngx_njs_module.conf:1
Since cPanel added support for this module on EA4, we have been using some custom configurations that depend on it.I checked the repositories and the latest available version is still:
ea-nginx-njs-0.9.1-2.6.7.cpanel.x86_64
0 -
Thanks for the clarification - it wasn't clear to me from the earlier posting that the specific ea-nginx-njs package was causing the issue for these users.
I've created case CPANEL-49417 for our team to investigate this and I'll be sure to post updates as I receive them.
0 -
Update - this will go out as part of our weekly EasyApache update today, so that should be resolved in a few hours!
0 -
Update - this has now been released and installs work as expected with the ea-nginx-njs package. Let me know if you're seeing anything out of the ordinary at this point.
0
Please sign in to leave a comment.
Comments
15 comments