Skip to content

Nginx not start #68

Closed
Closed

Description

@exileed

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)

Activity

  1. deyvisonrocha commented on Apr 8, 2016

    @deyvisonrocha

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

  2. hungys commented on Apr 10, 2016

    @hungys

    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)
    
  3. sunilmut commented on Apr 12, 2016

    @sunilmut
    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.

  4. sunilmut commented on Apr 13, 2016

    @sunilmut
    Member

    Luis Ávila (@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?

  5. luisfavila commented on Apr 13, 2016

    @luisfavila

    Sunil Muthuswamy (@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

  6. sunilmut commented on Apr 13, 2016

    @sunilmut
    Member

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

  7. sunilmut commented on Apr 13, 2016

    @sunilmut
    Member

    Luis Ávila (@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.

  8. afridlund85 commented on Apr 14, 2016

    @afridlund85

    Luis Ávila (@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?

  9. luisfavila commented on Apr 14, 2016

    @luisfavila

    Andreas Fridlund (@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?

    Sunil Muthuswamy (@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.

    Sunil Muthuswamy (@sunilmut) Great! Looking forward to test it!

  10. Geeknux commented on Apr 17, 2016

    @Geeknux

    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
    
  11. luisfavila commented on Apr 17, 2016

    @luisfavila

    Amir M. Mahmoudi (@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.

  12. Geeknux commented on Apr 18, 2016

    @Geeknux

    Luis Ávila (@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.

  13. luisfavila commented on Apr 18, 2016

    @luisfavila

    Amir M. Mahmoudi (@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

  14. hungys commented on Apr 23, 2016

    @hungys

    Still encounter the same issue on the latest build.

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

  15. 44 remaining items

  16. kundralaci commented on Oct 15, 2016

    @kundralaci

    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?
  17. aseering commented on Oct 16, 2016

    @aseering
    Contributor

    Is this perhaps related to #610 ?

  18. kundralaci commented on Oct 17, 2016

    @kundralaci

    The root of the problem seems similar for me!

  19. magic007 commented on Oct 21, 2016

    @magic007

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

  20. misenesi commented on Dec 7, 2016

    @misenesi

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

  21. stehufntdev commented on Jan 19, 2017

    @stehufntdev

    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.

  22. hanlinking commented on Jan 21, 2017

    @hanlinking

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

  23. stehufntdev commented on Jan 21, 2017

    @stehufntdev

    HenyLoo (@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.

  24. samayo commented on Jan 27, 2017

    @samayo

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions