upstream may not have port 80 ; upgrade from 1.2.1 to 1.4.1

Rasmus Glud Andersen rga at abiosis.dk
Mon Jun 3 09:31:58 UTC 2013


Hi,

After running nginx 1.2.1 with the following configuration, I now get warnings when testing the same configuration under 1.4.1

Any advice on this would be highly appreciated. 


[error]
$ nginx -t -c /tmp/nginx.conf                                                                                                                                                                                                                         
nginx: [warn] upstream "appcluster-secure" may not have port 80 in /tmp/nginx.conf:60
nginx: configuration file /tmp/nginx.conf test failed

$ nginx -V
nginx version: nginx/1.4.1
TLS SNI support enabled
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt='-I /usr/local/include' --with-ld-opt='-L /usr/local/lib' --conf-path=/usr/local/etc/nginx/nginx.conf --sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx-error.log --user=www --group=www --with-ipv6 --http-client-body-temp-path=/var/tmp/nginx/client_body_temp --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp --http-proxy-temp-path=/var/tmp/nginx/proxy_temp --http-scgi-temp-path=/var/tmp/nginx/scgi_temp --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp --http-log-path=/var/log/nginx-access.log --with-http_stub_status_module --add-module=/usr/ports/www/nginx/work/nginx-sticky-module-1.1 --with-pcre --add-module=/usr/ports/www/nginx/work/yaoweibin-nginx_tcp_proxy_module-b83e5a6 --with-http_ssl_module

[http]
Server listen on 192.168.1.227:80 forwards to 192.168.3.224:80
Server listen on 192.168.1.226:80 forwards to 192.168.0.123:80 and 192.168.0.124:80

[tcp]
Server listen on 192.168.1.226:443 forwards to 192.168.0.123:443 and 192.168.0.124:443

---[ nginx.conf ]---
     1  # $Id: nginx.conf,v 1.15 2013/06/03 07:16:28 root Exp $
     2
     3  #user  nobody;
     4  worker_processes  1;
     5
     6  events {
     7      worker_connections  1024;
     8  }
     9
    10  http {
    11          proxy_read_timeout 300;
    12
    13          upstream appcluster {
    14                  sticky;
    15                  server 192.168.0.123:80;
    16                  server 192.168.0.124:80;
    17          }
    18
    19          upstream single_server {
    20                  sticky;
    21                  server 192.168.3.244:80;
    22          }
    23
    24          default_type  application/octet-stream;
    25          sendfile        on;
    26          keepalive_timeout  65;
    27
    28          server {
    29                  listen          192.168.1.227:80;
    30                  server_name     localhost;
    31                  location / {
    32                          proxy_pass http://single_server;
    33                          proxy_set_header Host $host;
    34                  }
    35                  error_page   500 502 503 504  /50x.html;
    36                  location = /50x.html {
    37                      root   /usr/local/www/nginx-dist;
    38                  }
    39          }
    40
    41          server {
    42                  listen       192.168.1.226:80;
    43                  server_name  localhost;
    44                  location / {
    45                          proxy_pass http://appcluster;
    46                          proxy_set_header Host $host;
    47                  }
    48          }
    49  }
    50
    51  tcp     {
    52          upstream appcluster-secure {
    53                  server 192.168.0.123:443;
    54                  server 192.168.0.124:443;
    55          }
    56          server {
    57                  listen 192.168.1.226:443;
    58                  server_name _;
    59                  tcp_nodelay on;
    60                  proxy_pass appcluster-secure;
    61                  }
    62          }
    63  }
    64
---[ EOF ]---


-- 
Rasmus G. Andersen



More information about the nginx mailing list