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

Docker Swarm issue - Address in use (upstream issue) #33

Closed
alexellis opened this Issue Aug 16, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@alexellis
Member

alexellis commented Aug 16, 2017

When re-deploying a function (aka Docker Swarm Service) we can get an error "Address in use - unable to allocate container" or similar.

I've raised the issue upstream but it's been open 30 days already. I don't believe the issue occurs when using Kubernetes as a back-end.

moby/moby#34163

The Docker swarm work-around appears to be to deploy again after a few seconds or to use docker service rm via the Docker CLI first.

I think this might also be fixed with a restart policy of > 1.

https://github.com/alexellis/faas/blob/master/gateway/handlers/functionshandler.go#L189

@rorpage

This comment has been minimized.

Contributor

rorpage commented Aug 16, 2017

The same is happening for me as well. My workaround is to simply re-issue the deploy command:
faas-cli -action deploy -f ./stack.yml and then my function starts.

@alexellis

This comment has been minimized.

Member

alexellis commented Aug 16, 2017

I'll update the Python blog post with a few notes on troubleshooting & logs. https://blog.alexellis.io/first-faas-python-function/

@alexellis

This comment has been minimized.

Member

alexellis commented Aug 16, 2017

The following work-around fixes the observed behaviour - openfaas/faas#128

Ideally this will be fixed upstream too.

@alexellis alexellis self-assigned this Aug 16, 2017

@alexellis alexellis changed the title from Docker Swarm issue - Address in use to Docker Swarm issue - Address in use (upstream issue) Aug 16, 2017

@alexellis

This comment has been minimized.

Member

alexellis commented Nov 29, 2017

Closing since we have a work-around built-in.

@alexellis alexellis closed this Nov 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment