-
Notifications
You must be signed in to change notification settings - Fork 2
Error when binding net addr to 0.0.0.0 #7
Comments
Note: @labkode reported that oCIS can be started without problems |
Could you please try Edit: more about the square bracket notation: https://pkg.go.dev/net#Dial |
@wkloucek same error:
|
If I use
|
@refs Do you have an idea? I'm pretty clueless |
I have not dug into why it does work with the brackets, but have ran into this error when ipv6 is enabled in my machine. Reading up in your link to the docs I see why it works with brackets:
I pretty much think the logic is assuming too much and treats ipv4 as ipv6 (as in: |
I'm confused as to how |
These also include |
I believe it is in go-micro. I'll do some digging and keep us in the loop 👍 |
@wkloucek the corresponding go-micro line that logs is:
digging into go-micro for the version that listener contains the following information (when ipv6 is enabled): that gets parsed as: Digging into the lowest level we find this syscall: if supportsIPv4map() && family == syscall.AF_INET6 && sotype != syscall.SOCK_RAW {
// Allow both IP versions even if the OS default
// is otherwise. Note that some operating systems
// never admit this option.
syscall.SetsockoptInt(s, syscall.IPPROTO_IPV6, syscall.IPV6_V6ONLY, boolint(ipv6only))
} where the condition evaluates to true, sets the socket options to IPv6. By this time the fd does not have any address set, this is acquired here: ...
fd.setAddr(fd.addrFunc()(lsa), nil)
... in and ultimately sets the address to an ipv6 address: func sockaddrToTCP(sa syscall.Sockaddr) Addr {
switch sa := sa.(type) {
case *syscall.SockaddrInet4:
return &TCPAddr{IP: sa.Addr[0:], Port: sa.Port}
case *syscall.SockaddrInet6:
return &TCPAddr{IP: sa.Addr[0:], Port: sa.Port, Zone: zoneCache.name(int(sa.ZoneId))}
}
return nil
} At least in my system. Now, debugging session apart, with ipv6 enabled in my system, I cannot reproduce @labkode's issue: And sub-sequentially running:
work for me. |
I'm running on |
I'm, however, able to reproduce something similar under this circumstances:
that throws {
"level":"error",
"service":"wopiserver",
"error":"listen tcp: address ::1:1111: too many colons in address",
"transport":"http",
"time":"2021-06-23T13:41:28+02:00",
"message":"Failed to start server"
} |
this project is depreciated and will be archived the same error is tracked in oCIS: owncloud/ocis#2300 |
When binding the server to
0.0.0.0
is gives the following error:When running with localhost it works:
The text was updated successfully, but these errors were encountered: