OpenSSL version mismatch. Built against 1010106f, you have 101000cf

Description of the issue

Error when using docker-compose exec with DOCKER_HOST=ssh://...

Context information (for bug reports)

Output of docker-compose version

docker-compose version 1.26.2, build eefe0d31
docker-py version: 4.2.2
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019

Output of docker version

Client: Docker Engine - Community
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:45:36 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a66213fe
  Built:            Mon Jun 22 15:49:27 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Output of docker-compose config

version: '3'

services:
  portainer:
    image: portainer/portainer:1.24.1
    command: -H unix:///var/run/docker.sock
    volumes:
      - data:/data
      - /var/run/docker.sock:/var/run/docker.sock
    restart: unless-stopped

volumes:
  data:

Steps to reproduce the issue

  1. create a .env file and add DOCKER_HOST=ssh://... with a valid ssh host with docker engine
  2. docker-compose up -d
  3. docker-compose exec portainer bash

Observed result

error during connect: Get http://docker/v1.40/containers/a1a823ab0e6b66087bf0fd609c34da5e70c23446cf19791f66d6bf277f14f89a/json: command [ssh -- example.org docker system dial-stdio] has exited with exit status 255, please make sure the URL is valid, and Docker 18.09 or later 
is installed on the remote host: stderr=OpenSSL version mismatch. Built against 1010106f, you have 101000cf

Expected result

Open a bash terminal in the portainer container on the remote docker engine.

Stacktrace / full error message

error during connect: Get http://docker/v1.40/containers/a1a823ab0e6b66087bf0fd609c34da5e70c23446cf19791f66d6bf277f14f89a/json: command [ssh -- example.org docker system dial-stdio] has exited with exit status 255, please make sure the URL is valid, and Docker 18.09 or later 
is installed on the remote host: stderr=OpenSSL version mismatch. Built against 1010106f, you have 101000cf

Additional information

OS version / distribution, docker-compose install method, etc.
Running on WSL 2 Ubuntu on windows 10. The docker-compose is the one mounted from docker desktop.
But I also tested with a native linux machine.

I tested with two remote hosts, one google vm and one raspberry pi.
On the google vm:

Client:
 Version:           19.03.6
 API version:       1.40
 Go version:        go1.13.5
 Git commit:        369ce74
 Built:             Tue May 19 10:01:57 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          19.03.6
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.5
  Git commit:       369ce74
  Built:            Tue May 19 10:00:30 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.3.2
  GitCommit:        ff48f57fc83a8c44cf4ad5d672424a98ba37ded6
 runc:
  Version:          1.0.0-rc10
  GitCommit:
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683b971d9c3ef73f284f176672c44b448662

On the raspberrypi:

Client: Docker Engine - Community
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a6621
 Built:             Mon Jun 22 15:53:41 2020
 OS/Arch:           linux/arm
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a6621
  Built:            Mon Jun 22 15:47:34 2020
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

I also tested with older docker compose version 1.25.5 and the newer 1.27.0-rc1.

2 thoughts on “OpenSSL version mismatch. Built against 1010106f, you have 101000cf

  1. Can confirm that had the exact same issue with 1.28.2 but 1.28.0 worked fine. Downloaded releases directly from github.

    $ openssl version
    OpenSSL 1.1.1f  31 Mar 2020
    $ uname -a
    Linux junk 5.8.0-43-generic #49~20.04.1-Ubuntu SMP Fri Feb 5 09:57:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux