-
Notifications
You must be signed in to change notification settings - Fork 853
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
Comments
If you comment the second line of listen works. But, not work on Windows accessing the localhost:. =/ |
Same here. I guess the IPv6 is not fully implemented.
|
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. |
@sunilmut What about accessing nginx from Windows? I've got it running, but http://localhost won't work. |
@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? |
@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: |
@luisfavila Regarding "ioctl(FIONBIO)" error, do you know on which file it is calling that IOCTL? |
@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. |
@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 Edited /etc/apache2/ports.conf and changed
@sunilmut No idea, it doesn't tell
@sunilmut Great! Looking forward to test it! |
I compile nginx without enabling IPv6 support bot it doesn't start either i got this error: i compile nginx with this command:
|
@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 |
@luisfavila Yes i did that, but it didn't resolve the problem, at least not for me Update: |
@Geeknux I didn't get nginx to work either, only apache2. Nginx seemed load fine, but checking the error log in |
Still encounter the same issue on the latest build.
|
Same issue. Initially did not bind, so I removed the IPV6 config item. Now I'm getting the |
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! |
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)
|
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. |
@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) I'm using the latest windows 10 build insider as of today. |
+1, nginx is still broken even when ipv6 is disabled:
|
The windows HTTP Kernel-mode driver also block port 80. After I disabled the HTTP Kernel-mode, I got the same error in error.log |
Yes, I'm on 14352, and even after setting: @sunilmut - Can we remove the "workaround-available" tag since the workaround doesn't work? |
Add this to nginx.conf will let u able to run nginx, enough for development environment: |
@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 It works for me on port 80. You can use netstat in powershell to find out what's blocking your 80. |
Even after long search, I have not found clear answer for choose between Unix socket and TCP when using Nginx+PHP-FPM.
My setup from clean installation:
If I spoil permissions, then error is different. What would you advise? |
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. |
Just in case, Skype occupied port 80. Turning that feature of Skype off helped. |
Should now be fixed in build 14936. Please let us know if you see this issue persist. |
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 i am also 14942 with 16.04 , you can try it ,it work for me. |
@zhaorenjie110 哥们不行啊。我这么做了之后确实没有报错了。但是windows这边还是连接不了nginx,我试了几个端口了,确定没有被使用。 |
I'm still facing problems with ERR_CONTENT_LENGTH_MISMATCH. @Mocilol advised My two additional observations:
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) My questions:
|
Is this perhaps related to #610 ? |
The root of the problem seems similar for me! |
加上这2个master_process off; daemon off;,把运行方式改为TCP模式9000,确实可以运行。不过PHP页面速度太慢,还不如访问虚拟机的速度。 |
The FIOASYNC is a duplicate of this bug bug. It is lack of support for socket async I/O notifications. |
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. |
@stehufntdev Can you tell me how to do for this "signal driven IO support for unix stream sockets"? |
@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. |
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 |
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)
The text was updated successfully, but these errors were encountered: