-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
docker-compose over SSH returns ChannelException(2, 'Connect failed') #7542
Comments
Verbose output attached. |
Possibly related to docker/docker-py#2289 |
Temporary workaround:
Since this works, this appears to be an issue that only occurs with the SSH Python library? |
I had the same issue and google brought me here |
I also ran into lots of ssh channel exceptions when using docker-compose with a
Curious if anyone has run into that as well and what did you do? |
In case you tried this on Windows (where it doesn't seem to help) in git bash and are now receiving Using @espoirMur's solution worked for me. |
Changing the MaxSessions parameter in /etc/ssh/sshd_config to 30 made this work for me. |
Changing MaxSessions to 30 or 50, do not work for me. I am on mac machine!! |
Running this on the docker host solved it (ubuntu focal) 🎉 echo 'MaxSessions 50' | sudo tee /etc/ssh/sshd_config.d/docker.conf
sudo systemctl reload sshd.service |
I am using a variation on what @hazcod did (#7542 (comment)):
Context: We are in a CI environment that wants to access the Docker daemon on the machine where the deliverable is deployed. Explanation: this forwards the Unix Domain Socket of the Docker daemon on the target host into your CI environment; if your deploy user is restricted, you will have to make sure that port forwarding is allowed for that user. Keys are already configured via In my opinion this is a very good solution, even better than using the native Still, this bug is a real show stopper and should be fixed in Docker Compose. Configuring |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it had not recent activity during the stale period. |
pretty bad to have this closed 😢 |
FYI: Have a look at the log on the ssh server. If it says something like:
Then increasing the number of permitted ssh sessions is the way to go, and @viceice 's comment above is spot on: - #7542 (comment) |
Hi folks, Among other possible causes it could be low bandwidth inbetween deployment server and image repository(in our case). paramiko.ssh_exception.ChannelException: ChannelException(2, 'Connect failed')
it was confirmed with iperf:
|
you saved my life! |
Description of the issue
build over SSH via docker-compose works, but a run always ends with ChannelException(2, 'Connect failed').
Context information (for bug reports)
Output of
docker-compose version
Output of
docker version
Steps to reproduce the issue
docker context create xxx --description "xxx" --docker "host=ssh://root@$SSH_HOST" --default-stack-orchestrator swarm
docker context use xxx
docker-compose build
anddocker-compose up
Observed result
Expected result
Stacktrace / full error message
Additional information
GitHub Actions -> debian
The text was updated successfully, but these errors were encountered: