Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Docker matrixdotorg/synapse:latest: libpython3.7m.so.1.0: cannot open shared object file #8038

Closed
jaltek opened this issue Aug 6, 2020 · 9 comments

Comments

@jaltek
Copy link

jaltek commented Aug 6, 2020

Description

Tried to start the docker image matrixdotorg/synapse:latest via docker-compose and getting the following error:

synapse_1     | /usr/local/bin/python: error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
synapse_synapse_1 exited with code 127

Steps to reproduce

  • Start the matrixdotorg/synapse:latest via docker-compose or docker directly

Version information

  • Homeserver: matrixdotorg/synapse:latest

If not matrix.org:

  • Platform: Ubuntu 18.04.4 LTS / Docker 19.03.6
@jaltek
Copy link
Author

jaltek commented Aug 6, 2020

Additional Information: matrixdotorg/synapse:v1.17.0 works perfectly.

@richvdh
Copy link
Member

richvdh commented Aug 6, 2020

It seems to work here:

rav@fred:~/tmp$ docker pull  matrixdotorg/synapse:latest 
latest: Pulling from matrixdotorg/synapse
Digest: sha256:f66fa7b3bf5250d14d23c847d48cbabbe58c4d26217250dac2b0b90975a38731
Status: Image is up to date for matrixdotorg/synapse:latest
docker.io/matrixdotorg/synapse:latest

rav@fred:~/tmp$ docker run --rm -it -v `pwd`/tmp:/data -e SYNAPSE_SERVER_NAME=localhost -e SYNAPSE_REPORT_STATS=yes matrixdotorg/synapse:latest generate
Creating log config /data/localhost.log.config
Generating config file /data/homeserver.yaml
Generating signing key file /data/localhost.signing.key
A config file has been generated in '/data/homeserver.yaml' for server name 'localhost'. Please review this file and customise it to your needs.

rav@fred:~/tmp$ docker run --rm -it -v `pwd`/tmp:/data -p 18008:8008 matrixdotorg/synapse:latest
Starting synapse with config file /data/homeserver.yaml
...

please can you give more information on how to reproduce this?

@jaltek
Copy link
Author

jaltek commented Aug 7, 2020

@richvdh Thanks. Yes, your examples worked for me also.

I'm using the following docker-compose.yml

version: '3'
services:
  synapse:
    build:
        context: ./
        dockerfile: Dockerfile
    image: matrixdotorg/synapse:latest
    restart: unless-stopped
    volumes:
      - ./etc:/etc
      - ./data:/data
    depends_on:
      - synapse-db
    ports:
      - 8008:8008/tcp

  synapse-db:
    image: postgres:10-alpine
    environment:
      - POSTGRES_USER=synapse
      - POSTGRES_PASSWORD=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    volumes:
      - ./schemas:/var/lib/postgresql/data

@richvdh
Copy link
Member

richvdh commented Aug 7, 2020

I'm not that familiar with docker-compose, but does this mean you are building your own docker image?

    build:
        context: ./
        dockerfile: Dockerfile

I'd suggest you are adding a library that is linked against the wrong version of python.

@clokep
Copy link
Member

clokep commented Aug 7, 2020

  synapse-db:
    image: postgres:10-alpine

I don't know if it matters, but the synapse image was switched to debian in #7839

@jaltek
Copy link
Author

jaltek commented Aug 7, 2020

I'm not that familiar with docker-compose, but does this mean you are building your own docker image?

    build:
        context: ./
        dockerfile: Dockerfile

I'd suggest you are adding a library that is linked against the wrong version of python.

The build section is only triggerd by using docker-compose build. If you provide an image inside the yml file the build section will be skipped.

I took this compose file from

https://github.com/matrix-org/synapse/blob/b2b86990705de8a099093ec141ad83e09f182034/contrib/docker/docker-compose.yml

@clokep Hm...the error occurs inside the synapse container, not the synapse-db container...Even if I choose

image: postgres:10

it doesn't work.

@clokep
Copy link
Member

clokep commented Aug 7, 2020

I'd suggest asking on #synapse:matrix.org if anyone is using docker compose with Synapse and have a working config. If so, it'd be great to update the one in our contrib directory.

@jaltek
Copy link
Author

jaltek commented Aug 7, 2020

@clokep Talking on #synapse:matrix.org the problem seems to be this mount:

  - ./etc:/etc

which seemed to work with the alpine image, but not the debian one. So I think this can be closed. Thank you all.

@jaltek jaltek closed this as completed Aug 7, 2020
@clokep
Copy link
Member

clokep commented Aug 7, 2020

@jaltek Glad you figured it out! Thanks for pointing out the issue in case someone else runs into this. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants