this post was submitted on 11 Jan 2024
15 points (94.1% liked)

Selfhosted

40220 readers
1025 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
 

I don't know when it started, I usually check my instance through the Voyager app and it never showed a problem, but I'm suddenly getting "server error" and 502 bad gateway errors on my instance on desktop. I haven't made any major changes (read, any at all) since I last confirmed it worked on desktop.

Checking the logs I don't see any obvious proxy issues but I am getting weird connection issues in lemmy-ui:

TypeError: fetch failed
lemmy-lemmy-ui-1  |     at Object.fetch (node:internal/deps/undici/undici:11730:11)
lemmy-lemmy-ui-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
lemmy-lemmy-ui-1  |   cause: ConnectTimeoutError: Connect Timeout Error
lemmy-lemmy-ui-1  |       at onConnectTimeout (node:internal/deps/undici/undici:6869:28)
lemmy-lemmy-ui-1  |       at node:internal/deps/undici/undici:6825:50
lemmy-lemmy-ui-1  |       at Immediate._onImmediate (node:internal/deps/undici/undici:6857:13)
lemmy-lemmy-ui-1  |       at process.processImmediate (node:internal/timers:478:21) {
lemmy-lemmy-ui-1  |     code: 'UND_ERR_CONNECT_TIMEOUT'
lemmy-lemmy-ui-1  |   }
lemmy-lemmy-ui-1  | }

Where on earth can I even begin to address this?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 10 months ago* (last edited 10 months ago)

Check this GitHub link for instructions. https://github.com/LemmyNet/lemmy-ui/issues/1530#issuecomment-1605781461

Once I get home from work this afternoon I will post my docker-compose.yml which has an extra container that automatically deletes the database entry then resets it.

EDIT: Here is the extra container from my docker-compose.yml

  icon-fix:
    image: iconfix:latest
    command:
      - /bin/sh
      - -c
      - |
        sleep 10
        # Remove Site Icon - be sure to set your postgres password
        PGPASSWORD=<POSTGRESS PASSWORD HERE> psql -U lemmy -h postgres -d lemmy -c "UPDATE site SET icon = NULL WHERE id = 1;"
        # Refresh Site - replace example.com with your sites domain
	curl -f -sS -H "Host: example.com" http://lemmy-ui:1234 > temp.html
        # Reset Site Icon - Set your postgres password and replace the URL with one that points to your icon
 	PGPASSWORD=<POSTGRESS PASSWORD HERE> psql -U lemmy -h postgres -d lemmy -c "UPDATE site SET icon = 'https://example.com/pictrs/image/2cc85182-5739-4c86-b982-94fc913e80d3.webp' WHERE id = 1;"
    depends_on:
      - postgres

And here is the Dockerfile for building the iconfix image

FROM docker.io/postgres:latest
RUN apt update
RUN apt install -y curl