Join the community today
Become a Member

Nginx Can't restart nginx

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Andy, Dec 8, 2014.

Tags:
  1. Andy

    Andy Active Member

    313
    45
    28
    Aug 6, 2014
    Ratings:
    +54
    Local Time:
    10:24 AM
    Got a linode 1GB instance yesterday and installed Centos 7 as well as centminmod 08beta. When I tried to restart nginx via ngxrestart, it does not do anything, the cursor just blinking there for minutes.
    Code:
    ngxrestart
    Restarting nginx (via systemctl):
    I haven't seen this issue before and I don't know what to do. I end up having to Ctrl-C to cancel it.
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,164
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,135
    Local Time:
    12:24 AM
    Nginx 1.13.x
    MariaDB 5.5
  3. Andy

    Andy Active Member

    313
    45
    28
    Aug 6, 2014
    Ratings:
    +54
    Local Time:
    10:24 AM
    Ah, we are getting somewhere. I upgraded nginx again via centminmod menu and got this errors
    Code:
    Starting nginx (via systemctl):  Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
    [FAILED]
    systemctl status nginx.service
    nginx.service - SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server
       Loaded: loaded (/etc/rc.d/init.d/nginx)
       Active: failed (Result: timeout) since Sun 2014-12-07 22:34:03 UTC; 33s ago
      Process: 29293 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=0/SUCCESS)
    
    Dec 07 22:29:03 ethan.bvtot.com systemd[1]: Starting SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server...
    Dec 07 22:29:03 ethan.bvtot.com nginx[29293]: Starting nginx: [  OK  ]
    Dec 07 22:29:03 ethan.bvtot.com systemd[1]: PID file /usr/local/nginx/logs/nginx.pid not readable (yet?) after start.
    Dec 07 22:34:03 ethan.bvtot.com systemd[1]: nginx.service operation timed out. Terminating.
    Dec 07 22:34:03 ethan.bvtot.com systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server.
    Dec 07 22:34:03 ethan.bvtot.com systemd[1]: Unit nginx.service entered failed state.
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,164
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,135
    Local Time:
    12:24 AM
    Nginx 1.13.x
    MariaDB 5.5
  5. Andy

    Andy Active Member

    313
    45
    28
    Aug 6, 2014
    Ratings:
    +54
    Local Time:
    10:24 AM
    So it took it 33 seconds to wait. I don't know if it has anything to do with Linode or the fact that I enable IPV6 support in centmin.sh prior to install.
    I use this command to install so I believe it will always get the latest version from github
    curl -sL https://gist.github.com/centminmod/dbe765784e03bc4b0d40/raw/installer.sh | bash
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,164
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,135
    Local Time:
    12:24 AM
    Nginx 1.13.x
    MariaDB 5.5
  7. Andy

    Andy Active Member

    313
    45
    28
    Aug 6, 2014
    Ratings:
    +54
    Local Time:
    10:24 AM