1

I have an issue with the docker daemon installed on an Ubuntu 14.04 VM. The logs reveal that ipv6 is enabled hence the docker seems to be listening on this ip address. Essentially, this effects Clair. I have made sure that ipv6 is disabled on the following recommendation here. I also disabled ipv6 in daemon.json as specified in Docker documentation. My docker version is Docker version 17.06.1-ce, build 874a737.

Docker daemon logs :

time="2018-02-20T20:33:17.736203462+01:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers: [nameserver 2001:4860:4860::8888 nameserver 20 01:4860:4860::8844]"

Clair logs:

2018/02/20 20:43:51 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp [::]:6060: connect: cannot assign requested address"; Reconnecting to {[::]:6060 <nil>} 2018/02/20 20:46:14 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp [::]:6060: connect: cannot assign requested address"; Reconnecting to {[::]:6060 <nil>}

SyCode
  • 1,077
  • 4
  • 22
  • 33
  • 2
    You should not disable IPv6. It's not going away and you are going to need it to communicate with much of the Internet in the near future. – Michael Hampton Feb 20 '18 at 19:59
  • @MichaelHampton thanks a lot, i agree with you regarding the future of ipv6. But right now I am running a development environment which does not require ipv6.:) – SyCode Feb 20 '18 at 20:14
  • 2
    It doesn't require IPv4 either :) – Michael Hampton Feb 20 '18 at 20:33
  • I think [https://github.com/coreos/clair] (Clair) requires ipv4 as shown in the logs below. Sorry, this was not included initially. `2018/02/20 20:46:14 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp [::]:6060: connect: cannot assign requested address"; Reconnecting to {[::]:6060 } ` – SyCode Feb 20 '18 at 20:49

1 Answers1

1

It's trying to make an IPv6 connection, but the address is wrong. [::] is IN6ADDR_ANY, not an actual address you can connect to. Provide the correct address in your config.yaml.

Did you mean to connect to localhost?

api:
  # v3 grpc/RESTful API server address
  addr: "[::1]:6060"
Michael Hampton
  • 9,737
  • 4
  • 55
  • 96
  • Exactly, I need to connect to the localhost. I have tried using addr: "localhost:6060". When an image to Clair, I still have some errors : – SyCode Feb 20 '18 at 21:45