You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm connecting to a remote host over multiplexed ssh using a context. When I try docker-compose ps with a docker-compose.yml with 6 services defined, the command dies with:
mux_client_request_session: session request failed: Session open refused by peer
ControlSocket /home/user/.ssh/xyz already exists, disabling multiplexing
failed to open the raw stream connection: dial unix /var/run/docker.sock: connect: permission denied
On the server sshd logs the message: error: no more sessions.
I sometimes also see channel 21: open failed: connect failed: open failed if I have another ssh connection open (using the same control socket) before I run docker-compose ps.
I tried raising MaxSessions to 100 (the default is 10) in my sshd config (and restarting ssh) but this didn't help. To be honest, I can't tell that change takes effect... if I manually open 10 ssh connections to the server (with, say, ssh server, not with docker-compose), the 11th causes the same error, even after the config change. At any rate, when I manually ssh with multiplexing enabled and open 11 connections, I don't get a fatal error, the ssh client just disables multiplexing and the connection succeeds.
Is the docker-compose is using many ssh connections? Or maybe making them very quickly or in parallel?
Workaround: disable ssh multiplexing in the client config.
Steps To Reproduce
client and server both running ubuntu 22.04 LTS 64-bit server with docker.io and docker-compose packages installed
set up docker context on client with host=ssh://myserver
configure client to use ssh multiplexing to connect with server (see below)
confirm docker ps, docker info works
confirm docker-compose ps works with 1-container docker-compose.yml
try docker-compose ps with 6-container docker-compose.yml
Example openssh client config with multiplexing enabled:
Host *
ControlMaster auto
ControlPath ~/.ssh/%C
Compose Version
docker-compose version 1.29.2, build unknown
docker-py version: 5.0.3
CPython version: 3.10.12
OpenSSL version: OpenSSL 3.0.2 15 Mar 2022
With ssh multiplexing disabled, running docker-compose ps for a 6-container config file takes about 5 seconds when run remotely, and about .3 sec when run locally on the host (using the docker socket).
The text was updated successfully, but these errors were encountered:
ssh connexion to a remote docker engine is provided by github.com/docker/cli, there's nothing we can do from compose to make it more robust unfortunately
Description
I'm connecting to a remote host over multiplexed ssh using a context. When I try
docker-compose ps
with adocker-compose.yml
with 6 services defined, the command dies with:On the server sshd logs the message:
error: no more sessions
.I sometimes also see
channel 21: open failed: connect failed: open failed
if I have another ssh connection open (using the same control socket) before I rundocker-compose ps
.I tried raising
MaxSessions
to 100 (the default is 10) in my sshd config (and restarting ssh) but this didn't help. To be honest, I can't tell that change takes effect... if I manually open 10 ssh connections to the server (with, say,ssh server
, not withdocker-compose
), the 11th causes the same error, even after the config change. At any rate, when I manually ssh with multiplexing enabled and open 11 connections, I don't get a fatal error, the ssh client just disables multiplexing and the connection succeeds.Is the
docker-compose
is using many ssh connections? Or maybe making them very quickly or in parallel?Workaround: disable ssh multiplexing in the client config.
Steps To Reproduce
docker.io
anddocker-compose
packages installedhost=ssh://myserver
docker ps
,docker info
worksdocker-compose ps
works with 1-containerdocker-compose.yml
docker-compose ps
with 6-containerdocker-compose.yml
Example openssh client config with multiplexing enabled:
Compose Version
Docker Environment
Anything else?
With ssh multiplexing disabled, running
docker-compose ps
for a 6-container config file takes about 5 seconds when run remotely, and about .3 sec when run locally on the host (using the docker socket).The text was updated successfully, but these errors were encountered: