-
Notifications
You must be signed in to change notification settings - Fork 126
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
Are you trying to connect to a TLS-enabled daemon without TLS?" ext=lb #239
Comments
Also my config.toml looks like ListenAddr = ":8080" [[Extensions]] |
Hello. That is because you have configured interlock to listen on the docker swarm port (2377), where the workers and masters are talking to one another. AFAIK, this isn't supported. You will need to either use the local docker socket or change your docker config to expose a TCP port (typically, 2376 for SSL). You will also need TLS certificates (look up the docker docs on how to generate and configure those. Alternatively, you could, for debugging, changing docker config to expose a non SSL port, typically port 2375. I would advise to never do that on any servers that are remotely close to live networks, as this is insecure beyond reasons. Here is my configuration for using local sockets: INTERLOCK_CONFIG: |
ListenAddr = ":8080"
DockerURL = "unix:///var/run/docker.sock"
DockerURL = "tcp://<listenAddress>:2376"
#TLSCACert = "/etc/docker/ssl/docker-ca.pem"
#TLSCert = "/etc/docker/ssl/docker-cert.pem"
#TLSKey = "/etc/docker/ssl/docker-key.pem"
[[Extensions]]
Name = "nginx"
ConfigPath = "/etc/nginx/nginx.conf"
PidPath = "/var/run/nginx.pid"
TemplatePath = ""
MaxConn = 1024
Port = 80
volumes:
- /etc/docker:/etc/docker:ro
- /var/run/docker.sock:/var/run/docker.sock If, like me, you were attempting to bind to port 2377 to be notified when any services on the swarm are started so that your global NGINX is notified, this is not the way it will work. There are a feature request currently in the works to enable this, but there are currently no ways of handling docker swarm (> 1.13) with stacks and services using interlock. (Someone feel free to correct me). Polling services is tracked by: #224 |
Thanks @jdelamar . i configured docker daemon to run at 2375. Now i have interlock .yml as
nginx.yml as
and app service
I was expecting after i run app service to docker swarm cluster, a nginx config will be created/reload. I dont see that. On the interlock service logs i see
|
Yeah. I played a bit with the "new" docker swarm and interlock. Got all these issues in pretty much that order :). I know have a working setup, but I tried so many things I am confusing the fixes. So, in my case, I ended up deploying in one docker-compose.yml file. This is not strictly required, but it makes the handling easier to, well, handle. Here is my sample docker-compose.yml file: version: "3"
services:
interlock:
image: ehazlett/interlock:1.4.1
command: -D run -c /etc/interlock/config.toml
tty: true
ports:
- 8080
environment:
INTERLOCK_CONFIG: |
ListenAddr = ":8080"
DockerURL = "unix:///var/run/docker.sock"
[[Extensions]]
Name = "nginx"
ConfigPath = "/etc/nginx/nginx.conf"
PidPath = "/var/run/nginx.pid"
TemplatePath = ""
MaxConn = 1024
Port = 80
volumes:
- /etc/docker:/etc/docker:ro
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: global
nginx:
image: nginx:latest
entrypoint: nginx
command: -g "daemon off;" -c /etc/nginx/nginx.conf
ports:
- 80:80
labels:
- "interlock.ext.name=nginx"
deploy:
placement:
constraints:
- node.role == manager
bobservice:
image: bob/service:latest
hostname: bobservice
ports:
- 3000:3000
deploy:
placement:
constraints:
- node.role == manager
labels:
- "interlock.hostname=bobservice"
- "interlock.domain=bobservice.com"
- "interlock.port=3000"
- "interlock.network=bobstack_default" A few things to note:
Then I played with proxy_redirect and stuff, but you don't need it for the demo your are attempting to run. I am assuming that the fix to support docker services will alleviate this setup a bit (it could get all this data from the docker stack + docker services API), but for now, that has been working well for me. Hope that helps. |
Filter out services with redirect labels which would cause infinite redirect loops (our extensions currently require that redirects are absolute). Fixes #239 Signed-off-by: Euan Harris <[email protected]>
Hello, I am trying to use interlock with nginx as backend. I am following this
https://github.com/ehazlett/interlock/tree/master/docs/examples/nginx-swarm link to set it up but keep on getting "Are you trying to connect to a TLS-enabled daemon without TLS?" ext=lb" errors when i start interlock service. Any ideas ?
the whole errors are
test_interlock.1.9qhdo9wc8q01@moby | time="2017-08-07T10:41:19Z" level=info msg="interlock 1.4.2 (f6ccc1f)"
test_interlock.1.9qhdo9wc8q01@moby | time="2017-08-07T10:41:19Z" level=info msg="interlock node: container id=61b5864e3be1ae27eee2fce46293fe1b97cac163c62c325679806955d6052446" ext=lb
test_interlock.1.9qhdo9wc8q01@moby | time="2017-08-07T10:41:19Z" level=info msg="using event stream"
test_interlock.1.9qhdo9wc8q01@moby | time="2017-08-07T10:41:19Z" level=error msg="event stream fail; attempting to reconnect"
test_interlock.1.9qhdo9wc8q01@moby | time="2017-08-07T10:41:19Z" level=info msg="waiting for event stream to become ready"
test_interlock.1.9qhdo9wc8q01@moby | time="2017-08-07T10:41:21Z" level=error msg="Get http://192.168.65.2:2377/v1.26/containers/json?filters=%7B%22label%22%3A%7B%22interlock.hostname%22%3Atrue%7D%2C%22status%22%3A%7B%22running%22%3Atrue%7D%7D&limit=0: malformed HTTP response "\x15\x03\x01\x00\x02\x02".
test_interlock.1.9qhdo9wc8q01@moby | * Are you trying to connect to a TLS-enabled daemon without TLS?" ext=lb
The text was updated successfully, but these errors were encountered: