relvacode / storm

A Modern Deluge Interface
MIT License
135 stars 11 forks source link

How to use Storm with native synology deluge package? Eg. Remote connection #49

Closed samsong closed 1 year ago

samsong commented 1 year ago

I have installed DELUGE on synology as native package (not docker) version 2.1.1-17 deluge ip (synology): 192.168.0.5 port :8112 (web) 58846 (remote) deluge default web client active on: 192.168.0.5:8112 remote connection enabled in deluge config.

my ip: 192.168.0.6

storm setup using docker container in portainer (see below config).

version: '3.3'
services:
    relvacode:
        container_name: storm
        ports:
            - '8221:8221'
        environment:
            - DELUGE_RPC_HOSTNAME=192.168.0.5
            - DELUGE_RPC_PORT=58846
            - DELUGE_RPC_USERNAME=localclient
            - DELUGE_RPC_PASSWORD=123456
            #- DELUGE_RPC_VERSION=1  #neither 1 or 2 work. both show panic error in logs so commented this out
        image: ghcr.io/relvacode/storm
        #network_mode: bridge
        network_mode: "host" #use this so the docker container accesses LAN network connect

✅ Storm web UI access OK: http://192.168.0.5:8221 🛑 Storm UI does not connect to deluge RPC / show any torrent.

logs error message:

2023-04-30T05:46:11.111Z    INFO    api storm/server.go:94  Ready to serve HTTP connections on :8221/,
2023-04-30T05:57:02.540Z    ERROR   api storm/api.go:209    Internal Server Error   {"Method": "GET", "URL": "/api/plugins", "RemoteAddr": "192.168.0.6:61048", "Time": "2023-04-30T05:56:48.770Z", "StatusCode": 500, "ResponseSize": 34, "Duration": "13.770782326s", "error": "context canceled"},
2023-04-30T06:01:48.867Z    ERROR   pool    storm/pool.go:217   Failed to establish Deluge RPC connection   {"error": "read tcp 192.168.0.5:50824->192.168.0.5:58846: i/o timeout"},
2023-04-30T06:06:48.958Z    ERROR   pool    storm/pool.go:217   Failed to establish Deluge RPC connection   {"error": "read tcp 192.168.0.5:51054->192.168.0.5:58846: i/o timeout"},
2023-04-30T06:06:48.958Z    ERROR   api storm/api.go:209    Internal Server Error   {"Method": "GET", "URL": "/api/plugins", "RemoteAddr": "192.168.0.6:61046", "Time": "2023-04-30T05:57:02.690Z", "StatusCode": 500, "ResponseSize": 103, "Duration": "9m46.268075812s", "error": "A connection to the Deluge RPC daemon could not be established by the connection pool"}

please advise method to connect storm docker container to deluge native (not docker) on synology via host IP & port?

Note1: When specified RPC version I got "panic" in logs every time so I disabled it. Note2: I can access http://192.168.0.5:58846 in web browser (err no response) so that port is open.

Is the issue because deluge thinclient is already logged into the user localclient? or is it an IP network issue.

samsong commented 1 year ago

Fixed problem myself.

Bug was the RPC version required was "v2" not "2".

Also MUST put network mode to host

Also had to use specific IP 127.0.0.1 to talk to localhost since Storm & Deluge are on same synology just using different platforms

FYI: I did also get storm & deluge working in network mode bridge on same network, but storm cannot find deluge using the host name. "deluge"

Is that because I had network mode bridge? Is there anyway to make the hostname accessible when docker container is in bridge mode?

fixed config below. Please add this to your github introduction guide page:

version: '3.3'
services:
    relvacode:
        container_name: storm
        ports:
            - '8221:8221'
        environment:
            - DELUGE_RPC_HOSTNAME=127.0.0.1
            - DELUGE_RPC_USERNAME=localclient  # WORKS - DOCKER-CONTAINER
            - DELUGE_RPC_PASSWORD=your-password-from-auth-file # native
            - DELUGE_RPC_VERSION=v2   # WORKS - DOCKER-CONTAINER
        image: ghcr.io/relvacode/storm
        restart: unless-stopped
        network_mode: "host" # required for docker native