this post was submitted on 18 Jun 2023
10 points (100.0% liked)

Selfhosted

40183 readers
657 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] Veraticus@lib.lgbt 4 points 1 year ago (3 children)

Sounds like your Postgres instance is offline. Any logs from that container?

[–] aranym@lemmy.world 2 points 1 year ago (2 children)

The postgres container appears to be running.

sudo docker ps output:

CONTAINER ID   IMAGE                        COMMAND                  CREATED          STATUS                            PORTS                                 NAMES
e305af2b91c8   dessalines/lemmy-ui:0.17.4   "docker-entrypoint.s…"   27 minutes ago   Up 27 minutes                     127.0.0.1:12074->1234/tcp             lemmyname_lemmy-ui_1
3978157ef390   dessalines/lemmy:0.17.4      "/app/lemmy"             27 minutes ago   Restarting (101) 34 seconds ago                                         lemmyname_lemmy_1
626d7792534b   asonix/pictrs:0.3.1          "/sbin/tini -- /usr/…"   27 minutes ago   Up 27 minutes                     6669/tcp, 127.0.0.1:21166->8080/tcp   lemmyname_pictrs_1
65eab82adee9   mwader/postfix-relay         "/root/run"              27 minutes ago   Up 27 minutes                     25/tcp                                lemmyname_postfix_1
2ab8c789fdcd   postgres:15-alpine           "docker-entrypoint.s…"   27 minutes ago   Up 27 minutes                     5432/tcp                              lemmyname_postgres_1

Container logs: ...

PostgreSQL init process complete; ready for start up.

2023-06-18 01:57:16.112 UTC [1] LOG:  starting PostgreSQL 15.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
2023-06-18 01:57:16.112 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-06-18 01:57:16.112 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2023-06-18 01:57:16.113 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-06-18 01:57:16.117 UTC [53] LOG:  database system was shut down at 2023-06-18 01:57:16 UTC
2023-06-18 01:57:16.123 UTC [1] LOG:  database system is ready to accept connections
2023-06-18 02:02:16.215 UTC [51] LOG:  checkpoint starting: time
2023-06-18 02:02:20.329 UTC [51] LOG:  checkpoint complete: wrote 44 buffers (0.3%); 0 WAL file(s) added, 0 removed, 0 recycled; write=4.110 s, sync=0.003 s, total=4.115 s; sync files=12, longest=0.002 s, average=0.001 s; distance=252 kB, estimate=252 kB
[–] Veraticus@lib.lgbt 2 points 1 year ago (1 children)

Can you log into it using your password? If so, then the network between the two isn’t working properly and you’ll need to check your Docker network config.

[–] aranym@lemmy.world 1 points 1 year ago

Yes, I can log into the psql shell on the container and connect to the database with no issue. I guess it is a network issue, I'll look into it further tomorrow