Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was 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

Description

@jaltek

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

Activity

  1. jaltek commented on Aug 6, 2020

    @jaltek
    Author

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

  2. richvdh commented on Aug 6, 2020

    @richvdh
    Member

    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?

  3. jaltek commented on Aug 7, 2020

    @jaltek
    Author

    @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
    
  4. richvdh commented on Aug 7, 2020

    @richvdh
    Member

    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.

  5. clokep commented on Aug 7, 2020

    @clokep
    Member
      synapse-db:
        image: postgres:10-alpine
    

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

  6. jaltek commented on Aug 7, 2020

    @jaltek
    Author

    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.

  7. clokep commented on Aug 7, 2020

    @clokep
    Member

    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.

  8. jaltek commented on Aug 7, 2020

    @jaltek
    Author

    @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.

  9. clokep commented on Aug 7, 2020

    @clokep
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions