• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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