Page 1 of 1

Initial VestaCP installation stops due to nginx start timeout

Posted: Sun Nov 24, 2019 12:54 pm
by mihai
Hey guys, Mihai here!

I am pretty new to CentOS and VPS in general, but this I though I could easily manage. I only have this problem on one VPS machine out of 3 tested. Fresh install on CentOS 7-x86_64 minimal

This is the install command:

Code: Select all

bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables no
 --fail2ban no --quota no --exim yes --dovecot yes --spamassassin no --clamav no --softaculous no --mysql yes --postgresql no
  --hostname MY-DOMAIN.com --email [email protected] --password MyPass123
Right after nginx install part, I get a timeout error:

Code: Select all

Complete!
Redirecting to /bin/systemctl stop iptables.service
Note: Forwarding request to 'systemctl enable nginx.service'.
Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service.
Redirecting to /bin/systemctl start nginx.service
Job for nginx.service failed because a timeout was exceeded. See "systemctl status nginx.service" and "journalctl -xe" for details.
Error: nginx start failed
and VestaCP installation stops. I have reinstalled the OS and retried several times. Same problem each time. Again, it seems to be something unusual, related to this machine only, as I've ran the same installation process on two other machines without issues.

Here's the result of "systemctl status nginx.service"

Code: Select all

● nginx.service - nginx - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/nginx.service.d
           └─limits.conf
   Active: failed (Result: timeout) since Sun 2019-11-24 12:20:29 UTC; 3min 42s ago
     Docs: http://nginx.org/en/docs/
  Process: 3259 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)

Nov 24 12:18:59 s1.MY_DOMAIN.com systemd[1]: Starting nginx - high performance web server...
Nov 24 12:18:59 s1.MY_DOMAIN.com systemd[1]: [color=#FF0080]Can't open PID file /var/run/nginx.pid (yet?) after start: Too many levels of symbolic links[/color]
Nov 24 12:20:29 s1.MY_DOMAIN.com systemd[1]: nginx.service start operation timed out. Terminating.
Nov 24 12:20:29 s1.MY_DOMAIN.com systemd[1]: Failed to start nginx - high performance web server.
Nov 24 12:20:29 s1.MY_DOMAIN.com systemd[1]: Unit nginx.service entered failed state.
Nov 24 12:20:29 s1.MY_DOMAIN.com systemd[1]: nginx.service failed.
The attached screenshot shows the result of two parallel installations on two separate VPS packages. The one that installed correctly is a cheaper configuration.
Image

Any ideas what might cause this?

Thank you!
Mihai

Re: Initial VestaCP installation stops due to nginx start timeout

Posted: Wed Nov 27, 2019 2:53 pm
by milciadesrecalde
Hello!

I am with the same problem, and only in one vps. Please tell us how to solve this problem.

Thank you!

Re: Initial VestaCP installation stops due to nginx start timeout

Posted: Thu Nov 28, 2019 3:56 pm
by MrTux
My server worked with these changes:

Code: Select all

# nano /etc/sysctl.d/disable_ipv6.conf
Paste this:

Code: Select all

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Code: Select all

# nano /usr/lib/systemd/system/nginx.service
Find:

Code: Select all

PIDFile=/var/run/nginx.pid
Replace with:

Code: Select all

PIDFile=/run/nginx.pid

Code: Select all

# nano /etc/nginx/nginx.conf
Find:

Code: Select all

pid /var/run/nginx.pid;
Replace with:

Code: Select all

pid /run/nginx.pid;

Code: Select all

# systemctl daemon-reload
# reboot