(Using https://github.com/LemmyNet/lemmy-ansible)

The ansible-playbook command itself connected to the VPS and completed without any errors or warnings. This is on a completely fresh VPS with Ubuntu Server 22.04.

I created all directories needed in the guide, and the only file I modified was the inventory/hosts file - filling in the username/domain for SSH, domain name, contact email and adding the location of the private key for SSH.

The guide didn’t note any changes to config.hjson I needed to make, so I copied that file as requested but left it with the default content. I’m thinking if I missed something it’s most likely there.

I couldn’t access the web UI and with some investigation I found the dessalines/lemmy:0.17.4 (backend) container is continually restarting, apparently because it can’t reach the database - sudo docker container logs <id> returns the following:

thread 'main' panicked at 'Error connecting to postgres://lemmy:PasswordRedacted@postgres:5432/lemmy', crates/db_schema/src/utils.rs:161:56

I’m not sure what to do at this point, so I would be very appreciative of any help with this issue.

  • @aranymOP
    link
    English
    1
    edit-2
    1 year ago

    deleted by creator

      • @aranymOP
        link
        English
        1
        edit-2
        1 year ago

        deleted by creator

        • @[email protected]
          link
          fedilink
          English
          11 year ago

          well, that rules out your local system and ansible, at least. It seems like there’s an inability for the docker containers to reach postgres definitely at the install and probably at runtime - can we check this?

          first let’s make sure the postgres container is on the network and has an address:

          sudo docker exec -it <yourinstance>_postgres_1 /bin/sh

          once you’re on the container

          ifconfig

          which should return on the second line: inet addr:172.18.0.4 (or similar ipV4 address)

          exit to return to the host and let’s test connecting from the host :

          nc -zv 172.18.0.4 5432 (use IP from the DB container)

          Ubuntu host should respond something like : Connection to 172.18.0.4 5432 port [tcp/postgresql] succeeded!

          now let’s try the containers

          sudo docker exec -it <yourinstance>_lemmy-ui_1 /bin/sh

          now from that container test connectivity to postgres:

          nc -zv 172.18.0.4 5432 (use IP from the DB container)

          now the other

          sudo docker exec -it <yourinstance>_lemmy_1 /bin/sh

          on the docker containers the nc command should return something like

          172.18.0.4 (172.18.0.4:5432) open

          is that working?

    • @aranymOP
      link
      English
      1
      edit-2
      1 year ago

      deleted by creator