• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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