-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Connection errors found when use listening addess '0.0.0.0'. #7961
Comments
/cc @xiang90 |
Probably related to the json gateway. I can partially reproduce this on osx, but not the exact error: $ nc -l localhost 3379 &
$ ./bin/etcd --listen-client-urls 'http://0.0.0.0:3379' --advertise-client-urls 'http://192.168.199.118:3379' --listen-peer-urls 'http://0.0.0.0:3380' &
...
2017-05-22 11:13:42.231696 I | etcdserver/api/v3rpc: grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::]:3379: getsockopt: connection reset by peer"; Reconnecting to {[::]:3379 <nil>}
2017-05-22 11:13:42.231762 I | etcdserver/api/v3rpc: grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::]:3379: getsockopt: connection reset by peer"; Reconnecting to {[::]:3379 <nil>}
2017-05-22 11:14:02.231361 I | etcdserver/api/v3rpc: grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::]:3379: i/o timeout"; Reconnecting to {[::]:3379 <nil>}
2017-05-22 11:14:02.231429 I | etcdserver/api/v3rpc: grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::]:3379: i/o timeout"; Reconnecting to {[::]:3379 <nil>}
2017-05-22 11:14:02.231458 I | etcdserver/api/v3rpc: grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::]:3379: i/o timeout"; Reconnecting to {[::]:3379 <nil>}
2017-05-22 11:14:02.231683 I | etcdserver/api/v3rpc: grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::]:3379: i/o timeout"; Reconnecting to {[::]:3379 <nil>} No luck on Linux, get |
On linux machine, I've also tried both master branch and 3.2.0-rc.1, and works fine? |
@heyitsanthony You may try 2379 instead, I'm using 3379 only because I have another etcd instance occupied 2379. @gyuho It seems that to reproduce the error depends on system or network configuration somehow. I've also noticed on some system/machine it's ok to dial '0.0.0.0' to establish a connection. But I think the problem is we should always dial the advertised address instead of 0.0.0.0. |
https://github.com/coreos/etcd/blob/f75e33326406a4f05bd2a92ddf214ec4018e5b0b/embed/serve.go#L167 may be related to this issue. It uses the listener's addr to register some handlers. |
@disksing yes, it's from the grpc json gateway dial-out. I'd like to have a way to reproduce this bug instead of blindly using the advertise address and saying it's fixed. |
@heyitsanthony If you can not easily reproduce the problem, perhaps you may fix it blindly then let me to help the test. |
@disksing I really need to know the root cause here. I don't think using advertise address is the right fix-- the machine could be NATed in such a way that going through the advertise address would need more hops than serving directly off the listen address or possibly not even be able to connect at all. |
+1 Thanks |
+1 |
@ghovat @carlitos26 is there a way to reliably reproduce this? |
net.Listener say its address is [::] when given 0.0.0.0, breaking hosts that have ipv6 disabled. Fixes etcd-io#8151 Fixes etcd-io#7961
net.Listener says its address is [::] when given 0.0.0.0, breaking hosts that have ipv6 disabled. Fixes etcd-io#8151 Fixes etcd-io#7961
Got this bug with running etcd on alpine:edge testing repository, Don't know if was fixed in 3.2.1 version or not, but here's the way how to reproduce it: etcd --version
Dockerfile.alpine (nfox/etcd:alpine docker image):
Docker container run script:
|
@tarvitz this is fixed in 3.2.2 |
net.Listener says its address is [::] when given 0.0.0.0, breaking hosts that have ipv6 disabled. Fixes etcd-io#8151 Fixes etcd-io#7961
Bug reporting
A good bug report has some very specific qualities, so please read over our short document on reporting bugs before submitting a bug report.
To ask a question, go ahead and ignore this.
Hey,
I'm trying to run etcd with listening address '0.0.0.0', then etcd server ends up repeatedly producing the error 'transport: dial tcp [::]:3379: connect: network is unreachable'.
I'm not sure where the transport is started, but I guess you want to use the advertised addr instead of listening addr.
Outout:
The text was updated successfully, but these errors were encountered: