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

Selfhosted

39575 readers
416 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
10
submitted 1 year ago* (last edited 1 year ago) by aranym to c/selfhosted
 

(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
[–] [email protected] 1 points 1 year ago (1 children)

it should return an empty set. It looks like the database is running but the lemmy database tables were not installed. Can you get back to the sql prompt and try

\dt

if the database was installed correctly, you should see something like this:

lemmy-# \dt

              List of relations

Schema | Name | Type | Owner

--------+----------------------------+-------+-------

public | __diesel_schema_migrations | table | lemmy

public | activity | table | lemmy . .

. .

public | person | table | lemmy

. . .

can you check that the tables are actually there? My guess is that the tables in the database weren't created. assuming you don't see any tables when you do this, again at the sql prompt, please try

\c lemmy

and see if it connects? if it does, it will say You are now connected to database "lemmy" as user "lemmy".

Let me know what the result of that is and we'll try to figure out what's gone wrong with the database setup because it looks like that's your problem - the database was not populated when it was created.