New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx not start #68

Closed
exileed opened this Issue Apr 8, 2016 · 58 comments

Comments

Projects
None yet
@exileed

exileed commented Apr 8, 2016

2016/04/08 11:34:44 [emerg] 10843#0: setsockopt(IPV6_V6ONLY) [::]:80 failed, ignored (22: Invalid argument) 2016/04/08 11:34:44 [emerg] 10843#0: bind() to [::]:80 failed (22: Invalid argument)

@deyvisonrocha

This comment has been minimized.

Show comment
Hide comment
@deyvisonrocha

deyvisonrocha Apr 8, 2016

If you comment the second line of listen works. But, not work on Windows accessing the localhost:. =/

deyvisonrocha commented Apr 8, 2016

If you comment the second line of listen works. But, not work on Windows accessing the localhost:. =/

@hungys

This comment has been minimized.

Show comment
Hide comment
@hungys

hungys Apr 10, 2016

Same here. I guess the IPv6 is not fully implemented.
However, after commenting out the IPv6 config in /etc/nginx/sites-available/default, I got another error:

2016/04/10 18:03:54 [emerg] 594#0: setsockopt(IPV6_V6ONLY) [::]:80 failed, ignored (22: Invalid argument)
2016/04/10 18:03:54 [emerg] 594#0: bind() to [::]:80 failed (22: Invalid argument)
2016/04/10 18:06:52 [alert] 661#0: ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument)
2016/04/10 18:06:52 [alert] 661#0: ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument)
2016/04/10 18:06:52 [alert] 661#0: ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument)
2016/04/10 18:06:52 [alert] 661#0: ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument)

hungys commented Apr 10, 2016

Same here. I guess the IPv6 is not fully implemented.
However, after commenting out the IPv6 config in /etc/nginx/sites-available/default, I got another error:

2016/04/10 18:03:54 [emerg] 594#0: setsockopt(IPV6_V6ONLY) [::]:80 failed, ignored (22: Invalid argument)
2016/04/10 18:03:54 [emerg] 594#0: bind() to [::]:80 failed (22: Invalid argument)
2016/04/10 18:06:52 [alert] 661#0: ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument)
2016/04/10 18:06:52 [alert] 661#0: ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument)
2016/04/10 18:06:52 [alert] 661#0: ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument)
2016/04/10 18:06:52 [alert] 661#0: ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument)
@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Apr 12, 2016

Member

Can confirm from our side that the socket option IPPROTO_IPV6\IPV6_V6ONLY is not yet implemented. We have opened a bug on our side to track this. No ETA at this time.

Member

sunilmut commented Apr 12, 2016

Can confirm from our side that the socket option IPPROTO_IPV6\IPV6_V6ONLY is not yet implemented. We have opened a bug on our side to track this. No ETA at this time.

@luisfavila

This comment has been minimized.

Show comment
Hide comment
@luisfavila

luisfavila Apr 13, 2016

@sunilmut What about accessing nginx from Windows? I've got it running, but http://localhost won't work.

luisfavila commented Apr 13, 2016

@sunilmut What about accessing nginx from Windows? I've got it running, but http://localhost won't work.

@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Apr 13, 2016

Member

@luisfavila If the nginx server is listening on the port, then you should be able to connect from Windows. 'netstat' is probably currently broken on WSL. Can you try 'netstat' on Windows to see if anyone is listening on the server port? If nginx is listening on the server port, you can also check your firewall settings (or disable it) to see if that makes any difference?

Member

sunilmut commented Apr 13, 2016

@luisfavila If the nginx server is listening on the port, then you should be able to connect from Windows. 'netstat' is probably currently broken on WSL. Can you try 'netstat' on Windows to see if anyone is listening on the server port? If nginx is listening on the server port, you can also check your firewall settings (or disable it) to see if that makes any difference?

@luisfavila

This comment has been minimized.

Show comment
Hide comment
@luisfavila

luisfavila Apr 13, 2016

@sunilmut Actually, nginx wasn't started at all. It did not show any error when starting, but reading logs it was due to IPV6, which is disabled now. It won't start anyway, though, showing the following error:
ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument)
Apache2 seems to work, while presenting the following warning (after disabling IPv6, with IPv6 enabled will show one more warning):
Invalid argument: AH00076: Failed to enable APR_TCP_DEFER_ACCEPT

luisfavila commented Apr 13, 2016

@sunilmut Actually, nginx wasn't started at all. It did not show any error when starting, but reading logs it was due to IPV6, which is disabled now. It won't start anyway, though, showing the following error:
ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument)
Apache2 seems to work, while presenting the following warning (after disabling IPv6, with IPv6 enabled will show one more warning):
Invalid argument: AH00076: Failed to enable APR_TCP_DEFER_ACCEPT

@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Apr 13, 2016

Member

@luisfavila Regarding "ioctl(FIONBIO)" error, do you know on which file it is calling that IOCTL?

Member

sunilmut commented Apr 13, 2016

@luisfavila Regarding "ioctl(FIONBIO)" error, do you know on which file it is calling that IOCTL?

@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Apr 13, 2016

Member

@luisfavila - Also, glad to know that you got apache to work. We are working on getting support for IPV6_V6ONLY. Hopefully, you should see that light up soon.

Member

sunilmut commented Apr 13, 2016

@luisfavila - Also, glad to know that you got apache to work. We are working on getting support for IPV6_V6ONLY. Hopefully, you should see that light up soon.

@afridlund85

This comment has been minimized.

Show comment
Hide comment
@afridlund85

afridlund85 Apr 14, 2016

@luisfavila did you get apache to work? I get ipv6 errors but I didn't manage to disable it, all guides on how to disable ipv6 on ubuntu refered to config files that did not exists or didn't change anything when edited. How did you disable ipv6?

afridlund85 commented Apr 14, 2016

@luisfavila did you get apache to work? I get ipv6 errors but I didn't manage to disable it, all guides on how to disable ipv6 on ubuntu refered to config files that did not exists or didn't change anything when edited. How did you disable ipv6?

@luisfavila

This comment has been minimized.

Show comment
Hide comment
@luisfavila

luisfavila Apr 14, 2016

@afridlund85 Edited /etc/apache2/ports.conf and changed Listen 80 to Listen 0.0.0.0:80

Regarding "ioctl(FIONBIO)" error, do you know on which file it is calling that IOCTL?

@sunilmut No idea, it doesn't tell

Also, glad to know that you got apache to work. We are working on getting support for IPV6_V6ONLY. Hopefully, you should see that light up soon.

@sunilmut Great! Looking forward to test it!

luisfavila commented Apr 14, 2016

@afridlund85 Edited /etc/apache2/ports.conf and changed Listen 80 to Listen 0.0.0.0:80

Regarding "ioctl(FIONBIO)" error, do you know on which file it is calling that IOCTL?

@sunilmut No idea, it doesn't tell

Also, glad to know that you got apache to work. We are working on getting support for IPV6_V6ONLY. Hopefully, you should see that light up soon.

@sunilmut Great! Looking forward to test it!

@Geeknux

This comment has been minimized.

Show comment
Hide comment
@Geeknux

Geeknux Apr 17, 2016

I compile nginx without enabling IPv6 support bot it doesn't start either

i got this error:
nginx: [emerg] bind() to 0.0.0.0:80 failed (22: Invalid argument)

i compile nginx with this command:
/usr/local/nginx/sbin/nginx -V

nginx version: nginx/1.8.1
built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configure arguments: --prefix=/usr/local/nginx --without-http_autoindex_module --without-http_userid_module --without-http_auth_basic_module --without-http_fastcgi_module --without-http_empty_gif_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module

Geeknux commented Apr 17, 2016

I compile nginx without enabling IPv6 support bot it doesn't start either

i got this error:
nginx: [emerg] bind() to 0.0.0.0:80 failed (22: Invalid argument)

i compile nginx with this command:
/usr/local/nginx/sbin/nginx -V

nginx version: nginx/1.8.1
built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configure arguments: --prefix=/usr/local/nginx --without-http_autoindex_module --without-http_userid_module --without-http_auth_basic_module --without-http_fastcgi_module --without-http_empty_gif_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module
@luisfavila

This comment has been minimized.

Show comment
Hide comment
@luisfavila

luisfavila Apr 17, 2016

@Geeknux Have you disabled IPv6 following my instructions? They were for Apache2; the way to do it in Nginx is different: edit the file /etc/nginx/sites-enabled/default and comment the line listen [::]:80 default_server ipv6only=on;, leaving only the listen 80 default_server; line.

luisfavila commented Apr 17, 2016

@Geeknux Have you disabled IPv6 following my instructions? They were for Apache2; the way to do it in Nginx is different: edit the file /etc/nginx/sites-enabled/default and comment the line listen [::]:80 default_server ipv6only=on;, leaving only the listen 80 default_server; line.

@Geeknux

This comment has been minimized.

Show comment
Hide comment
@Geeknux

Geeknux Apr 18, 2016

@luisfavila Yes i did that, but it didn't resolve the problem, at least not for me

Update:
it seams Skype is The problem:
Skype automatically updated itself, and turned the "use port 80" option back on.
after disabling that on skype i can start nginx without any error but it doesn't respond in any way.

Geeknux commented Apr 18, 2016

@luisfavila Yes i did that, but it didn't resolve the problem, at least not for me

Update:
it seams Skype is The problem:
Skype automatically updated itself, and turned the "use port 80" option back on.
after disabling that on skype i can start nginx without any error but it doesn't respond in any way.

@luisfavila

This comment has been minimized.

Show comment
Hide comment
@luisfavila

luisfavila Apr 18, 2016

@Geeknux I didn't get nginx to work either, only apache2. Nginx seemed load fine, but checking the error log in /var/log/nginx presented me ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument) as I said above in this thread

luisfavila commented Apr 18, 2016

@Geeknux I didn't get nginx to work either, only apache2. Nginx seemed load fine, but checking the error log in /var/log/nginx presented me ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument) as I said above in this thread

@hungys

This comment has been minimized.

Show comment
Hide comment
@hungys

hungys Apr 23, 2016

Still encounter the same issue on the latest build.

ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument)

hungys commented Apr 23, 2016

Still encounter the same issue on the latest build.

ioctl(FIONBIO) failed while spawning "worker process" (22: Invalid argument)

@kjhughes097

This comment has been minimized.

Show comment
Hide comment
@kjhughes097

kjhughes097 Apr 26, 2016

Same issue.

Initially did not bind, so I removed the IPV6 config item. Now I'm getting the
ioctl(FIONBIO) failed while spawning 'worker process' (22: Invalid argument)
error

kjhughes097 commented Apr 26, 2016

Same issue.

Initially did not bind, so I removed the IPV6 config item. Now I'm getting the
ioctl(FIONBIO) failed while spawning 'worker process' (22: Invalid argument)
error

@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut May 5, 2016

Member

I have verified that with IPV6ONLY fix and the fix to return EADDRINUSE in bind() when a port is already in use, apache2 starts fine (although it emits a warning around APR_TCP_DEFER_ACCEPT). I was able to connect to the apache webserver port using a browser and access the default page. These fixes should show up soon in the insider builds. Thanks for trying out WSL and providing feedback!

Member

sunilmut commented May 5, 2016

I have verified that with IPV6ONLY fix and the fix to return EADDRINUSE in bind() when a port is already in use, apache2 starts fine (although it emits a warning around APR_TCP_DEFER_ACCEPT). I was able to connect to the apache webserver port using a browser and access the default page. These fixes should show up soon in the insider builds. Thanks for trying out WSL and providing feedback!

@adityanag

This comment has been minimized.

Show comment
Hide comment
@adityanag

adityanag May 12, 2016

Confirmed that apache2 is working in the latest build with no need to edit any config files.

However, nginx still doesn't work. I get a slightly different error (FIOASYNC)

2016/05/12 04:07:38 [alert] 354#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)

adityanag commented May 12, 2016

Confirmed that apache2 is working in the latest build with no need to edit any config files.

However, nginx still doesn't work. I get a slightly different error (FIOASYNC)

2016/05/12 04:07:38 [alert] 354#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)

@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut May 19, 2016

Member

I took a deeper look at 'Nginx'. It first binds to an IPv4 address and then to an IPv6 address (to the same port by default) using the IPV6_V6ONLY option. Unfortunately, we are not able to support the scenario immediately and we have a bug tracking this.
As an alternative, there are couple of options as workarounds:
Edit the default configuration of Nginx to start at different ports on IPv4 and IPv6. Or, use either IPv4 or IPv6. The port configuration for Nginx is stored in '/etc/nginx/sites-enabled/default'. I was able to verify that both these workarounds work and the Nginx server starts successfully on build 14342. We know its not ideal, but at least gets your one step further.
Meanwhile, we have an understanding of the bug on our side, but unfortunately, it might take some time to fix it because of dependencies outside of WSL.

Member

sunilmut commented May 19, 2016

I took a deeper look at 'Nginx'. It first binds to an IPv4 address and then to an IPv6 address (to the same port by default) using the IPV6_V6ONLY option. Unfortunately, we are not able to support the scenario immediately and we have a bug tracking this.
As an alternative, there are couple of options as workarounds:
Edit the default configuration of Nginx to start at different ports on IPv4 and IPv6. Or, use either IPv4 or IPv6. The port configuration for Nginx is stored in '/etc/nginx/sites-enabled/default'. I was able to verify that both these workarounds work and the Nginx server starts successfully on build 14342. We know its not ideal, but at least gets your one step further.
Meanwhile, we have an understanding of the bug on our side, but unfortunately, it might take some time to fix it because of dependencies outside of WSL.

@paladox

This comment has been minimized.

Show comment
Hide comment
@paladox

paladox May 27, 2016

@sunilmut nginx still dosent start.

Shows this error now

2016/05/27 20:06:36 [alert] 79#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)
2016/05/27 20:06:36 [alert] 79#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)
2016/05/27 20:06:36 [alert] 79#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)
2016/05/27 20:06:36 [alert] 79#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)

I'm using the latest windows 10 build insider as of today.

paladox commented May 27, 2016

@sunilmut nginx still dosent start.

Shows this error now

2016/05/27 20:06:36 [alert] 79#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)
2016/05/27 20:06:36 [alert] 79#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)
2016/05/27 20:06:36 [alert] 79#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)
2016/05/27 20:06:36 [alert] 79#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)

I'm using the latest windows 10 build insider as of today.

@roydejong

This comment has been minimized.

Show comment
Hide comment
@roydejong

roydejong May 28, 2016

+1, nginx is still broken even when ipv6 is disabled:

2016/05/28 16:39:56 [alert] 53#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)

roydejong commented May 28, 2016

+1, nginx is still broken even when ipv6 is disabled:

2016/05/28 16:39:56 [alert] 53#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)
@xyzith

This comment has been minimized.

Show comment
Hide comment
@xyzith

xyzith May 30, 2016

The windows HTTP Kernel-mode driver also block port 80.
http://flummox-engineering.blogspot.com/2015/08/apache-cannot-run-on-port-80-on-windows.html

After I disabled the HTTP Kernel-mode, I got the same error in error.log
ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)

xyzith commented May 30, 2016

The windows HTTP Kernel-mode driver also block port 80.
http://flummox-engineering.blogspot.com/2015/08/apache-cannot-run-on-port-80-on-windows.html

After I disabled the HTTP Kernel-mode, I got the same error in error.log
ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)

@chrisboylan

This comment has been minimized.

Show comment
Hide comment
@chrisboylan

chrisboylan Jun 7, 2016

Yes, I'm on 14352, and even after setting:
listen 8080 default_server;
listen [::]:8081 default_server;
When I curl http://localhost:8080, the request never completes, and error.log has 4 lines of:
[alert] 9832#9832: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)

@sunilmut - Can we remove the "workaround-available" tag since the workaround doesn't work?

chrisboylan commented Jun 7, 2016

Yes, I'm on 14352, and even after setting:
listen 8080 default_server;
listen [::]:8081 default_server;
When I curl http://localhost:8080, the request never completes, and error.log has 4 lines of:
[alert] 9832#9832: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)

@sunilmut - Can we remove the "workaround-available" tag since the workaround doesn't work?

@Heerozh

This comment has been minimized.

Show comment
Hide comment
@Heerozh

Heerozh Jun 10, 2016

Add this to nginx.conf will let u able to run nginx, enough for development environment:
master_process off;
daemon off;

Heerozh commented Jun 10, 2016

Add this to nginx.conf will let u able to run nginx, enough for development environment:
master_process off;
daemon off;

@wizardist

This comment has been minimized.

Show comment
Hide comment
@wizardist

wizardist Aug 17, 2016

@dumindaxsb it works indeed. I could manage to start Nginx using pretty much the same steps. But I failed to do so at port 80. Is it blocked or what?

wizardist commented Aug 17, 2016

@dumindaxsb it works indeed. I could manage to start Nginx using pretty much the same steps. But I failed to do so at port 80. Is it blocked or what?

@PeterDraex

This comment has been minimized.

Show comment
Hide comment
@PeterDraex

PeterDraex Aug 18, 2016

@wizardist It works for me on port 80. You can use netstat in powershell to find out what's blocking your 80.

PeterDraex commented Aug 18, 2016

@wizardist It works for me on port 80. You can use netstat in powershell to find out what's blocking your 80.

@Pilskalns

This comment has been minimized.

Show comment
Hide comment
@Pilskalns

Pilskalns Aug 19, 2016

Even after long search, I have not found clear answer for choose between Unix socket and TCP when using Nginx+PHP-FPM.

  • In case of Unix socket I get nginx error:
    2016/08/19 14:21:49 [alert] 412#0: *3 connect() failed (22: Invalid argument) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "localhost:8080"
  • In case of TCP port it works, but /var/log/php5-fpm.log every second gets line of:
    [19-Aug-2016 14:31:50] ERROR: failed to retrieve TCP_INFO for socket: Invalid argument (22)
    This is not production, but I can't turn it off with php settings, at some point silently spamming, that file will grow huge.

My setup from clean installation:

  • /etc/nginx/nginx.conf:
    user www-data; master_process off; ... fastcgi_pass {with port or socket};
  • /etc/php5/fpm/pool.d/www.conf:
    listen.mode = 0660 listen = 127.0.0.1:9009 or listen = /var/run/php5-fpm.sock

If I spoil permissions, then error is different. What would you advise?

Pilskalns commented Aug 19, 2016

Even after long search, I have not found clear answer for choose between Unix socket and TCP when using Nginx+PHP-FPM.

  • In case of Unix socket I get nginx error:
    2016/08/19 14:21:49 [alert] 412#0: *3 connect() failed (22: Invalid argument) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "localhost:8080"
  • In case of TCP port it works, but /var/log/php5-fpm.log every second gets line of:
    [19-Aug-2016 14:31:50] ERROR: failed to retrieve TCP_INFO for socket: Invalid argument (22)
    This is not production, but I can't turn it off with php settings, at some point silently spamming, that file will grow huge.

My setup from clean installation:

  • /etc/nginx/nginx.conf:
    user www-data; master_process off; ... fastcgi_pass {with port or socket};
  • /etc/php5/fpm/pool.d/www.conf:
    listen.mode = 0660 listen = 127.0.0.1:9009 or listen = /var/run/php5-fpm.sock

If I spoil permissions, then error is different. What would you advise?

@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Sep 14, 2016

Member

With the help of the Windows networking team, we were able to fully implement the IPV6_V6ONLY flag. Hopefully this should resolve a bunch of issues here. The fix is still in our dev branch, but should soon hit the release branch.

Member

sunilmut commented Sep 14, 2016

With the help of the Windows networking team, we were able to fully implement the IPV6_V6ONLY flag. Hopefully this should resolve a bunch of issues here. The fix is still in our dev branch, but should soon hit the release branch.

@sunilmut sunilmut added the fixinbound label Sep 14, 2016

@wizardist

This comment has been minimized.

Show comment
Hide comment
@wizardist

wizardist Sep 26, 2016

@dumindaxsb it works indeed. I could manage to start Nginx using pretty much the same steps. But I failed to do so at port 80. Is it blocked or what?

Just in case, Skype occupied port 80. Turning that feature of Skype off helped.

wizardist commented Sep 26, 2016

@dumindaxsb it works indeed. I could manage to start Nginx using pretty much the same steps. But I failed to do so at port 80. Is it blocked or what?

Just in case, Skype occupied port 80. Turning that feature of Skype off helped.

@bitcrazed bitcrazed added fixed and removed fixinbound labels Sep 28, 2016

@bitcrazed

This comment has been minimized.

Show comment
Hide comment
@bitcrazed

bitcrazed Sep 28, 2016

Collaborator

Should now be fixed in build 14936. Please let us know if you see this issue persist.

Collaborator

bitcrazed commented Sep 28, 2016

Should now be fixed in build 14936. Please let us know if you see this issue persist.

@hanlinking

This comment has been minimized.

Show comment
Hide comment
@hanlinking

hanlinking Oct 8, 2016

I still have this issue in build 14942 with Ubuntu 16.04. whatever port I want bind return error, port is in using.I try every solution above but It still not work.on the othersides, I run a dotnet core web sample and the kestrel also return could not bind the port,I have tryso many port.

hanlinking commented Oct 8, 2016

I still have this issue in build 14942 with Ubuntu 16.04. whatever port I want bind return error, port is in using.I try every solution above but It still not work.on the othersides, I run a dotnet core web sample and the kestrel also return could not bind the port,I have tryso many port.

@zhaorenjie110

This comment has been minimized.

Show comment
Hide comment
@zhaorenjie110

zhaorenjie110 Oct 10, 2016

@hanlinking i am also 14942 with 16.04 , you can try it ,it work for me.
image

zhaorenjie110 commented Oct 10, 2016

@hanlinking i am also 14942 with 16.04 , you can try it ,it work for me.
image

@hanlinking

This comment has been minimized.

Show comment
Hide comment
@hanlinking

hanlinking Oct 10, 2016

@zhaorenjie110 哥们不行啊。我这么做了之后确实没有报错了。但是windows这边还是连接不了nginx,我试了几个端口了,确定没有被使用。

hanlinking commented Oct 10, 2016

@zhaorenjie110 哥们不行啊。我这么做了之后确实没有报错了。但是windows这边还是连接不了nginx,我试了几个端口了,确定没有被使用。

@kundralaci

This comment has been minimized.

Show comment
Hide comment
@kundralaci

kundralaci Oct 15, 2016

I'm still facing problems with ERR_CONTENT_LENGTH_MISMATCH.

@Mocilol advised output_buffers 2 10m; but it makes no difference for me.

My two additional observations:

  • On Windows clients (Chrome) I don't get this error (strange!), only on Linux (Chrome), Android (Chrome), and iOS (Safari).
  • This error always occurs, if the requested file is > 256k. In this case, only the first 256k is received, nginx stops sending and finally timeouts (based on the send_timeout 2; value - it can be 10, 20, ... whatever value), so the browser fails with length mismatch.

I have also tested this with several nginx config files, one of them is the built-in default, and it haven't worked in any circumstances.

Win10 version: 14393.321 (1607)
nginx version: 1.10.1
Chrome version: 53.x

My questions:

  • Should I open a new issue? Since nginx starts, but won't serve files larger than 256k.
  • Does it also happen to others?
  • Does anyone know a workaround?

kundralaci commented Oct 15, 2016

I'm still facing problems with ERR_CONTENT_LENGTH_MISMATCH.

@Mocilol advised output_buffers 2 10m; but it makes no difference for me.

My two additional observations:

  • On Windows clients (Chrome) I don't get this error (strange!), only on Linux (Chrome), Android (Chrome), and iOS (Safari).
  • This error always occurs, if the requested file is > 256k. In this case, only the first 256k is received, nginx stops sending and finally timeouts (based on the send_timeout 2; value - it can be 10, 20, ... whatever value), so the browser fails with length mismatch.

I have also tested this with several nginx config files, one of them is the built-in default, and it haven't worked in any circumstances.

Win10 version: 14393.321 (1607)
nginx version: 1.10.1
Chrome version: 53.x

My questions:

  • Should I open a new issue? Since nginx starts, but won't serve files larger than 256k.
  • Does it also happen to others?
  • Does anyone know a workaround?
@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Oct 16, 2016

Contributor

Is this perhaps related to #610 ?

Contributor

aseering commented Oct 16, 2016

Is this perhaps related to #610 ?

@kundralaci

This comment has been minimized.

Show comment
Hide comment
@kundralaci

kundralaci Oct 17, 2016

The root of the problem seems similar for me!

kundralaci commented Oct 17, 2016

The root of the problem seems similar for me!

@magic007

This comment has been minimized.

Show comment
Hide comment
@magic007

magic007 Oct 21, 2016

加上这2个master_process off; daemon off;,把运行方式改为TCP模式9000,确实可以运行。不过PHP页面速度太慢,还不如访问虚拟机的速度。

magic007 commented Oct 21, 2016

加上这2个master_process off; daemon off;,把运行方式改为TCP模式9000,确实可以运行。不过PHP页面速度太慢,还不如访问虚拟机的速度。

@jackchammons jackchammons added the nginx label Oct 24, 2016

@sunilmut sunilmut removed the fixed label Nov 18, 2016

@misenesi

This comment has been minimized.

Show comment
Hide comment
@misenesi

misenesi Dec 7, 2016

The FIOASYNC is a duplicate of this bug bug. It is lack of support for socket async I/O notifications.

misenesi commented Dec 7, 2016

The FIOASYNC is a duplicate of this bug bug. It is lack of support for socket async I/O notifications.

@stehufntdev

This comment has been minimized.

Show comment
Hide comment
@stehufntdev

stehufntdev Jan 19, 2017

Collaborator

After adding signal driven IO support for unix stream sockets, I was able to run nginx locally and load the default site. Also confirmed that the errors were gone from the nginx error log.

The fix should be out in insider builds soon.

Collaborator

stehufntdev commented Jan 19, 2017

After adding signal driven IO support for unix stream sockets, I was able to run nginx locally and load the default site. Also confirmed that the errors were gone from the nginx error log.

The fix should be out in insider builds soon.

@hanlinking

This comment has been minimized.

Show comment
Hide comment
@hanlinking

hanlinking Jan 21, 2017

@stehufntdev Can you tell me how to do for this "signal driven IO support for unix stream sockets"?

hanlinking commented Jan 21, 2017

@stehufntdev Can you tell me how to do for this "signal driven IO support for unix stream sockets"?

@stehufntdev

This comment has been minimized.

Show comment
Hide comment
@stehufntdev

stehufntdev Jan 21, 2017

Collaborator

@hanlinking sorry didn't quite follow your reply, could you please clarify?

By "signal driven IO support for unix stream sockets", I was referring to nginx's use of FIOASYNC with F_SETOWNER on a unix stream socket. This combination of syscalls enables SIGIO to be delivered when interesting events happen on the socket. That fix seems to have been the last thing blocking nginx's default configuration from starting and should be out in an insider build soon.

Collaborator

stehufntdev commented Jan 21, 2017

@hanlinking sorry didn't quite follow your reply, could you please clarify?

By "signal driven IO support for unix stream sockets", I was referring to nginx's use of FIOASYNC with F_SETOWNER on a unix stream socket. This combination of syscalls enables SIGIO to be delivered when interesting events happen on the socket. That fix seems to have been the last thing blocking nginx's default configuration from starting and should be out in an insider build soon.

@samayo

This comment has been minimized.

Show comment
Hide comment
@samayo

samayo Jan 27, 2017

Still having the same problem. The solution from @dumindaxsb doesn't work, since I can't restart, stop, start nginx afterwards. It just gets stuck

samayo commented Jan 27, 2017

Still having the same problem. The solution from @dumindaxsb doesn't work, since I can't restart, stop, start nginx afterwards. It just gets stuck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment