eiqnepm / portcheck

20 stars 3 forks source link

Portcheck results in connection refused #2

Open schweppes-0x opened 2 weeks ago

schweppes-0x commented 2 weeks ago

When applying the correct settings I get:

2024/06/12 19:58:03 dial tcp 172.20.0.2:6881: connect: connection refused
2024/06/12 19:58:03 Post "http://localhost:8080/api/v2/auth/login": dial tcp 127.0.0.1:8080: connect: connection refused

docker-compose.yml:


version: '3.9'
services:
  gluetun:
    cap_add:
    - NET_ADMIN
    container_name: gluetun
    image: qmcgaw/gluetun:latest
    network_mode: synobridge
    hostname: gluetun

    devices:
     - /dev/net/tun:/dev/net/tun
    ports:
      - 8080:8080 # qbittorrent
    volumes:
      - ${configPath}/gluetun:/gluetun
    environment:
      - PUID=${UID} 
      - PGID=${GID} 
      - TZ=${TZ}
      - VPN_SERVICE_PROVIDER=nordvpn
      - VPN_TYPE=wireguard 
      - WIREGUARD_PRIVATE_KEY=${wireguardPrivateKey}
      - SERVER_COUNTRIES=${vpnCountries}
      - FIREWALL_VPN_INPUT_PORTS=6881 #,1194,443
      - FIREWALL_OUTBOUND_SUBNETS=172.20.0.0/16,192.168.0.0/24
    restart: always

  portcheck:
    container_name: portcheck
    depends_on:
      - qbittorrent
    environment:
      - DIAL_TIMEOUT=5
      - QBITTORRENT_PASSWORD=mypassword
      - QBITTORRENT_PORT=6881 #this port is also configured within qBit's settings
      - QBITTORRENT_USERNAME=admin
      - QBITTORRENT_WEBUI_PORT=8080
      - QBITTORRENT_WEBUI_SCHEME=http
      - TIMEOUT=300
    image: eiqnepm/portcheck
    network_mode: service:gluetun
    restart: unless-stopped

  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent
    container_name: qbittorrent
    network_mode: service:gluetun
    environment:
      - PUID=${UID}
      - PGID=${GID}
      - TZ=${TZ}
      - WEBUI_PORT=8080
    volumes:
      - ${configPath}/qbit:/config
      - ${mediaPath}:/media
    depends_on:
      - gluetun
    restart: always

I have no clue how to fix this

John5798 commented 2 weeks ago

@schweppes-0x set this env variable QBITTORRENT_WEBUI_HOST=your externally accessible server ip [ex. 192.168.1.1]

eiqnepm commented 2 weeks ago

@schweppes-0x set this env variable QBITTORRENT_WEBUI_HOST=your externally accessible server ip [ex. 192.168.1.1]

Actually that environment variable defaults to localhost so it's completely optional in this case as both containers are running inside the Gluten service network.

@schweppes-0x do you get this error every 300 seconds or just the once when the container starts? https://github.com/eiqnepm/portcheck/issues/1#issuecomment-1666702965