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

HTTPS entryPoint not working #574

Closed
prologic opened this issue Aug 1, 2016 · 13 comments
Closed

HTTPS entryPoint not working #574

prologic opened this issue Aug 1, 2016 · 13 comments

Comments

@prologic
Copy link

prologic commented Aug 1, 2016

I've been trying to get this to work for the last hour with no luck. Since I'm using your official traefik docker image which is based off of the scratch image there are no ways to debug/inspect the container. I'm trying to get the HTTPS entryPoint working as well as HTTP -> HTTPS redirection.

Everything I've tried thus far has lead to only the daemon listening on port 80

See: https://gist.github.com/2894436a56c8eb92e59941499231ec06

Any ideas what I'm doing wrong?

@emilevauge
Copy link
Member

@prologic your config seems ok. Could you give us your traefik DEBUG logs?

@prologic
Copy link
Author

prologic commented Aug 2, 2016

So despite what looks like a good config and the right options pssed it looks like it isn't loading that config at all?

$ docker-compose -f traefik.yml logs traefik
Attaching to prologic_traefik_1
traefik_1      | time="2016-08-02T06:11:34Z" level=info msg="Traefik version v1.0.1 built on 2016-07-19_03:07:34PM"
traefik_1      | time="2016-08-02T06:11:34Z" level=debug msg="Global configuration loaded {\"GraceTimeOut\":10,\"Debug\":true,\"AccessLogsFile\":\"/data/access_log\",\"TraefikLogsFile\":\"\",\"LogLevel\":\"DEBUG\",\"EntryPoints\":{\"http\":{\"Network\":\"\",\"Address\":\":80\",\"TLS\":null,\"Redirect\":null}},\"Constraints\":[],\"ACME\":null,\"DefaultEntryPoints\":[\"http\"],\"ProvidersThrottleDuration\":2000000000,\"MaxIdleConnsPerHost\":200,\"Retry\":null,\"Docker\":{\"Watch\":true,\"Filename\":\"\",\"Constraints\":[{\"Key\":\"tag\",\"MustMatch\":true,\"Regex\":\"web\"}],\"Endpoint\":\"unix:///var/run/docker.sock\",\"Domain\":\"mills.io\",\"TLS\":null},\"File\":null,\"Web\":{\"Address\":\":8080\",\"CertFile\":\"\",\"KeyFile\":\"\",\"ReadOnly\":false},\"Marathon\":null,\"Consul\":null,\"ConsulCatalog\":null,\"Etcd\":null,\"Zookeeper\":null,\"Boltdb\":null,\"Kubernetes\":null}"
traefik_1      | time="2016-08-02T06:11:34Z" level=info msg="Preparing server http &{Network: Address::80 TLS:<nil> Redirect:<nil>}"
traefik_1      | time="2016-08-02T06:11:34Z" level=info msg="Starting provider *provider.Docker {\"Watch\":true,\"Filename\":\"\",\"Constraints\":[{\"Key\":\"tag\",\"MustMatch\":true,\"Regex\":\"web\"}],\"Endpoint\":\"unix:///var/run/docker.sock\",\"Domain\":\"mills.io\",\"TLS\":null}"
traefik_1      | time="2016-08-02T06:11:34Z" level=info msg="Starting provider *main.WebProvider {\"Address\":\":8080\",\"CertFile\":\"\",\"KeyFile\":\"\",\"ReadOnly\":false}"
traefik_1      | time="2016-08-02T06:11:34Z" level=info msg="Starting server on :80"
traefik_1      | time="2016-08-02T06:11:34Z" level=debug msg="Docker connection established with docker 1.11.2 (API 1.23)"

@migueleliasweb
Copy link

Did you passed the "-c" flag to load the toml ?

@prologic
Copy link
Author

prologic commented Aug 9, 2016

I believe do 😀 be kind of silly if I didn't!

On Tuesday, August 9, 2016, Miguel Elias dos Santos <
[email protected]> wrote:

Did you passed the "-c" flag to load the toml ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#574 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABOv-pjv77XwGmawhK91YdFO0Yz1bFZrks5qeK6_gaJpZM4JZPHt
.

James Mills / prologic

E: [email protected]
W: prologic.shortcircuit.net.au

@emilevauge
Copy link
Member

@prologic the issue seems to be that traefik doesn't use your toml file. You should see a line like INFO[2016-08-09T19:49:33+02:00] Using TOML configuration file /.../traefik.toml in your logs.

@prologic
Copy link
Author

I can confirm I am starting traefik with -c (was --configfile).

It does not seem to actually read the config though and I don't see the
above aforementioned line in the logs.

James Mills / prologic

E: [email protected]
W: prologic.shortcircuit.net.au

On Tue, Aug 9, 2016 at 10:50 AM, Emile Vauge [email protected]
wrote:

@prologic https://github.com/prologic the issue seems to be that
traefik doesn't use your toml file. You should see a line like
INFO[2016-08-09T19:49:33+02:00] Using TOML configuration file
/.../traefik.toml in your logs.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#574 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABOv-p58fY-dm1WQL0djRQzpX9VIXZ69ks5qeL3wgaJpZM4JZPHt
.

@prologic
Copy link
Author

Okay I finally got this working by supplying all of the configuration I really wanted/needed via cli flags:

command: --accesslogsfile=/data/access.log --web --docker --docker.domain="domain.local" --docker.constraints="tag==web" --entrypoints="Name:http Address::80 Redirect.EntryPoint:https" --entryPoints="Name:https Address::443 TLS:/ssl/ssl.crt,/ssl/ssl.key" --defaultentrypoints="http,https" --debug

I'm not sure what the issue is per se; but trying to use a configuration file as well as cli options doesn't seem to work very well.

@prologic
Copy link
Author

And even trying to move all configuration into a config file didn't seem to work either.

@emilevauge
Copy link
Member

@prologic it is working ;) We use toml configuration all the time. The issue is that your file is probably not mounted correctly by Docker (bad path?).

@prologic
Copy link
Author

Nope; it was there and where it should have been :) sigh I'll just use
the cli flags!

James Mills / prologic

E: [email protected]
W: prologic.shortcircuit.net.au

On Wed, Aug 10, 2016 at 12:39 AM, Emile Vauge [email protected]
wrote:

@prologic https://github.com/prologic it is working ;) We use toml
configuration all the time. The issue is that your file is probably not
mounted correctly by Docker (bad path?).


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#574 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABOv-l1PQgMYPCImxd6MkNuabatWAT4mks5qeYA-gaJpZM4JZPHt
.

@emilevauge
Copy link
Member

sigh

Hum, I was just trying to help...

  1. you should version your traefik image in your compose file
  2. you should try to copy the toml from the traefik container to debug this: docker cp yourTraefikContainer:/config/traefik.toml .

@prologic
Copy link
Author

It's okay! Thank you for helping! I'll see if I can debug what was going on
in case it helps someone else!

James Mills / prologic

E: [email protected]
W: prologic.shortcircuit.net.au

On Wed, Aug 10, 2016 at 1:17 AM, Emile Vauge [email protected]
wrote:

sigh

Hum, I was just trying to help...

  1. you should version your traefik image in your compose file
  2. you should try to copy the toml from the traefik container to debug
    this: docker cp yourTraefikContainer:/config/traefik.toml .


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#574 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABOv-omKQ3x4ae-R2_o7PTiGY62GUXM_ks5qeYkEgaJpZM4JZPHt
.

@emilevauge
Copy link
Member

Closing this one for now ;)

@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants