Learn about Centmin Mod LEMP Stack today
Become a Member

Install Centmin Mod .07 beta 21 to stable status

Discussion in 'Beta release code' started by eva2000, May 30, 2014.

Thread Status:
Not open for further replies.
  1. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    6:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah a check to see if Nginx is running would be good. @Matt gave me some ideas of integrating Pushover.net API into Centmin Mod itself too https://community.centminmod.com/threads/pushover.142/ :D

     
  2. rdan

    rdan Well-Known Member

    5,439
    1,397
    113
    May 25, 2014
    Ratings:
    +2,186
    Local Time:
    4:55 AM
    Mainline
    10.2
    Do you guys always encounter this during nginx upgrade?
    Code:
    *************************************************
    
    Wed Jun 18 01:08:05 PHT 2014
    Success: Nginx make ok
    
    *************************************************
    Stopping nginx:                                            [  OK  ]
    
    nginx seems to be still running, trying to stop it again...
    
    Stopping nginx:                                            [  OK  ]
    make -f objs/Makefile install
    
    I mean this line:
    I always encounter it, looks like the reason sometimes nginx fail to start again?
     
  3. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    6:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. rdan

    rdan Well-Known Member

    5,439
    1,397
    113
    May 25, 2014
    Ratings:
    +2,186
    Local Time:
    4:55 AM
    Mainline
    10.2
    I'm not an expert on this, What is the reason it takes longer on stoping nginx?
    Does the command to stop it is like service nginx stop? Or different command?
     
  5. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    6:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Nginx usually gracefully shuts down with stop command so if you're workers are busy it probably taking longer. Definitely, something I'll look into even more :)
     
  6. rdan

    rdan Well-Known Member

    5,439
    1,397
    113
    May 25, 2014
    Ratings:
    +2,186
    Local Time:
    4:55 AM
    Mainline
    10.2
    Right now is not that busy as it's already 1AM here.
    But still I got of plenty online users.
    Maybe that's the reason.
    I hope you can think of better alternative, Thanks!
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    6:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    If you're willing to test out an alternative fix, you can try replacing your Centmin Mod's inc/nginx_upgrade.sh with this version https://gist.github.com/centminmod/0656f0d79af3e0451212 and try an Nginx upgrade and see :)
     
  8. rdan

    rdan Well-Known Member

    5,439
    1,397
    113
    May 25, 2014
    Ratings:
    +2,186
    Local Time:
    4:55 AM
    Mainline
    10.2
    What upgrade sleep value should I use?
     
  9. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    6:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Shouldn't matter if it's very low as I changed graceful stop from init.d nginx script to nginx binary stop instead so in theory nginx should immediately kill all processes. As such with this change, NGINXUPGRADESLEEP isn't triggered unless even after quit is issue that Nginx is still detected as running.

    I made a minor revision in https://gist.github.com/centminmod/0656f0d79af3e0451212 so if you already grabbed the code, just make a small change to command out the line https://gist.github.com/centminmod/0656f0d79af3e0451212/revisions
     
    Last edited: Jun 18, 2014
  10. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    6:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  11. rdan

    rdan Well-Known Member

    5,439
    1,397
    113
    May 25, 2014
    Ratings:
    +2,186
    Local Time:
    4:55 AM
    Mainline
    10.2
  12. rdan

    rdan Well-Known Member

    5,439
    1,397
    113
    May 25, 2014
    Ratings:
    +2,186
    Local Time:
    4:55 AM
    Mainline
    10.2
    What is this new log?
    Code:
    *************************************************
    
    Wed Jun 18 01:49:49 PHT 2014
    Success: Nginx make ok
    
    *************************************************
    nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)
    
    nginx seems to be still running, trying to stop it again...
    
    nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)
    make -f objs/Makefile install
    
     
  13. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    6:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    confused working or error ? first post said it worked and 2nd reply ?
     
  14. rdan

    rdan Well-Known Member

    5,439
    1,397
    113
    May 25, 2014
    Ratings:
    +2,186
    Local Time:
    4:55 AM
    Mainline
    10.2
  15. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    6:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    looks like you triggered line 343 in the revised test version at https://gist.github.com/centminmod/0656f0d79af3e0451212#file-nginx_upgrade-sh-L343 which basically despite a full stop to kill all processes, the script detected nginx process still running, so tried to do a full stop again but by then the nginx process had already ended, so there was no nginx.pid. Shouldn't matter I guess.

    I've added 2 second wait time before checking if Nginx process is still running to 4th revision at line 341 https://gist.github.com/centminmod/0656f0d79af3e0451212/revisions
     
  16. rdan

    rdan Well-Known Member

    5,439
    1,397
    113
    May 25, 2014
    Ratings:
    +2,186
    Local Time:
    4:55 AM
    Mainline
    10.2
    Full log:
     
  17. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    6:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  18. rdan

    rdan Well-Known Member

    5,439
    1,397
    113
    May 25, 2014
    Ratings:
    +2,186
    Local Time:
    4:55 AM
    Mainline
    10.2
  19. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    6:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  20. rdan

    rdan Well-Known Member

    5,439
    1,397
    113
    May 25, 2014
    Ratings:
    +2,186
    Local Time:
    4:55 AM
    Mainline
    10.2
    But I don't see inc/nginx_upgrade.sh but only inc/nginx_upgrade.inc.
     
Thread Status:
Not open for further replies.