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

Remote host causes crashes #2828

Closed
grosejon opened this issue Mar 16, 2024 · 3 comments
Closed

Remote host causes crashes #2828

grosejon opened this issue Mar 16, 2024 · 3 comments
Assignees

Comments

@grosejon
Copy link

After starting up with localhost and one remote host, I receive this error in the log:

time="2024-03-15T01:18:23Z" level=info msg="Dozzle version v6.3.1"
time="2024-03-15T01:18:23Z" level=info msg="Creating client for [redacted] with tcp://[remote host ip]:2375"
time="2024-03-15T01:18:23Z" level=info msg="Connected to 2 Docker Engine(s)"
time="2024-03-15T01:18:23Z" level=info msg="Accepting connections on :8080"
time="2024-03-15T01:28:23Z" level=fatal msg="error while listening to docker events: unexpected EOF. Exiting..."

Both hosts are using socket proxy. Compose looks like this:

version: "3"
networks:
  socket_proxy:
    external: true
  proxy:
    external: true

services:
  dozzle:
    container_name: dozzle
    image: amir20/dozzle:latest
    privileged: true
    networks:
      - proxy
      - socket_proxy
    environment:
      - DOCKER_HOST=tcp://socket-proxy:2375
      - DOZZLE_AUTH_PROVIDER=forward-proxy
      - DOZZLE_REMOTE_HOST=tcp://[remote host ip]:2375|[redacted]
      - DOZZLE_HOSTNAME=[localhost hostname]
    ports:
      - 9167:8080

I'm sure I've done something wrong here. Do you see where I've gone wrong?

@amir20
Copy link
Owner

amir20 commented Mar 16, 2024

It's hard to debug this. But a few ideas. You might want to first isolate the problem:

  1. I haven't tested DOCKER_HOST too much locally. I suggest you mount docker.sock as first option to make sure that it works. Only test with one connectiion first
  2. If localhost breaks then you know it's localhost problem.
  3. Then introduce a new remote connection with DOZZLE_REMOTE_HOST.
  4. If you get the error now, then it must be the remote connection. You can validate docker socket with curl localhost:2375/containers/json. If that doesn't work then you have a problem on your side.
  5. Next option is to check logs for proxy

I do testing with socket proxy and you can find the compose file at https://github.com/amir20/dozzle/blob/master/docker-compose.yml

@amir20
Copy link
Owner

amir20 commented Mar 16, 2024

By the way that error is happening with docker events so you could also test that.

@grosejon
Copy link
Author

I'm not certain that it is anything to do with Dozzle. The errors seem to line up with an EOF error on Portainer Agent. Same as this issue: portainer/agent#596

I will watch that issue to see if there is any resolution. Thanks!

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

2 participants