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

Fail to update watchtower when http api is running #952

Open
yrien30 opened this issue May 4, 2021 · 2 comments
Open

Fail to update watchtower when http api is running #952

yrien30 opened this issue May 4, 2021 · 2 comments

Comments

@yrien30
Copy link
Contributor

yrien30 commented May 4, 2021

Describe the bug

Watchtower does not seem to be able to create a new instance of watchtower because http api port is allready used by current watchtower instance.

time="2021-05-04T06:41:49Z" level=debug msg="Renaming container /watchtower (7466244452a6) to bVxoHrZQQfmJwmVPzqUzmrEWtaigXveU"                                                                                                                              │
│   time="2021-05-04T06:41:49Z" level=info msg="Creating /watchtower"                                                                                                                                                                                            │
│   time="2021-05-04T06:41:51Z" level=debug msg="Starting container /watchtower (f2211634e4c3)"                                                                                                                                                                  │
│   time="2021-05-04T06:41:52Z" level=error msg="Error response from daemon: driver failed programming external connectivity on endpoint watchtower (0c44b36fce32cb7f8b15a6ae631577478607525311c1dcd03adebe017933944e): Bind for 0.0.0.0:8080 failed: port is    │
│   already allocated" 

image

To Reproduce
Enable http api:
-p 8080:8080 -e WATCHTOWER_HTTP_API_UPDATE=true -e WATCHTOWER_HTTP_API_TOKEN=Token

@simskij simskij added this to the v1.4.0 milestone May 4, 2021
@simskij
Copy link
Member

simskij commented May 4, 2021

Interesting! Thank you for the report! I'll add it to the 1.4 milestone

@piksel
Copy link
Member

piksel commented Jun 11, 2021

Highly related to #939
I added an endpoint that just closed down the API (given the right token of course) and that just halted the container (since the only thing blocking it is the http server).
Update: And even more confusing, if the http.ErrorServerClosed error is ignored (which it should be), it starts the scheduler upon closing the web API.

@simskij simskij modified the milestones: v1.4.0, v1.5.0 Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants