dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.23k stars 1.57k forks source link

pub serve "AcceptEx failed" #15433

Closed DartBot closed 9 years ago

DartBot commented 10 years ago

This issue was originally filed by xavier.hainau...@gmail.com


What steps will reproduce the problem?

  1. Run "pub serve --verbose" on Windows 8

What is the expected output? What do you see instead? The server doesn't start but instead it outputs:

FINE: Pub 1.0.1+3.r30657 IO : Spawning cmd /c ver IO : Finished ver. Exit code 0.stdout:Microsoft Windows [Version 6.2.9200]Nothing output on stderr. AcceptEx failed: 10022 AcceptEx failed: 10022 AcceptEx failed: 10022 AcceptEx failed: 10022 AcceptEx failed: 10022 AcceptEx failed: 10022 ...

'AcceptEx failed' loops infinitely

What version of the product are you using? On what operating system? Editor: 1.0.1_r30657 (2013-11-26) OS: Windows 8 - amd64 (6.2)

Please provide any additional information below.

kasperl commented 10 years ago

Added Area-Pub, Triaged labels.

sgjesse commented 10 years ago

This might be issue #11165.

Does pub serve use IPv6 for serving? What does ipconfig /all say - is there an IPv6 address at all?

nex3 commented 10 years ago

"pub serve" creates an HttpServer on "localhost", so it's possible that it is trying to use IPv6 here.


Removed Area-Pub label. Added Area-IO label.

DartBot commented 10 years ago

This comment was originally written by xavier.ha...@gmail.com


Hi, Here is the result of "ipconfig /all":

Windows IP Configuration

   Host Name . . . . . . . . . . . . : HAINAUXX    Primary Dns Suffix . . . . . . . : produweb-gaming.com    Node Type . . . . . . . . . . . . : Hybrid    IP Routing Enabled. . . . . . . . : No    WINS Proxy Enabled. . . . . . . . : No    DNS Suffix Search List. . . . . . : produweb-gaming.com

Ethernet adapter Ethernet 2:

   Connection-specific DNS Suffix . : produweb-gaming.com    Description . . . . . . . . . . . : Intel(R) 82579LM Gigabit Network Connection    Physical Address. . . . . . . . . : 88-51-FB-40-06-2C    DHCP Enabled. . . . . . . . . . . : Yes    Autoconfiguration Enabled . . . . : Yes    Link-local IPv6 Address . . . . . : fe80::6101:6c9f:b70:32d5%20(Preferred)    IPv4 Address. . . . . . . . . . . : 10.0.0.182(Preferred)    Subnet Mask . . . . . . . . . . . : 255.255.254.0    Lease Obtained. . . . . . . . . . : jeudi 5 d‚cembre 2013 08:49:16    Lease Expires . . . . . . . . . . : jeudi 5 d‚cembre 2013 10:49:14    Default Gateway . . . . . . . . . : 10.0.0.1    DHCP Server . . . . . . . . . . . : 10.0.0.1    DHCPv6 IAID . . . . . . . . . . . : 394809851    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-59-BE-FB-D8-9D-67-D0-24-83    DNS Servers . . . . . . . . . . . : 10.0.1.203    NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix . :    Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter    Physical Address. . . . . . . . . : 08-00-27-00-F4-26    DHCP Enabled. . . . . . . . . . . : No    Autoconfiguration Enabled . . . . : Yes    Link-local IPv6 Address . . . . . : fe80::388a:7ac2:ed9d:6a61%28(Preferred)    IPv4 Address. . . . . . . . . . . : 192.168.56.1(Preferred)    Subnet Mask . . . . . . . . . . . : 255.255.255.0    Default Gateway . . . . . . . . . :    DHCPv6 IAID . . . . . . . . . . . : 520618023    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-59-BE-FB-D8-9D-67-D0-24-83    DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1                                        fec0:0:0:ffff::2%1                                        fec0:0:0:ffff::3%1    NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Media State . . . . . . . . . . . : Media disconnected    Connection-specific DNS Suffix . :    Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0    DHCP Enabled. . . . . . . . . . . : No    Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{47C237A6-059C-46C6-886E-4E1C238C1F70}:

   Media State . . . . . . . . . . . : Media disconnected    Connection-specific DNS Suffix . :    Description . . . . . . . . . . . : Microsoft ISATAP Adapter #­2    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0    DHCP Enabled. . . . . . . . . . . : No    Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.produweb-gaming.com:

   Media State . . . . . . . . . . . : Media disconnected    Connection-specific DNS Suffix . :    Description . . . . . . . . . . . : Microsoft ISATAP Adapter #­3    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0    DHCP Enabled. . . . . . . . . . . : No    Autoconfiguration Enabled . . . . : Yes

It seems there is an IPv6.

sgjesse commented 10 years ago

There is a link-local IPv6 address, but not an assigned public one. I assume that your hosts file (%SystemRoot%\System32\drivers\etc\hosts) has this:

localhost name resolution is handled within DNS itself.

127.0.0.1 localhost

::1 localhost

Could you try to change that to

localhost name resolution is handled within DNS itself.

        127.0.0.1 localhost

::1 localhost

That is forcing localhost to resolve to 127.0.0.1.

DartBot commented 10 years ago

This comment was originally written by xavier.ha...@gmail.com


Thank your for your help.

I changed my host file (enabling 127.0.0.1 localhost) but it doesn't work.

I confirm that it has to do with IP_V6 because I am able to write a http server with HttpServer.bind(InternetAddress.ANY_IP_V4, port) but it fail with ANY_IP_V6.

sgjesse commented 10 years ago

Thank you for trying this.

I just checked the pub source, and it turns out that there is a hidden option 'hostname' which defaults to 'localhost. Running the following should force pub serve to use IPv4.

pub serve --hostname 127.0.0.1

DartBot commented 10 years ago

This comment was originally written by xavier.ha...@gmail.com


Thanks, it works with "pub serve --hostname 127.0.0.1"

andersjohnsen commented 10 years ago

This was fixed back in r31265.


Set owner to @sgjesse. Added Fixed label.

kevmoo commented 10 years ago

Removed Area-IO label. Added Area-Library, library-io labels.