Opened 8 years ago

Closed 8 years ago

#1049 closed defect (fixed)

nginx stream module - listen not provided

Reported by: baranyaib90@… Owned by:
Priority: minor Milestone: 1.11
Component: nginx-module Version: 1.11.x
Keywords: stream Cc: gcc, version, 4.8.2, (Ubuntu, 4.8.2-19ubuntu1)
uname -a: Linux linuxteam 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: ./configure --with-ipv6 --prefix=. --sbin-path=nginx --conf-path=nginx.conf --error-log-path=logs/error.log --pid-path=nginx.pid

Description

Nginx stream module works without server's listen directive.
Does this makes any sense? :S

$ cat >nginx.conf
daemon off;
user nobody;
error_log stderr info;
events {
  worker_connections 1000;
}
stream
{
  upstream backends
  {
    server 10.0.0.3:21;
    server 10.0.0.4:21;
  }
  server
  {
    proxy_pass backends;
  }
}
$ ./nginx -p . -c nginx.conf &
[1] 61
[root@bf4de10c765d nginx]# 2016/08/12 08:53:32 [notice] 61#0: using the "epoll" event method
2016/08/12 08:53:32 [notice] 61#0: nginx/1.10.1
2016/08/12 08:53:32 [notice] 61#0: built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
2016/08/12 08:53:32 [notice] 61#0: OS: Linux 3.13.0-39-generic
2016/08/12 08:53:32 [notice] 61#0: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2016/08/12 08:53:32 [notice] 61#0: start worker processes
2016/08/12 08:53:32 [notice] 61#0: start worker process 62

$ netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
$


Change History (2)

comment:1 by Roman Arutyunyan <arut@…>, 8 years ago

In 6657:3d5202c71f94/nginx:

Ensure "listen" exists in a mail or stream server (ticket #1049).

comment:2 by Roman Arutyunyan, 8 years ago

Resolution: fixed
Status: newclosed

Thanks, fixed that.

Note: See TracTickets for help on using tickets.