epoll_ctl failed (17: File exists)
Matthias-Christian Ott
ott at mirix.org
Sun Apr 11 23:20:17 MSD 2010
Hi,
it took a while to find the bug, but the patch is trivial:
--- src/core/ngx_cycle.c~ 2009-10-26 17:22:24.000000000 +0100
+++ src/core/ngx_cycle.c 2010-04-11 21:14:43.997932783 +0200
@@ -847,7 +847,7 @@
sin61 = (struct sockaddr_in6 *) sa1;
sin62 = (struct sockaddr_in6 *) sa2;
- if (sin61->sin6_port != sin61->sin6_port) {
+ if (sin61->sin6_port != sin62->sin6_port) {
return NGX_DECLINED;
}
Without the patch reloading will fail, because nginx thinks the two IPv6
addresses are the same regardless of the port.
Regards,
Matthias-Christian
On Sat, Apr 10, 2010 at 06:45:12PM +0200, Matthias-Christian Ott wrote:
> Hi,
>
> I looked at that this more closely and found out the the error occurs
> when nginx listens on [::]:80 and [::]:443 simultanously.
>
> Regards,
> Matthias-Christian
>
> On Sat, Apr 10, 2010 at 06:47:16AM +0200, Matthias-Christian Ott wrote:
> > Hi,
> >
> > when I run '/etc/init.d/nginx reload' on Debian, I get the following
> > error message in /var/log/nginx/error.log and I have to restart nginx:
> >
> > 2010/04/08 03:07:23 [alert] 10719#0: epoll_ctl(1, 7) failed (17: File exists)
> >
> > $ nginx -V
> > nginx version: nginx/0.7.65
> > TLS SNI support enabled
> > configure arguments: --conf-path=/etc/nginx/nginx.conf
> > --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid
> > --lock-path=/var/lock/nginx.lock
> > --http-log-path=/var/log/nginx/access.log
> > --http-client-body-temp-path=/var/lib/nginx/body
> > --http-proxy-temp-path=/var/lib/nginx/proxy
> > --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug
> > --with-http_stub_status_module --with-http_flv_module
> > --with-http_ssl_module --with-http_dav_module
> > --with-http_gzip_static_module --with-http_realip_module --with-mail
> > --with-mail_ssl_module --with-ipv6 --with-http_geoip_module
> > --add-module=/tmp/buildd/nginx-0.7.65/modules/nginx-upstream-fair
> >
> > $ cat /etc/nginx/nginx.conf
> > user www-data;
> > worker_processes 1;
> >
> > error_log /var/log/nginx/error.log;
> > pid /var/run/nginx.pid;
> >
> > events {
> > worker_connections 1024;
> > # multi_accept on;
> > }
> >
> > http {
> > include /etc/nginx/mime.types;
> >
> > access_log /var/log/nginx/access.log;
> >
> > sendfile on;
> > #tcp_nopush on;
> >
> > #keepalive_timeout 0;
> > keepalive_timeout 65;
> > tcp_nodelay on;
> >
> > gzip on;
> > gzip_static on;
> > gzip_http_version 1.1;
> > gzip_proxied expired no-cache no-store private auth;
> > gzip_disable "MSIE [1-6]\.(?!.*SV1)";
> > gzip_vary on;
> >
> > include /etc/nginx/conf.d/*.conf;
> > include /etc/nginx/sites-enabled/*;
> > }
> >
> > # mail {
> > [...]
> >
> > $ uname -a
> > Linux example.com 2.6.26-2-openvz-amd64 #1 SMP Thu Aug 6 01:50:56 UTC 2009 x86_64 GNU/Linux
> >
> > Any ideas?
> >
> > Regards,
> > Matthias-Christian
> >
> > _______________________________________________
> > nginx-devel mailing list
> > nginx-devel at nginx.org
> > http://nginx.org/mailman/listinfo/nginx-devel
> >
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://nginx.org/mailman/listinfo/nginx-devel
>
More information about the nginx-devel
mailing list