-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Graceful Tunnel Shutdown #25
Comments
I've run into this issue, I know what you are talking about it. Do you know how to submit a Pull Request? Please feel free to add it so you get credit. Please submit the PR against the |
Is this still valid in v2.0? |
@jnovack yes this still happens unfortunately. I've had to reboot my remote every time i have to restart this container to stop the port listening on the remote. |
I tried building a local image with the solution suggested above and it doesn't seem to work. After doing a |
@zrthxn I made little investigation, exactly for your situation there is an
Note: |
@mrkeuz I tried adding environment:
# ...other vars
- StreamLocalBindUnlink=yes
|
@zrthxn no, it does not work like you using, you need to pass option to
|
@mrkeuz |
I'm seeing the same issue, just to show the log how it happens:
The 65012 port is reserved on the server, and clearly should work. The reason it does not could be the previous connection was interrupted (for example, due to network problems), and the ssh endpoint on the server is orphaned - it's still working, and holding the 65012 port. New instance of autossh tries to capture the port, and fails. Generally, this is not a problem of this docker container, and not a problem of autossh. It'a a responsibility of an ssh tunnel to dispose the server endpoint, which needs a solution. Then, the autossh should treat this error as fatal and propagate it to the docker container. |
…ase of network failure, as discussed in jnovack#25
|
…ase of network failure, as discussed in #25
I noticed an issue when stopping the container and then restarting it again immedietly after. It seems like the session was still active on the remote server and the port was used up. Therefore when it tried to reconnect it couldn't reuse the same port again. It doesn't seem to happen all the time, so I wasn't able to reproduce it reliably.
It think this could be fixed by a more graceful shutdown, something like this at the beginning of the entrypoint.sh script:
Please let me know your thoughts.
The text was updated successfully, but these errors were encountered: