tunneldigger
tunneldigger copied to clipboard
tunneldigger-broker: connection fails with `Error: Invalid handle.`
Hi, I'm just trying to upstream the packages to openwrt/packes: https://github.com/openwrt/packages/pull/21308
it seems to work fine until I connect to the broker on localhost (I currently just use 1 router) and the broker just throws the error "Error: Invalid handle.":
daemon.err python[13789]: [INFO/tunneldigger.tunnel] Set tunnel 103 MTU to 1280.
daemon.err python[13789]: [INFO/tunneldigger.hooks] Running hook 'session.up' via script '/usr/lib/tunneldigger-broker/hooks/setup'.
daemon.err python[13789]: [INFO/tunneldigger.limits] Setting downstream bandwidth limit to 1024 kbps on tunnel 103.
daemon.err python[13789]: Error: Invalid handle.
Any idea what's the reason or how to fix this? I can not even find where the error printing is happening in the code.
I think Invalid Handle
is a red herring... I am also seeing this in my logs despite everything working. As far as I recall, the error originates here
https://github.com/wlanslovenija/tunneldigger/blob/4f72b30578ac3dbc5482f4a54054bf870355bdf5/broker/src/tunneldigger_broker/traffic_control.py#L23
and is output by the tc
program, not the Python code. When setting a bandwidth limit, the code first removes potentially existing previous bandwidth limits; if no such limit existed, we get an "Invalid handle" error.
@RalfJung Thanks a lot! I thought I did something wrong because the tunnels don't come up automatically. Is that wanted behavior that you need to set them up with for example ip link afterwards?
ip link
is usually done by one of the scripts, see https://github.com/wlanslovenija/tunneldigger/tree/master/broker/scripts for examples.
The config for our own servers is here; session-up
is doing the setup and can be found here. Crucially we first add them to the bridge and then up
the link, to make sure no traffic can go to the wrong place before the link is in the bridge.