Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Server Error #33

Closed
jiriteach opened this issue Sep 28, 2022 · 14 comments · Fixed by #51
Closed

500 Server Error #33

jiriteach opened this issue Sep 28, 2022 · 14 comments · Fixed by #51
Assignees
Labels
🐛 bug Something isn't working

Comments

@jiriteach
Copy link

jiriteach commented Sep 28, 2022

While awaiting the a build for RPI's - Have the latest build running on my Windows machine using Docker.
Provided a blank sqlite db.

Logging in with admin@example and password.
Seeing a 500 server error. Nothing obvious to indicate what the problem could be.

Call is against - http://localhost:8080/livewire/message/filament.core.auth.login

Oops! An Error Occurred
The server returned a "405 Method Not Allowed".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

Screen Shot 2022-09-29 at 11 15 34

Any ideas?
Thanks

@darkknight7777777
Copy link

I was about to post about this. seeing this as well (docker on ubuntu 22). below is what appears to be the relevant error in the log.

[2022-09-28 21:23:24] production.ERROR: realpath(): open_basedir restriction in effect. File(/app/database.sqlite) is not within the allowed path(s): (/var/www/html:/dev/stdout:/tmp) (SQL: PRAGMA foreign_keys = ON;) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 0): realpath(): open_basedir restriction in effect. File(/app/database.sqlite) is not within the allowed path(s): (/var/www/html:/dev/stdout:/tmp) (SQL: PRAGMA foreign_keys = ON;) at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:759)

@jiriteach
Copy link
Author

Anyone have an idea on how to resolve this? Cannot log in so cannot run any tests! Thanks

@GentleHoneyLover
Copy link

Same issue here. Any solution / workaround?

Docker version 20.10.18, build b40c2f6.
Ubuntu 20.04
Kernel 5.4.0-126-generic

Screen Shot 2022-09-30 at 09 02 30

Screen Shot 2022-09-30 at 09 02 36

@alexjustesen
Copy link
Owner

It seems to be an issue with the SQLite DB that's created if you don't specify an external one like mariadb/MySQL/postgresql.

Confirmed the issue and I'll look into it asap

@alexjustesen
Copy link
Owner

Btw for a full log output it should be available at /var/www/html/storage/logs/laravel.log. I'll be changing this location in an upcoming build to make it more accessible

@GertJanH
Copy link

GertJanH commented Sep 30, 2022

Btw for a full log output it should be available at /var/www/html/storage/logs/laravel.log. I'll be changing this location in an upcoming build to make it more accessible

i have the same error, but there are no logs.

...
root@71f81c53444f:/var/www/html/storage/logs# ls -al

total 12
drwxr-xr-x 1 webuser webgroup 4096 Sep 28 01:12 .
drwxr-xr-x 1 webuser webgroup 4096 Sep 28 01:12 ..
root@71f81c53444f:/var/www/html/storage/logs
...

@alexdelprete
Copy link
Contributor

I'm wondering if permissions on the db file could be the problem. I remember having this 500 issue in the past (another docker image), and it was the location+permissions of the file db. Since then, I always chose mysql as db, if the project supported it. Less headaches. :)

@GertJanH
Copy link

here is a compleet log i found in portainer, startup and first login

🔑 Fixing permissions... takes a long time..

_speedtest-tacker_logs.txt

@alexdelprete
Copy link
Contributor

alexdelprete commented Sep 30, 2022

here is a compleet log i found in portainer, startup and first login

This is the issue. The location of the file should be in a specific/allowed location, and volume mapping should be used to point to it. Alex will fix it.

[2022-09-30 11:43:21] production.ERROR: realpath(): open_basedir restriction in effect. File(/app/database.sqlite) is not within the allowed path(s): (/var/www/html:/dev/stdout:/tmp) (SQL: PRAGMA foreign_keys = ON;) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 0): realpath(): open_basedir restriction in effect. File(/app/database.sqlite) is not within the allowed path(s): (/var/www/html:/dev/stdout:/tmp) (SQL: PRAGMA foreign_keys = ON;) at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:759)

@bverkron
Copy link

Looks like the cause has been found and fix planned but throwing my info in just in case it's helpful.

Logs from Portainer:
_speedtest-tracker_logs.txt

docker-compose (in case there's something about my setup causing the issue):

services:   
  speedtest:
      container_name: speedtest-tracker
      image: ghcr.io/alexjustesen/speedtest-tracker:latest
      ports:
        - 8888:80
      volumes:
          - /home/master/speedtest/mount_app:/app
      environment:
           - HP_POOL_NAME=speedtest-tracker_php
           - DB_CONNECTION=sqlite
           - DB_DATABASE=/app/database.sqlite
      restart: unless-stopped   

@jiriteach
Copy link
Author

Wanted to check-in on plans to fix this issue? At the moment - the only options are a seperate MariaDB/MySQL or PostgreSQL? Keen to just use a simple file db.

Thanks

@bverkron
Copy link

bverkron commented Oct 16, 2022

Wanted to check-in on plans to fix this issue? At the moment - the only options are a seperate MariaDB/MySQL or PostgreSQL? Keen to just use a simple file db.

Thanks

Was just about to ask the same thing. I don’t have an existing external DB and setting one up for me is overkill just for speedtest in terms or resources, etc. Had one setup for another container and it was using like 30% of my machines memory when a flat DB was all that was needed so I switched the other container to boltdb.

Any manual workarounds for this until there’s an official fix?

@alexjustesen
Copy link
Owner

A babysitter would be the ideal workaround haha, it's on my short list of issues because the permissions is also currently effecting config.yml. I've got this on my todo this week and will be wrapped up in the next release.

@derekcentrico
Copy link

Happy to test anything on this as I have the 500 error after initial setup. Docker on Ubuntu 20.04.1.

speedtest:
container_name: speedtest-new
image: ghcr.io/alexjustesen/speedtest-tracker:latest
volumes:
- /home/docker/speedtest/config:/config
- /home/docker/speedtest/app:/app
environment:
- PUID=1000
- PGID=140
- TZ="America/New_York"
- PHP_POOL_NAME="speedtest-tracker_php"
- DB_CONNECTION="sqlite"
- DB_DATABASE="/app/database.sqlite"
logging:
driver: "json-file"
options:
max-file: "10"
max-size: "200k"
restart: unless-stopped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants