ubuntu 14.04 - nginx won't stop/restart failed (98: Address already in use) -


versions: fresh turn of ubuntu 14.04 nginx 1.4.6

summary: issuing service nginx stop, not stop server, issuing nginx restart provides fail! error of in use.

details: believe issue vhosts, if comment out include sites-enabled in nginx.conf, behaves properly. have read multiple sites stating ipv6only , ipv4, appears fine, out of box default

apache not installed, nginx server.

debugging:

nginx -t nginx: configuration file /etc/nginx/nginx.conf syntax ok nginx: configuration file /etc/nginx/nginx.conf test successful  lsof -i :80  command  pid     user   fd   type device size/off node name nginx   1208     root    7u  ipv4  10246      0t0  tcp *:http (listen) nginx   1208     root    8u  ipv6  10247      0t0  tcp *:http (listen) nginx   1209 www-data    7u  ipv4  10246      0t0  tcp *:http (listen) nginx   1209 www-data    8u  ipv6  10247      0t0  tcp *:http (listen) nginx   1210 www-data    7u  ipv4  10246      0t0  tcp *:http (listen) nginx   1210 www-data    8u  ipv6  10247      0t0  tcp *:http (listen)  service nginx stop  lsof -i :80  command  pid     user   fd   type device size/off node name nginx   1208     root    7u  ipv4  10246      0t0  tcp *:http (listen) nginx   1208     root    8u  ipv6  10247      0t0  tcp *:http (listen) nginx   1209 www-data    7u  ipv4  10246      0t0  tcp *:http (listen) nginx   1209 www-data    8u  ipv6  10247      0t0  tcp *:http (listen) nginx   1210 www-data    7u  ipv4  10246      0t0  tcp *:http (listen) nginx   1210 www-data    8u  ipv6  10247      0t0  tcp *:http (listen)  service nginx restart  * restarting nginx nginx  ...fail! 

error-log:

2015/05/14 14:58:48 [emerg] 14620#0: bind() 0.0.0.0:80 failed (98: address in use) 2015/05/14 14:58:48 [emerg] 14620#0: bind() [::]:80 failed (98: address in use) 2015/05/14 14:58:48 [emerg] 14620#0: bind() 0.0.0.0:80 failed (98: address in use) 2015/05/14 14:58:48 [emerg] 14620#0: bind() [::]:80 failed (98: address in use) 2015/05/14 14:58:48 [emerg] 14620#0: bind() 0.0.0.0:80 failed (98: address in use) 2015/05/14 14:58:48 [emerg] 14620#0: bind() [::]:80 failed (98: address in use) 2015/05/14 14:58:48 [emerg] 14620#0: bind() 0.0.0.0:80 failed (98: address in use) 2015/05/14 14:58:48 [emerg] 14620#0: bind() [::]:80 failed (98: address in use) 2015/05/14 14:58:48 [emerg] 14620#0: bind() 0.0.0.0:80 failed (98: address in use) 2015/05/14 14:58:48 [emerg] 14620#0: bind() [::]:80 failed (98: address in use) 2015/05/14 14:58:48 [emerg] 14620#0: still not bind() 

conf files: nginx.conf

user www-data; worker_processes 2; pid /var/run/nginx.pid;  events {     worker_connections 2048;     use epoll;     multi_accept on; }  http {     sendfile on;     tcp_nopush on;     tcp_nodelay on;     keepalive_timeout 10;     send_timeout 2;     types_hash_max_size 2048;     server_tokens off;      client_max_body_size 5m;     client_body_buffer_size 256k;      include /etc/nginx/mime.types;     default_type application/octet-stream;      #access_log /var/log/nginx/access.log;     access_log off;     error_log /var/log/nginx/error.log;      gzip on;     gzip_disable "msie6";     proxy_set_header accept-encoding "";      proxy_set_header connection "";     proxy_http_version 1.1;      open_file_cache max=1000 inactive=20s;     open_file_cache_valid 30s;     open_file_cache_min_uses 5;     open_file_cache_errors off;      reset_timedout_connection on;      include /etc/nginx/conf.d/*.conf;     include /etc/nginx/sites-enabled/*; } 

sites-available/default

 server {     listen 80 default_server;     listen [::]:80 ipv6only=on default_server;      #listen [::]:80 ipv6only=on; # listen ipv6 traffic on ipv6 sockets     #listen 80; # listen ipv4 traffic on "regular" ipv4 sockets      root /usr/share/nginx/html;     index index.html index.htm;      # make site accessible http://localhost/     server_name localhost;      location / {             # first attempt serve request file,             # directory, fall displaying 404.             try_files $uri $uri/ =404;             # uncomment enable naxsi on location             # include /etc/nginx/naxsi.rules     } } 


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -