-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ktunnel does not reconnect to cluster after interrupted internet connection #114
Comments
Many things kill ktunnel's work in this way. This is a pain. For example,
We just can't use a w/a how we do this for SSH. A workaround here is to abandon the ktunnel and use SSH Remote Port Forwarding Even more! |
Fyi, in case others have this issue as well, I worked around this by adding my own launcher shell script which I bake into my own Docker image. It kills the container whenever specific strings are found in the console output.
#!/bin/sh
/ktunnel expose -n remote-access --force --reuse myname "$@" 2>&1 | \
while read -r line
do
echo "ktunnel: $line"
if echo "$line" | grep -q "lost connection" || echo "$line" | grep -q "error upgrading connection"; then
echo "Exiting"
# Kills all container processes which causes the container to exit; this is a workaround because killing PID 1 is too hard :p
ps x | awk {'{print $1}'} | awk 'NR > 1' | xargs kill
exit
fi
done
FROM omrieival/ktunnel:v1.5.3 as ktunnel
FROM alpine:3.18
COPY --from=ktunnel ktunnel /
ADD run-ktunnel.sh / |
I would like to run ktunnel for an extended period of time during which the active internet connection may fail and be switched over to a secondary line by the network router. This failover causes TCP connections to be terminated.
Is it possible to update the ktunnel client so that connections to the cluster that have terminated are automatically re-established?
If not, could the client executable terminate fully upon connection loss so that the underlying Docker container terminates and can then be automatically restarted? Right now it appears that the client only prints out the notice below but does not terminate after connection loss.
The text was updated successfully, but these errors were encountered: