Cannot bind socket error for squid proxy

http-proxyPROXYsquid

I set up a squid proxy inside a docker-machine using the datadog/squid image, when I access the cache.log file inside the container I see the following at the end of the logs:

2017/11/06 21:45:10| HTCP Disabled.
2017/11/06 21:45:10| commBind: Cannot bind socket FD 13 to [::1]: (99) Cannot assign requested address
2017/11/06 21:45:10| commBind: Cannot bind socket FD 14 to [::1]: (99) Cannot assign requested address
2017/11/06 21:45:10| ERROR: Failed to create helper child read FD: UDP[::1]
2017/11/06 21:45:10| Squid plugin modules loaded: 0
2017/11/06 21:45:10| Adaptation support is off.
2017/11/06 21:45:10| Accepting HTTP Socket connections at local=[::]:3128 remote=[::] FD 12 flags=9

I'm not sure what exactly the commBind errors are originating from, what should I be looking into?

Best Answer

Squid is trying to bind to sockets on localhost using IPv6 (::1).

According to Docker's documentation, Docker containers aren't configured to support IPv6 by default, however you can enable it with the --ipv6 flag.

If your use case doesn't require IPv6, you can ignore this error if Squid is otherwise working. Otherwise you can use the above Docker flag or review your Squid configuration.