Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-28, 15:39:18

Author Topic: Restarting nginx does not work always properly  (Read 2898 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Restarting nginx does not work always properly
« on: 2015-06-12, 14:56:56 »
Quote
Stopping nginx:                                            [FAILED]
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] still could not bind()
                                                           [FAILED]

But when I do:

Quote
killall -9 nginx; /etc/init.d/nginx restart
Stopping nginx:                                            [FAILED]
Starting nginx:                                            [  OK  ]

then it works.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Restarting nginx does not work always properly
« Reply #1 on: 2015-06-12, 15:06:37 »
Not only nginx, php-fpm and httpd something appear this issue.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline naujasdizainas

  • Junior Member
  • *
  • Posts: 44
  • Karma: +1/-0
  • Gender: Male
    • View Profile
    • http://www.naujasdizainas.com
Re: Restarting nginx does not work always properly
« Reply #2 on: 2015-07-06, 23:06:02 »
Change in all files like listen_xxxx in /opt/configs/nginx/conf/globals/
listen [::]:80;
add # save
#listen [::]:80;

and can make chattr +i /opt/configs/nginx/conf/globals/listen_xxxx.conf because after reboot or update in listen_xxxx.conf always add listen [::]:80;

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Restarting nginx does not work always properly
« Reply #3 on: 2015-07-07, 14:03:29 »
Great idea ! Probably there are too many listen entries !

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Restarting nginx does not work always properly
« Reply #4 on: 2015-07-07, 14:18:11 »
Don't use this trick but copy all listen_nonssl_front* and listen_nonssl_back*.conf to  their custom.listen_nonssl_front*.conf and custom.listen_nonssl_back*.conf. And then restart-web after that.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.042 seconds with 19 queries.

web stats analysis