Fetch error 500 - Internal Server Error #59

Closed
opened 2025-12-29 09:22:16 +01:00 by adam · 10 comments
Owner

Originally created by @mrg358 on GitHub (Apr 21, 2025).

Creating a new Include File in Web UI throws an error.
Creating a new Middleware compose works with no issue.

  1. Fresh install of godoxy
  2. Log in to Web UI
  3. Config editor - New file - Include file
  4. app.yml

Fetch error 500 - Internal Server Error
Internal Server Error

godoxy           | 04-21 12:03 ERR open config/appp.yml: no such file or directory host=127.0.0.1:8888 remote=127.0.0.1:43750 uri="GET /v1/file/provider/app.yml"

Noticed there is a mixed folder structure ownership right after installation. Not sure if related. Tried to change config folder permission didn't help.

drwxr-xr-x  7 ubuntu ubuntu 4096 Apr 21 09:40 ./
drwxr-x--- 10 ubuntu ubuntu 4096 Apr 21 09:40 ../
drwxr-xr-x  2 root   root   4096 Apr 21 08:46 certs/
-rw-rw-r--  1 ubuntu ubuntu 1324 Apr 21 08:55 compose.yml
drwxrwxr-x  3 ubuntu ubuntu 4096 Apr 21 09:26 config/
drwxr-xr-x  3 root   root   4096 Apr 21 08:49 data/
-rw-rw-r--  1 ubuntu ubuntu 1811 Apr 21 08:50 .env
drwxr-xr-x  2 root   root   4096 Apr 21 08:44 error_pages/
drwxr-xr-x  2 root   root   4096 Apr 21 08:44 logs/
Originally created by @mrg358 on GitHub (Apr 21, 2025). Creating a new _Include File_ in Web UI throws an error. Creating a new _Middleware compose_ works with no issue. 1. Fresh install of godoxy 2. Log in to Web UI 3. Config editor - New file - Include file 4. app.yml Fetch error 500 - Internal Server Error Internal Server Error ``` godoxy | 04-21 12:03 ERR open config/appp.yml: no such file or directory host=127.0.0.1:8888 remote=127.0.0.1:43750 uri="GET /v1/file/provider/app.yml" ``` Noticed there is a mixed folder structure ownership right after installation. Not sure if related. Tried to change _config_ folder permission didn't help. ``` drwxr-xr-x 7 ubuntu ubuntu 4096 Apr 21 09:40 ./ drwxr-x--- 10 ubuntu ubuntu 4096 Apr 21 09:40 ../ drwxr-xr-x 2 root root 4096 Apr 21 08:46 certs/ -rw-rw-r-- 1 ubuntu ubuntu 1324 Apr 21 08:55 compose.yml drwxrwxr-x 3 ubuntu ubuntu 4096 Apr 21 09:26 config/ drwxr-xr-x 3 root root 4096 Apr 21 08:49 data/ -rw-rw-r-- 1 ubuntu ubuntu 1811 Apr 21 08:50 .env drwxr-xr-x 2 root root 4096 Apr 21 08:44 error_pages/ drwxr-xr-x 2 root root 4096 Apr 21 08:44 logs/ ```
adam closed this issue 2025-12-29 09:22:16 +01:00
Author
Owner

@yusing commented on GitHub (Apr 21, 2025):

From what I see, the error is about config/appp.yml being not exist. I guess there's a typo for "appp".

@yusing commented on GitHub (Apr 21, 2025): From what I see, the error is about `config/appp.yml` being not exist. I guess there's a typo for "appp".
Author
Owner

@yusing commented on GitHub (Apr 21, 2025):

About the permission issue, you may want to do this:

  • run docker-socket-proxy
docker-proxy:
  container_name: docker-proxy
  image: tecnativa/docker-socket-proxy
  privileged: true
  environment:
    - ALLOW_START=1
    - ALLOW_STOP=1
    - ALLOW_RESTARTS=1
    - CONTAINERS=1
    - EVENTS=1
    - PING=1
    - POST=1
    - VERSION=1
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock
  restart: always
  ports:
    - 127.0.0.1:2375:2375
  • add DOCKER_HOST=tcp://127.0.0.1:2375 to .env

  • set container user to 1000:1000 (adjust if your uid is different)

app:
    image: ghcr.io/yusing/godoxy:latest
    container_name: godoxy
    restart: always
    ...
    user: 1000:1000
  • chown -R 1000:1000 .

  • ready to restart with docker compose up -d

@yusing commented on GitHub (Apr 21, 2025): About the permission issue, you may want to do this: - run docker-socket-proxy ```yaml docker-proxy: container_name: docker-proxy image: tecnativa/docker-socket-proxy privileged: true environment: - ALLOW_START=1 - ALLOW_STOP=1 - ALLOW_RESTARTS=1 - CONTAINERS=1 - EVENTS=1 - PING=1 - POST=1 - VERSION=1 volumes: - /var/run/docker.sock:/var/run/docker.sock restart: always ports: - 127.0.0.1:2375:2375 ``` - add `DOCKER_HOST=tcp://127.0.0.1:2375` to `.env` - set container user to 1000:1000 (adjust if your uid is different) ```yaml app: image: ghcr.io/yusing/godoxy:latest container_name: godoxy restart: always ... user: 1000:1000 ``` - `chown -R 1000:1000 .` - ready to restart with `docker compose up -d`
Author
Owner

@yusing commented on GitHub (Apr 21, 2025):

Since GoDoxy has to read/write to docker socket, root privileges is required. But when you save a file from the WebUI the file will be owned by root as well. Doing above bypasses the requirement.

@yusing commented on GitHub (Apr 21, 2025): Since GoDoxy has to read/write to docker socket, root privileges is required. But when you save a file from the WebUI the file will be owned by root as well. Doing above bypasses the requirement.
Author
Owner

@mrg358 commented on GitHub (Apr 21, 2025):

Thank you for suggestions.

I tried and failed. Not sure if it is a permission issue.
Godoxy seems to run OK.

docker compose logs -f --tail 100 app frontend
godoxy-frontend  |    ▲ Next.js 15.3.0
godoxy-frontend  |    - Local:        http://127.0.0.1:3000
godoxy-frontend  |    - Network:      http://127.0.0.1:3000
godoxy-frontend  | 
godoxy-frontend  |  ✓ Starting...
godoxy-frontend  |  ✓ Ready in 359ms
godoxy           | 04-21 19:07 INF GoDoxy version v0.10.0
godoxy           | 04-21 19:07 INF icon list cache loaded display_names=1587 icons=10732
godoxy           | 04-21 19:07 INF updating icon data
godoxy           | 04-21 19:07 INF icon cache loaded count=85
godoxy           | 04-21 19:07 INF icons list updated display_names=1587 icons=10732
godoxy           | 04-21 19:07 INF homepage overrides config loaded count=7
godoxy           | 04-21 19:07 INF loaded route providers
godoxy           |                   • app.yml      0 routes
godoxy           |                   • docker@local 14 routes
godoxy           | 04-21 19:07 INF next renewal in 57 days, 16 hours and 3 minutes
godoxy           | 04-21 19:07 INF certificate expire on 2025-07-18 09:11:02
godoxy           | 04-21 19:07 INF listening name= port=38609 type=tcp
godoxy           | 04-21 19:07 INF listening name= port=32949 type=tcp
godoxy           | 04-21 19:07 INF server started addr=:80 server=proxy
godoxy           | 04-21 19:07 INF server started addr=:443 server=proxy
godoxy           | 04-21 19:07 WRN service went down name=godoxy
godoxy           | 04-21 19:07 INF prometheus metrics enabled
godoxy           | 04-21 19:07 INF server started addr=127.0.0.1:8888 server=api
godoxy           | 04-21 19:07 INF service is up name=godoxy
godoxy-frontend  | (node:1) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
godoxy-frontend  | (Use `node --trace-deprecation ...` to show where the warning was created)
godoxy           | 04-21 19:07 WRN no match domains configured, accepting websocket API request from all origins

When I try to create new files from Web UI it throws the same error

Fetch error 500 - Internal Server Error
Internal Server Error

godoxy           | 04-21 19:08 ERR open config/one.yml: no such file or directory host=127.0.0.1:8888 remote=127.0.0.1:54226 uri="GET /v1/file/provider/one.yml"

godoxy           | 04-21 19:09 ERR open config/middlewares/mid.yml: no such file or directory host=127.0.0.1:8888 remote=127.0.0.1:53436 uri="GET /v1/file/middleware/mid.yml"

Any suggestion welcome.

@mrg358 commented on GitHub (Apr 21, 2025): Thank you for suggestions. I tried and failed. Not sure if it is a permission issue. Godoxy seems to run OK. ``` docker compose logs -f --tail 100 app frontend godoxy-frontend | ▲ Next.js 15.3.0 godoxy-frontend | - Local: http://127.0.0.1:3000 godoxy-frontend | - Network: http://127.0.0.1:3000 godoxy-frontend | godoxy-frontend | ✓ Starting... godoxy-frontend | ✓ Ready in 359ms godoxy | 04-21 19:07 INF GoDoxy version v0.10.0 godoxy | 04-21 19:07 INF icon list cache loaded display_names=1587 icons=10732 godoxy | 04-21 19:07 INF updating icon data godoxy | 04-21 19:07 INF icon cache loaded count=85 godoxy | 04-21 19:07 INF icons list updated display_names=1587 icons=10732 godoxy | 04-21 19:07 INF homepage overrides config loaded count=7 godoxy | 04-21 19:07 INF loaded route providers godoxy | • app.yml 0 routes godoxy | • docker@local 14 routes godoxy | 04-21 19:07 INF next renewal in 57 days, 16 hours and 3 minutes godoxy | 04-21 19:07 INF certificate expire on 2025-07-18 09:11:02 godoxy | 04-21 19:07 INF listening name= port=38609 type=tcp godoxy | 04-21 19:07 INF listening name= port=32949 type=tcp godoxy | 04-21 19:07 INF server started addr=:80 server=proxy godoxy | 04-21 19:07 INF server started addr=:443 server=proxy godoxy | 04-21 19:07 WRN service went down name=godoxy godoxy | 04-21 19:07 INF prometheus metrics enabled godoxy | 04-21 19:07 INF server started addr=127.0.0.1:8888 server=api godoxy | 04-21 19:07 INF service is up name=godoxy godoxy-frontend | (node:1) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead. godoxy-frontend | (Use `node --trace-deprecation ...` to show where the warning was created) godoxy | 04-21 19:07 WRN no match domains configured, accepting websocket API request from all origins ``` When I try to create new files from Web UI it throws the same error _Fetch error 500 - Internal Server Error Internal Server Error_ ``` godoxy | 04-21 19:08 ERR open config/one.yml: no such file or directory host=127.0.0.1:8888 remote=127.0.0.1:54226 uri="GET /v1/file/provider/one.yml" godoxy | 04-21 19:09 ERR open config/middlewares/mid.yml: no such file or directory host=127.0.0.1:8888 remote=127.0.0.1:53436 uri="GET /v1/file/middleware/mid.yml" ``` Any suggestion welcome.
Author
Owner

@yusing commented on GitHub (Apr 21, 2025):

Did u click save file after creating them? Could you ls config and double check if they exist?

@yusing commented on GitHub (Apr 21, 2025): Did u click save file after creating them? Could you `ls config` and double check if they exist?
Author
Owner

@yusing commented on GitHub (Apr 21, 2025):

And now I see this:

loaded route providers
godoxy           |                   • app.yml      0 routes

Which means you've created app.yml successfully, but not two other files

@yusing commented on GitHub (Apr 21, 2025): And now I see this: ``` loaded route providers godoxy | • app.yml 0 routes ``` Which means you've created app.yml successfully, but not two other files
Author
Owner

@mrg358 commented on GitHub (Apr 21, 2025):

The app.yml was created via terminal.

After a little bit of "try and error" it worked out somehow but not a smooth experience.

  1. Click New file - throws the Fetch error 500 - no file created yet in file system just shows in Web UI
  2. Add Route - fill out the mandatory alias - Save
  3. Save file - Fetch error 400 - Bad Request {"subjects":["alias"],"err":{}}
  4. Edit route - fill out port 80 (default 80)
  5. Save file - Fetch error 400 - Bad Request
  6. Edit route - fill out port to e.g. 8080
  7. Save file - File saved - this time in file system finally
@mrg358 commented on GitHub (Apr 21, 2025): The app.yml was created via terminal. After a little bit of "try and error" it worked out somehow but not a smooth experience. 1. Click New file - throws the Fetch error 500 - no file created yet in file system just shows in Web UI 2. Add Route - fill out the mandatory alias - Save 3. Save file - _Fetch error 400 - Bad Request_ `{"subjects":["alias"],"err":{}}` 4. Edit route - fill out port 80 (default 80) 5. Save file - _Fetch error 400 - Bad Request_ 6. Edit route - fill out port to e.g. 8080 7. Save file - File saved - this time in file system finally
Author
Owner

@yusing commented on GitHub (Apr 21, 2025):

Ok I'll check again and see if I can reproduce the issue

@yusing commented on GitHub (Apr 21, 2025): Ok I'll check again and see if I can reproduce the issue
Author
Owner

@yusing commented on GitHub (Apr 22, 2025):

@mrg358 Fixed, please docker compose pull && docker compose up -d

@yusing commented on GitHub (Apr 22, 2025): @mrg358 Fixed, please `docker compose pull && docker compose up -d`
Author
Owner

@mrg358 commented on GitHub (Apr 22, 2025):

Quickly tested, now it works much better.
Thank you and closing the issue.

@mrg358 commented on GitHub (Apr 22, 2025): Quickly tested, now it works much better. Thank you and closing the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/godoxy#59