amir20 / dozzle

Realtime log viewer for docker containers.
https://dozzle.dev/
MIT License
5.89k stars 295 forks source link

[HELP] DOZZLE_REMOTE_HOST Usage #3050

Closed jd-apprentice closed 3 months ago

jd-apprentice commented 3 months ago

Describe the bug It is not a bug, i'm just asking for help

My compose file

version: "3.8"

services:

  dashdot:
    image: mauricenino/dashdot
    restart: unless-stopped
    ports:
      - "3001:3001"
    volumes:
      - "/:/mnt/host:ro"
    privileged: true
    environment:
      DASHDOT_ENABLE_CPU_TEMPS: 'true'
    networks:
      lan:
         ipv4_address: 10.5.0.11

  dozzle:
    container_name: dozzle
    image: amir20/dozzle:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 8888:8080
    environment:
      DOZZLE_HOSTNAME: node02.local
      DOZZLE_REMOTE_HOST: tcp://192.168.0.251:2375|node01.local

networks:
  lan:
    ipam:
      config:
        - subnet: 10.5.0.0/16
          gateway: 10.5.0.1

Expected behavior Be able to have multiples computers inside a single instance of dozzle.

Screenshots

image image

Additional information

I have 3 raspberry pi's which I want to monitor since they have mutiple containers running here and there.

Node00 contains a cloudflare tunnel which exposes logs.XXX and is where I'm acceding the dozzle web ui. Node02 is where I have the container of dozzle running, I'm ok with that machine but can't access to the containers of Node00 and Node01

Desktop (please complete the following information):

amir20 commented 3 months ago

I think you lost me with

Node00 contains a cloudflare tunnel which exposes logs.XXX and is where I'm acceding the dozzle web ui. Node02 is where I have the container of dozzle running, I'm ok with that machine but can't access to the containers of Node00 and Node01

Do you have multiple instance of Dozzle running? To use DOZZLE_REMOTE_HOST you just need one instance configured with multiple hosts using socket-proxy. Something like DOZZLE_REMOTE_HOST: tcp://192.168.0.251:2375|node01.local,tcp://192.168.0.YYY:2375|node02.local

Is that your question? Sorry having a little hard time understanding what is not working.

jd-apprentice commented 3 months ago

I have only one instance of dozzle running, but that instance is not being able to connect to others via tcp, the error is showing on the pictures. Sorry if i'm not explaining well hahah

amir20 commented 3 months ago

Ah ok. I see the error now. Do you have socket proxy running? Can you use curl to test it? This is all documented at https://dozzle.dev/guide/remote-hosts#connecting-with-a-socket-proxy

jd-apprentice commented 3 months ago

Now I do have a socket proxy running

Node01

image

Node02

curl 192.168.0.251:2375
<html><body><h1>403 Forbidden</h1>
Request forbidden by administrative rules.
</body></html>
amir20 commented 3 months ago

Now I do have a socket proxy running

So restart Dozzle and it should work.

A good command could be curl https://192.168.0.251:2375/v1.45/info If that command fails then it's a proxy issue.

I think all of these socket proxy is more complicated than I had expected.

Please follow https://dozzle.dev/guide/remote-hosts#connecting-with-a-socket-proxy exactly as that does seem to work.

jd-apprentice commented 3 months ago

The command fails

curl https://192.168.0.251:2375/v1.45/info
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

But It seems to work! So its now time to investigate more about it haha so i'm more in touch with this in case any trouble appears

image

Thank you so much for your time!