I
I
i_want_to_know_everything2016-04-07 13:03:34
Nginx
i_want_to_know_everything, 2016-04-07 13:03:34

Http/2 nginx server crashes?

ngnix 1.9.14
php-fpm
Ubuntu

config

server {
    listen 80;
  server_name domain.com *.domain.com www.domain.com;
  return 301 https://$host$request_uri;
}

server {
    listen 443;
  server_name domain.com *.domain.com www.domain.com;
  charset UTF-8;
  disable_symlinks if_not_owner from=$root_path;
  index index.php;
  root $root_path/$subdomain;
  set $root_path /var/www/user_name/data/www;
  set $subdomain domain.com;
      if ($host ~* ^((.*).domain.com)$) {
        set $subdomain $1;
      }
  access_log /var/www/httpd-logs/domain.com.access.log ;
  error_log /var/www/httpd-logs/domain.com.error.log notice;
  include /etc/nginx/vhosts-includes/*.conf;
  location / {
    location ~ [^/]\.ph(p\d*|tml)$ {
      try_files /does_not_exists @php;
    }
                  try_files $uri $uri/ /index.php?q=$request_uri;
  }
  location @php {
    fastcgi_index index.php;
    fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@domain.com";
    fastcgi_pass unix:/var/www/php-fpm/user_name.sock;
    fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
    try_files $uri =404;
    include fastcgi_params;
  }
  ssi on;
  add_header Strict-Transport-Security "max-age=31536000;";
  ssl on;
  ssl_certificate "/var/www/httpd-cert/user_name/domain.com.crtca";
  ssl_certificate_key "/var/www/httpd-cert/user_name/domain.com.key";
  ssl_ciphers HIGH:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!EXP:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
  ssl_prefer_server_ciphers on;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
}


trying to enable http/2
change listen 443 to listen 443 ssl http2
server crashes with error [emerg] 1466#1466: bind() to 0.0.0.0:443 failed (98: Address already in use)
What could be wrong?

netstat -nlpt returns the following
Active Internet connections (only servers)
Proto Recv-Q Send-Q                       Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22                      0.0.0.0:*               LISTEN      504/sshd
tcp        0      0 0.0.0.0:25                      0.0.0.0:*               LISTEN      863/exim4
tcp        0      0 0.0.0.0:443                    0.0.0.0:*               LISTEN      912/nginx.conf
tcp        0      0 100.100.100.100:1500    0.0.0.0:*               LISTEN      908/ihttpd accept
tcp        0      0 0.0.0.0:993                    0.0.0.0:*               LISTEN      511/dovecot
tcp        0      0 0.0.0.0:995                    0.0.0.0:*               LISTEN      511/dovecot
tcp        0      0 127.0.0.1:3306              0.0.0.0:*               LISTEN      587/mysqld
tcp        0      0 0.0.0.0:587                   0.0.0.0:*               LISTEN      863/exim4
tcp        0      0 0.0.0.0:110                   0.0.0.0:*               LISTEN      511/dovecot
tcp        0      0 0.0.0.0:143                   0.0.0.0:*               LISTEN      511/dovecot
tcp        0      0 0.0.0.0:80                    0.0.0.0:*               LISTEN      912/nginx.conf
tcp        0      0 0.0.0.0:465                   0.0.0.0:*               LISTEN      863/exim4
tcp6       0      0 :::22                               :::*                    LISTEN      504/sshd
tcp6       0      0 :::25                                :::*                    LISTEN      863/exim4
tcp6       0      0 :::587                              :::*                    LISTEN      863/exim4
tcp6       0      0 :::465                              :::*                    LISTEN      863/exim4
tcp6       0      0 :::21                               :::*                    LISTEN      983/proftpd: (accep

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Platon Platonovich, 2016-04-07
@i_want_to_know_everything

Kill listen 443, run nginx, could it have hung
http/2 patch at all?

P
Pavel Selivanov, 2016-04-07
@selivanov_pavel

Look netstat -nlpt, maybe at 443 the old process remained hanging

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question