Skip to content
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

bind(): Cannot assign requested address #8

Open
namedgraph opened this issue Jul 5, 2017 · 8 comments
Open

bind(): Cannot assign requested address #8

namedgraph opened this issue Jul 5, 2017 · 8 comments

Comments

@namedgraph
Copy link

When running from docker-compose, I get the following:

bind(): Cannot assign requested address
varnish_dydra_1  | child (14) Started
varnish_dydra_1  | Child (14) said Child starts

Any idea what the problem with bind() is?

@pozgo
Copy link
Member

pozgo commented Jul 6, 2017

Hi,

Could you provide the full spec of docker-compose.yaml?
Are you using custom config?

It seems it's varnish issue rather then docker image issue, but I might be wrong here. ;)

@karelbemelmans
Copy link

karelbemelmans commented Jul 23, 2017

I'm getting the same issue. Just try this and you get the error too:

docker run million12/varnish

This is with the latest Docker for Mac:

Client:
 Version:      17.06.1-ce-rc1
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   77b4dce
 Built:        Fri Jul 14 07:38:15 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.06.1-ce-rc1
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   77b4dce
 Built:        Fri Jul 14 07:33:35 2017
 OS/Arch:      linux/amd64
 Experimental: true

@nbeernink
Copy link

I hit the same error and got thrown off by it thinking it was a firewall issue. The bind error is most likely due to the fact that varnish cannot bind to ipv6 because there is no ipv6 local address in this docker image:

[root@e3f80793efd1 /]# ip addr show lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever

I'm guessing the bind error won't show if there is an inet6 available.

@electricBonfire
Copy link

Getting the same error.
Does this prevent the image from working correctly?
Does it need ipv6 to run, or will it still be up and running using ipv4 and we can ignore this error?

@nbeernink
Copy link

As far as I've noticed, it does not require IPv6 and the error can safely be ignored.

@namedgraph
Copy link
Author

I gave up on this and built my own image:
https://hub.docker.com/r/atomgraph/varnish/

@nbeernink
Copy link

@pumba-lt Thanks, although this probably off semi-offtopic; I think you fixed the "notice" in your image (which doesn't seem to be a problem) by specifying the -a option to listen on a specific address, this image doesn't do that and according to the man page, varnish tries to listens on all interfaces.

Varnish seems to assume there's always an ipv6 interface and shows bind(): Cannot assign requested address if there's none.

https://linux.die.net/man/1/varnishd

@OnkelTem
Copy link

OnkelTem commented May 17, 2018

@nbeernink

Well, it didn't work for me either - with -a or without -a.

My command line was:

varnishd -d -b 172.18.0.5:80 -s malloc,64m -a 172.18.0.6:80

where,
172.18.0.5 is the address of my web server
172.18.0.6 is the address of this container

The output was:

Platform: Linux,4.13.0-41-generic,x86_64,-smalloc,-smalloc,-hcritbit
200 278     
-----------------------------
Varnish Cache CLI 1.0
-----------------------------
Linux,4.13.0-41-generic,x86_64,-smalloc,-smalloc,-hcritbit
varnish-4.0.5 revision 07eff4c29

Type 'help' for command list.
Type 'quit' to close CLI session.
Type 'start' to launch worker process.

bind(): Cannot assign requested address

It's not a fatal error, I agree, but I personally don't like to get any nonsense notices...

Going to build my own image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants