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

Updating traefik options results to exit code 125 #140

Closed
kimmobrunfeldt opened this issue Mar 22, 2023 · 8 comments
Closed

Updating traefik options results to exit code 125 #140

kimmobrunfeldt opened this issue Mar 22, 2023 · 8 comments

Comments

@kimmobrunfeldt
Copy link

kimmobrunfeldt commented Mar 22, 2023

When deploying with updated traefik options, I got this error during mrsk deploy

Ensure Traefik is running...
  INFO [3253ca90] Running docker run --name traefik --detach --restart unless-stopped --log-opt max-size=10m --publish 80:80 --volume /var/run/docker.sock:/var/run/docker.sock traefik --providers.docker --log.level=DEBUG --entryPoints.web.forwardedHeaders.insecure on 162.55.41.175
  INFO [3253ca90] Finished in 0.382 seconds with exit status 125 (failed).

First deployment done with: no traefik options in yml config. Second deployment (when error occured) was done with these updated options:

traefik:
  args:
    entryPoints.web.address: ':80'
    entryPoints.web.forwardedHeaders.insecure: true
@kimmobrunfeldt
Copy link
Author

Workaround for this was to SSH into the machine and run docker stop traefik && docker rm traefik before deployment

@calmyournerves
Copy link
Contributor

Out of curiosity: Does it work with entryPoints.web.forwardedHeaders.insecure: 'true'?

@kjellberg
Copy link
Contributor

kjellberg commented Mar 22, 2023

Workaround for this was to SSH into the machine and run docker stop traefik && docker rm traefik before deployment

Try with

$ mrsk traefik reboot

https://github.com/mrsked/mrsk/blob/83dc82661b8a02dd1fbb0ee91261104cee127862/lib/mrsk/cli/traefik.rb#L7

@kimmobrunfeldt
Copy link
Author

kimmobrunfeldt commented Mar 22, 2023

@calmyournerves I got those options working when using latest master. I'm running CloudFlare -> Treafik -> tileserver-gl-light, which requires x-forwarded headers from CF to be passed through.

Those options result into this command:

INFO [a8b7b2f7] Running docker run --name traefik --detach --restart unless-stopped --log-opt max-size=10m --publish 80:80 --volume /var/run/docker.sock:/var/run/docker.sock traefik --providers.docker --log.level=DEBUG --entryPoints.web.address=":80" --entryPoints.web.forwardedHeaders.insecure on 1.2.3.4

I think this

was a required fix to get them correctly forwarded.

@kimmobrunfeldt
Copy link
Author

@kjellberg thanks for the tip!

I was first thinking: what if mrsk automatically updated traefik (i.e. did a reboot and would start it with new options) when required, but it could be quite weird default considering the goal is zero downtime deployments. Not sure how these updates were intended to be dealt with. Anyways wanted to report!

@osbre
Copy link

osbre commented Mar 27, 2023

I'm having the same issue by using custom Traefik labels in the servers.web.labels section of the config. It always shows this error when I'm deploying.

Looking forward to testing the new release which will include #116

@dhh
Copy link
Member

dhh commented Mar 29, 2023

Is this still an issue with 0.10+?

@tannakartikey
Copy link
Contributor

Is this still an issue with 0.10+?

@dhh, I did not face the error on the main branch.

@dhh dhh closed this as completed Apr 10, 2023
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