500 Internal Error | 1.0 Beta

37 Replies
Cakey Bot
Cakey Bot2d ago
Thank you for submitting a support request. Depending on the volume of requests, our team should get in contact with you shortly.
⚠️ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
❓ Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
Mx
Mx2d ago
Same error here
Heavensong
HeavensongOP2d ago
looks like it's trying to create /db and /redis folders
Mx
Mx2d ago
looks like it created the appdata dir, just nothing under it
Heavensong
HeavensongOP2d ago
the /appdata folder has "nobody" user so maybe need to use PUID and PGID? 1000 I think in Unraid for "nobody" but that's specific to me
lupine
lupine2d ago
same error here
Mx
Mx2d ago
> ll
total 4.0K
drwxr-xr-x 2 root root 4.0K Dec 17 16:19 appdata
> ll appdata
total 0
> ll
total 4.0K
drwxr-xr-x 2 root root 4.0K Dec 17 16:19 appdata
> ll appdata
total 0
Mine has root user
Manicraft1001
Manicraft10012d ago
Can you try https://docs.docker.com/engine/containers/run/#user instead? The image no longer supports PUID and PGID
Docker Documentation
Running containers
Running and configuring containers with the Docker CLI
Manicraft1001
Manicraft10012d ago
1000 should be correct for Unraid. It will depend on your system.
lupine
lupine2d ago
uhm have to find the argument in compose
Mx
Mx2d ago
Shouldn't default root user still work then?
Manicraft1001
Manicraft10012d ago
services:
app:
user: 1001:1001
services:
app:
user: 1001:1001
Meierschlumpf
Meierschlumpf2d ago
Probably not because we change the ownership of the files used to run homarr and /appdata to gid=1001 and uid=1001. So because of that it's not the same and does not work with root probably
ArcaneWater
ArcaneWater2d ago
Okay with user i got it through this db error
Heavensong
HeavensongOP2d ago
No description
Heavensong
HeavensongOP2d ago
tried that with both 1000 and 1001, no joy same errors
lupine
lupine2d ago
same here
Meierschlumpf
Meierschlumpf2d ago
Send the raw docker command coming out of this
lupine
lupine2d ago
services: homarr: container_name: homarr image: ghcr.io/homarr-labs/homarr:beta restart: unless-stopped user: 1001:1001 environment: - TZ=Europe/Copenhagen - "NODE_TLS_REJECT_UNAUTHORIZED: 0" volumes: - /home/homarr/appdata:/appdata - /var/run/docker.sock:/var/run/docker.sock ports: - 7575:7575 thats the compose i run
Heavensong
HeavensongOP2d ago
``
docker run
-d
--name='homarr'
--net='farrosphere'
--pids-limit 2048
-e TZ="Europe/London"
-e HOST_OS="Unraid"
-e HOST_HOSTNAME="farrosphere"
-e HOST_CONTAINERNAME="homarr"
-l net.unraid.docker.managed=dockerman
-l net.unraid.docker.icon='https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/homarr.png'
-p '7575:7575/tcp'
-v '/mnt/cache/appdata/homarr/appdata':'/appdata':'rw'
-v '/var/run/docker.sock':'/var/run/docker.sock':'rw'
-u="1000" 'ghcr.io/homarr-labs/homarr:beta'
b2cb9654f8caba49ef8f80b8a808c9e109de6bea64973eaa35f6342f719cb059
docker run
-d
--name='homarr'
--net='farrosphere'
--pids-limit 2048
-e TZ="Europe/London"
-e HOST_OS="Unraid"
-e HOST_HOSTNAME="farrosphere"
-e HOST_CONTAINERNAME="homarr"
-l net.unraid.docker.managed=dockerman
-l net.unraid.docker.icon='https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/homarr.png'
-p '7575:7575/tcp'
-v '/mnt/cache/appdata/homarr/appdata':'/appdata':'rw'
-v '/var/run/docker.sock':'/var/run/docker.sock':'rw'
-u="1000" 'ghcr.io/homarr-labs/homarr:beta'
b2cb9654f8caba49ef8f80b8a808c9e109de6bea64973eaa35f6342f719cb059
Manicraft1001
Manicraft10012d ago
Please use code blocks, it's incredibly messy: https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA The command is wrong, remove the = from the -u
lupine
lupine2d ago
services:
homarr:
container_name: homarr
image: ghcr.io/homarr-labs/homarr:beta
restart: unless-stopped
user: 1001:1001
environment:
- TZ=Europe/Copenhagen
- "NODE_TLS_REJECT_UNAUTHORIZED: 0"
volumes:
- /home/homarr/appdata:/appdata
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 7575:7575
services:
homarr:
container_name: homarr
image: ghcr.io/homarr-labs/homarr:beta
restart: unless-stopped
user: 1001:1001
environment:
- TZ=Europe/Copenhagen
- "NODE_TLS_REJECT_UNAUTHORIZED: 0"
volumes:
- /home/homarr/appdata:/appdata
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 7575:7575
Mx
Mx2d ago
fwiw, even using user 1000 (my UID) or 1001, no dice - Still failling to perms on the subdirs. (Ubuntu) :slowfrog:
Meierschlumpf
Meierschlumpf2d ago
Can you try extra parameters -u '1001:1001'?
Heavensong
HeavensongOP2d ago
same issue, tried -u "1001:1001" and -u '1001:1001' just in case the " or ' was important
Mx
Mx2d ago
someone gotta hop in that public chat and screenshare lol
lupine
lupine2d ago
cant do voice - house is sleeping 😉
Heavensong
HeavensongOP2d ago
and with user 1000 it's even worse, don't even get a 500 error
No description
ArcaneWater
ArcaneWater2d ago
I have the same issue now that i fixed 500 with -user 🙂 ERR_CONNECTION_REFUSED and all green in homarr logs
Manicraft1001
Manicraft10012d ago
If there is no error, the port is probably not exposed correctly. What is your port exposure?
ArcaneWater
ArcaneWater2d ago
ports: - 7575:7575
lupine
lupine2d ago
with user: 1000:1000 i also get a connection refused 1001:1001 gets a 500
Heavensong
HeavensongOP2d ago
okay so if I manually create db and redis folders, it does then write db.sqlite and I can create first user also, 99 is nobody, not 1000 1000 is one of the users I made for smb, 99 is the uid and 100 is the gid for 'nobody' in unraid, and if I use -u '99:100' I get the ERR_CONNECTION_REFUSED again
Mx
Mx2d ago
# gettext is required for envsubst
RUN apk add --no-cache redis nginx bash gettext
RUN mkdir /appdata
RUN mkdir /secrets

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

RUN chown -R 1001:1001 /appdata
RUN chown -R 1001:1001 /secrets

VOLUME /appdata
VOLUME /secrets
# gettext is required for envsubst
RUN apk add --no-cache redis nginx bash gettext
RUN mkdir /appdata
RUN mkdir /secrets

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

RUN chown -R 1001:1001 /appdata
RUN chown -R 1001:1001 /secrets

VOLUME /appdata
VOLUME /secrets
No luck here
Manicraft1001
Manicraft10012d ago
We fixed this issue by chowning the directory. But this shouldn't be required, there is definetly some issue in the docker image. It's quite late for our time zone (23:20) and we will continue to investigate this tomorrow. I recommend all people, experiencing this problem, to wait until tomorrow instead of scewing with their permissions. See you tomorrow 👋
Mx
Mx23h ago
So - bad news https://github.com/moby/moby/issues/3206 doing VOLUME appdata is going to create the directory 'appdata' on the host as root if it doesn't exist. There is no way around that. It's created by the docker Daemon which is running as root. There is no 'automated' solution here via the dockerfile. Options - User creates directory prior to running compose - User chown's after (worse option considering it'll have failed once, and requires restarting container) - Pre-script which just mkdir's then can launch into docker compose. (Common option) This wouldn't really affect helm/K8s because it's a PVC and they do their own permissions. But for docker runtime, no solution. For docker, it's standard for directories to pre-exist with proper permissions before mounting to them. (Lots of OS projects require this, either manually, or via pre-script usually ran via curl) This is per my colleague is well versed in docker. There are some 'gotchas' like helm where this doesn't apply, like if you are using a GUi that wraps all docker commands, or has their own file perms. Otherwise, this is the summary
GitHub
Files created into a host mounted directory are owned by root user ...
When saving a file by running an application in a Docker container to an host mounted directory, that file results to be owned by the root user in the host file system. For example: docker run -v $...
Krispy
Krispy22h ago
I just assumed permissions issues, hit terminal in the container, rain ID -u to determine what it was running as, and then just chowned the directory to match. Didn't even think if it as being a problem. Glad it's not running as root now
Want results from more Discord servers?
Add your server