• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • Our UX team believes in the in the power of direct feedback and would like to invite you to participate in interviews, tests, and surveys.
    To stay in the loop and never miss an opportunity to share your thoughts, please subscribe to our UX research program. If you were previously part of the Plesk UX research program, please re-subscribe to continue receiving our invitations.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue Nginx service fails to start on CentOS 7 boot with Plesk 12.5

Azurel

Silver Pleskian
OS : ‪CentOS Linux 7.4.1708 (Core)‬
Product Plesk Onyx: Version 17.5.3 Update #43, last updated on Mar 15, 2018 03:30 AM

After restart server with plesk GUI nginx can't start
# /etc/init.d/nginx status
● nginx.service - Startup script for nginx service
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2018-03-26 07:24:06 CEST; 8min ago
Process: 3169 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
Process: 3165 ExecStartPre=/usr/bin/test $NGINX_ENABLED = yes (code=exited, status=0/SUCCESS)

Mar 26 07:24:03 mail.example.com systemd[1]: Starting Startup script for nginx service...
Mar 26 07:24:06 mail.example.com nginx[3169]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Mar 26 07:24:06 mail.example.com nginx[3169]: nginx: [emerg] bind() to [XXXX:XXX:XX:XXXX:XXXX:XXXX:0:1]:80 ...ess)
Mar 26 07:24:06 mail.example.com nginx[3169]: nginx: configuration file /etc/nginx/nginx.conf test failed
Mar 26 07:24:06 mail.example.com systemd[1]: nginx.service: control process exited, code=exited status=1
Mar 26 07:24:06 mail.example.com systemd[1]: Failed to start Startup script for nginx service.
Mar 26 07:24:06 mail.example.com systemd[1]: Unit nginx.service entered failed state.
Mar 26 07:24:06 mail.example.com systemd[1]: nginx.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

I have this issue 1 year before.
After use
# plesk sbin nginxmng -e
or
# /etc/init.d/nginx start
Starting nginx (via systemctl): [ OK ]
nginx running fine.



I found this tickets
- Nginx service fails to start on CentOS 7 boot with Plesk 12.0: 99: Cannot assign requested address
- Nginx does not start automatically after reboot: 99: Cannot assign requested address

nginx log
[ N 2018-03-26 02:15:01.1822 26307/T5 age/Cor/SecurityUpdateChecker.h:374 ]: Security update check: no update found (next check in 24 hours)

[ N 2018-03-26 07:22:34.0917 26307/T7 age/Cor/CoreMain.cpp:589 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2018-03-26 07:22:34.1396 26307/T1 age/Cor/CoreMain.cpp:1080 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2018-03-26 07:22:34.1402 26307/Tj Ser/Server.h:886 ]: [ApiServer] Freed 0 spare client objects
[ N 2018-03-26 07:22:34.1403 26307/Tj Ser/Server.h:531 ]: [ApiServer] Shutdown finished
[ N 2018-03-26 07:22:34.1405 26307/T7 Ser/Server.h:886 ]: [ServerThr.1] Freed 128 spare client objects
[ N 2018-03-26 07:22:34.1406 26307/T7 Ser/Server.h:531 ]: [ServerThr.1] Shutdown finished
[ N 2018-03-26 07:22:34.1407 26307/Td Ser/Server.h:886 ]: [ServerThr.4] Freed 128 spare client objects
[ N 2018-03-26 07:22:34.1407 26307/Td Ser/Server.h:531 ]: [ServerThr.4] Shutdown finished
[ N 2018-03-26 07:22:34.1407 26307/Th Ser/Server.h:886 ]: [ServerThr.6] Freed 128 spare client objects
[ N 2018-03-26 07:22:34.1408 26307/Th Ser/Server.h:531 ]: [ServerThr.6] Shutdown finished
[ N 2018-03-26 07:22:34.1408 26307/Tf Ser/Server.h:886 ]: [ServerThr.5] Freed 128 spare client objects
[ N 2018-03-26 07:22:34.1408 26307/Tb Ser/Server.h:886 ]: [ServerThr.3] Freed 128 spare client objects
[ N 2018-03-26 07:22:34.1408 26307/Tf Ser/Server.h:531 ]: [ServerThr.5] Shutdown finished
[ N 2018-03-26 07:22:34.1409 26307/Tb Ser/Server.h:531 ]: [ServerThr.3] Shutdown finished
[ N 2018-03-26 07:22:34.1408 26307/T9 Ser/Server.h:886 ]: [ServerThr.2] Freed 128 spare client objects
[ N 2018-03-26 07:22:34.1409 26307/T9 Ser/Server.h:531 ]: [ServerThr.2] Shutdown finished

[ N 2018-03-26 07:22:34.1516 26307/T7 age/Cor/CoreMain.cpp:589 ]: Signal received. Gracefully shutting down... (send signal 1 more time(s) to force shutdown)
[ N 2018-03-26 07:22:34.3259 26307/T1 age/Cor/CoreMain.cpp:1150 ]: Passenger core shutdown finished
2018/03/26 07:24:03 [emerg] 3169#0: bind() to [XXXX:XXX:XX:XXXX:XXXX:XXXX:0:1]:80 failed (99: Cannot assign requested address)
[ N 2018-03-26 07:32:54.6514 12067/T1 age/Wat/WatchdogMain.cpp:1267 ]: Starting Passenger watchdog...
[ N 2018-03-26 07:32:54.6642 12070/T1 age/Cor/CoreMain.cpp:1165 ]: Starting Passenger core...
[ N 2018-03-26 07:32:54.6646 12070/T1 age/Cor/CoreMain.cpp:249 ]: Passenger core running in multi-application mode.
[ N 2018-03-26 07:32:54.6744 12070/T1 age/Cor/CoreMain.cpp:905 ]: Passenger core online, PID 12070
[ N 2018-03-26 07:32:57.0099 12070/T5 age/Cor/SecurityUpdateChecker.h:374 ]: Security update check: no update found (next check in 24 hours)


So, what I can do, that not happen again? I have tried:

# grep -r "ONBOOT" /etc/sysconfig/network-scripts/ifcfg-*
/etc/sysconfig/network-scripts/ifcfg-enp0s5:ONBOOT="yes"
/etc/sysconfig/network-scripts/ifcfg-lo:ONBOOT=yes

I installed systemd-networkd.x86_64 0:219-42.el7_4.10 and edit "/etc/systemd/system/multi-user.target.wants/nginx.service", but that not working. nginx failed after restart again. Last step is add sleep, but I want ask, is here a better solution? So its working like before without this workarounds?
 
Back
Top