danielbodart / portical

Portical manages UPnP port forwarding rules for Docker containers by just adding single label
https://github.com/danielbodart/portical
10 stars 3 forks source link

Trying to delete a non-existent rule #6

Open Esprit1st opened 2 weeks ago

Esprit1st commented 2 weeks ago

I am getting this error message and am not sure what to do about it. Is there a solution? Thank you!

Finding all containers with label 'portical.upnp.forward' set...
Setting up portical: (6881:6881/udp) qbittorrent...
Removing existing rule... upnpc: miniupnpc library test client, version 2.2.7.
 (c) 2005-2024 Thomas Bernard.
More information at https://miniupnp.tuxfamily.org/ or http://miniupnp.free.fr/
Found valid IGD : http://192.168.1.1:1780/control?WANIPConnection
Local LAN ip address : 192.168.1.5
UPNP_DeletePortMapping() failed with code : 714
Error: Command 'docker run --rm --network host danielbodart/portical upnpc -u http://192.168.1.1:1780/InternetGatewayDevice.xml -d 6881 udp' failed with status 2
All portical rules:
Sleeping for 15 seconds...
Bengele2 commented 1 day ago

I have the exactly same issue. If you run docker run --rm --network host danielbodart/portical upnpc -u http://192.168.1.1:1780/InternetGatewayDevice.xml -r 6881 udp' then the rule is created but it deletes and creates it every time.

Be aware i did not activate the "Force" option.

Bengele2 commented 1 day ago

Log:

Finding all containers with label 'portical.upnp.forward' set...
Extracting published port for FactorioBen... 
Setting up portical: (34197:34197/udp) FactorioBen...
Removing existing rule... Error: Command 'docker run --rm --network host danielbodart/portical upnpc -d 34197 udp' failed with status 2
All portical rules:
Sleeping for 15 seconds...
Finding all containers with label 'portical.upnp.forward' set...
Bengele2 commented 1 day ago

Code: description="portical: (${external_port}:${internal_port}/${protocol}) ${machine}" => portical: (34197:34197/udp) FactorioBen

Code: image

in line 60 of run: [[ $(upnpc ${root:+-u "$root"} -l) == "${description}" ]]; then -> False therefore delete