julianpoy / RecipeSage-selfhost

A collection of configuration files to host your own private instance of RecipeSage for personal use.
https://recipesage.com
Other
124 stars 28 forks source link

Unexpected error on register after install #79

Open tealtxgr opened 2 months ago

tealtxgr commented 2 months ago

I'm unable to have my friend (who this install is for) register the admin account- he gets an unexpected error on the front end, this pops up in the logs (url taken out):

2024/09/05 19:09:41 [error] 25#25: *6 open() "/usr/share/nginx/html/api/users/register" failed (2: No such file or directory), client: 172.19.0.1, server: localhost, request: "POST /api/users/register?false=false& HTTP/1.1", host: "[url]", referrer: "https://[url]/"

I'm using Cosmos as my reverse proxy, by the way. Please let me know if this is related Cosmos: https://cosmos-cloud.io/

Compose file is literally the default, no changes were made.

API container logs: https://pastebin.com/BuzbJVRW

Please do the following and check the boxes before filing [x] I have attached my docker-compose.yaml to the issue (default) [x] I have attached the logs for my api container to the issue [x] My issue is related to this selfhost repo, not the main tracker for RecipeSage here

tealtxgr commented 2 months ago

Update: I was closing my tabs when I noticed the proxy container was restarting over and over. Here's the logs it keeps looping:

2024-09-05 19:19:13
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
2024-09-05 19:19:13
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
2024-09-05 19:19:13
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
2024-09-05 19:19:13
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
2024-09-05 19:19:13
10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
2024-09-05 19:19:13
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
2024-09-05 19:19:13
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
2024-09-05 19:19:13
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
2024-09-05 19:19:13
/docker-entrypoint.sh: Configuration complete; ready for start up
2024-09-05 19:19:13
2024/09/05 19:19:13 [emerg] 1#1: host not found in upstream "static" in /etc/nginx/conf.d/default.conf:30
2024-09-05 19:19:13
nginx: [emerg] host not found in upstream "static" in /etc/nginx/conf.d/default.conf:30
julianpoy commented 2 months ago

Have you modified the docker-compose? From the logs it looks like the static container can't be found by the proxy. Do you notice any logs on the static container?

tealtxgr commented 2 months ago

Have you modified the docker-compose? From the logs it looks like the static container can't be found by the proxy. Do you notice any logs on the static container?

I haven't, no. I double checked and the diff is identical: image

tealtxgr commented 1 month ago

Have you modified the docker-compose? From the logs it looks like the static container can't be found by the proxy. Do you notice any logs on the static container?

Actually, ignore the "host not found" issue. I got that working. That was related to Cosmos after all. I still can't get registration working though.

Looking through the issues posted here that are similar, I'm seeing reference to something needing to be run after installation, but I'm not finding anything related to this in the Setup section of the Readme.md. Where could I find that info?

julianpoy commented 1 month ago

There used to be a requirement of running migrations after setup. You'd see an error related to a table not being present in the DB from the API container, but that's not the case here. The migrations are now automatically run on startup.

I believe the issue you're experiencing is a networking issue, though perhaps you've sorted that. If you have any logs within any of the containers that could be useful.

tealtxgr commented 1 month ago

Yeah for sure- I restarted all the containers and had my friend try. Here's the logs from all the containers:

proxy: https://pastebin.com/1m2vPKyy api: https://pastebin.com/6aHa7WQh typesense: https://pastebin.com/vePTsWBQ postgres: https://pastebin.com/qVjqyQCA browserless: https://pastebin.com/tFehkW4A pushpin: https://pastebin.com/10gEXg5A static: https://pastebin.com/bD1RU5et