Closed jiriteach closed 1 year ago
@holocronology @Jiriteach Have you guys tried adding the APP_KEY variable?
Yes, I did. Similar issues. I also noticed that the rest of the DB info (host, port, etc) was not being properly passed from compose file to mariaDB.
My issue of db not found is not related to the APP_KEY issue. Flushed everything and a new install failed - seems like a path issue in being able to find the sqlite db. Have reverted to .17 and using this OK for now.
Just did a fresh install on Unraid based on template and included the DB_CONNECTION variable for sqlite but still not working.
In Connection.php line 801: Database file at path [speedtest_tracker] does not exist. Ensure this is an absolute path to the database. (Connection: sqlite, SQL: PRAGMA foreign_ke ys = ON;) In SQLiteConnector.php line 34: Database file at path [speedtest_tracker] does not exist. Ensure this is an absolute path to the database.
Same issue for me :(
Decided to try 0.11.21 and strangly - its fixed!. Tried this on multiple sites with the 0.11.21 version. Fails on first startup then restarts and fixed so I belive its fixed now. Thanks
Version 0.11.21 worked for me as well. I had to ensure '- 'DB_CONNECTION=sqlite' was removed. Thank you for the fixes able to move from 0.11.17 now.
Decided to try 0.11.21 and strangly - its fixed!. Tried this on multiple sites with the 0.11.21 version. Fails on first startup then restarts and fixed so I belive its fixed now. Thanks
Same for me, fails on first startup then restarts , its works
My apologies if this is somewhere mixed into this huge gnarly thread, but is 0.11.21 working on unRAID? Default install, no existing appdata, and I'm getting the following.
In Connection.php line 801:
SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select *
from information_schema.tables where table_schema = speedtest_tracker and
table_name = migrations and table_type = 'BASE TABLE')
In Connector.php line 65:
SQLSTATE[HY000] [2002] Connection refused
This is a clean install on a new server, had this on a previous server a while back and wanted to start using it again. I came across this thread and have seen numerous comments about unRAID and it not working.
@StirCwazy this is what works for me on Unraid. Note that I setup a separate db for speed test:
-d --name='speedtest-tracker' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e HOST_HOSTNAME="Tower" -e HOST_CONTAINERNAME="speedtest-tracker" -e 'PUID'='1000' -e 'PGID'='1000' -e 'APP_KEY'='base64:somstring' -e 'DB_CONNECTION'='mysql' -e 'DB_HOST'='db' -e 'DB_PORT'='3306' -e 'DB_DATABASE'='speedtest' -e 'DB_USERNAME'='speedtest' -e 'DB_PASSWORD'='password' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='https://[IP]:[PORT:443]/' -l net.unraid.docker.icon='https://raw.githubusercontent.com/devzwf/unraid-docker-templates/main/images/speedtest-tracker-icon.png' -p '9443:443/tcp' -v '/mnt/user/appdata/speedtest-tracker-1':'/config':'rw' 'ghcr.io/alexjustesen/speedtest-tracker:latest'
To get the APP_KEY value, run the following command for your speedtest-tracker container:
docker exec -it speedtest-tracker php artisan key:generate --show
UNRAID: I had it on v0.11.17. I changed the template back to "latest". Forced an update and it failed to start. Same errors. Stopped and restarted and it works.
I guess the Unraid APP template is going to need to be revised to include mariadb/mysql or postsql databases.
@StirCwazy this is what works for me on Unraid. Note that I setup a separate db for speed test:
-d --name='speedtest-tracker' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e HOST_HOSTNAME="Tower" -e HOST_CONTAINERNAME="speedtest-tracker" -e 'PUID'='1000' -e 'PGID'='1000' -e 'APP_KEY'='base64:somstring' -e 'DB_CONNECTION'='mysql' -e 'DB_HOST'='db' -e 'DB_PORT'='3306' -e 'DB_DATABASE'='speedtest' -e 'DB_USERNAME'='speedtest' -e 'DB_PASSWORD'='password' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='https://[IP]:[PORT:443]/' -l net.unraid.docker.icon='https://raw.githubusercontent.com/devzwf/unraid-docker-templates/main/images/speedtest-tracker-icon.png' -p '9443:443/tcp' -v '/mnt/user/appdata/speedtest-tracker-1':'/config':'rw' 'ghcr.io/alexjustesen/speedtest-tracker:latest'
To get the APP_KEY value, run the following command for your speedtest-tracker container:
docker exec -it speedtest-tracker php artisan key:generate --show
Am I understanding then that a sqlite DB is no longer an option?
Decided to try 0.11.21 and strangly - its fixed!. Tried this on multiple sites with the 0.11.21 version. Fails on first startup then restarts and fixed so I belive its fixed now. Thanks
I added back the symlink in 0.11.20
so that fixed the connection to the database because it needed to get mounted inside of the app which is why it suddenly started work.
Decided to try 0.11.21 and strangly - its fixed!. Tried this on multiple sites with the 0.11.21 version. Fails on first startup then restarts and fixed so I belive its fixed now. Thanks
I added back the symlink in
0.11.20
so that fixed the connection to the database because it needed to get mounted inside of the app which is why it suddenly started work.
It is still kind of bugged, as it requires two runs to start successfully.
I guess the Unraid APP template is going to need to be revised to include mariadb/mysql or postsql databases.
I don't own the template but I'll post in the forums for an update.
It is still kind of bugged, as it requires two runs to start successfully.
Caching I think has something to do with it
I forgot to mention, ZappyZap's Unraid template doesn't use enviroment variables except for /config
Maybe not by default but you can add them
@alexjustesen If using unraid, are there any other variables I'd need to use if opting for sqlite?
@StirCwazy I'm actually using Unraid for this myself, however I'm using the .env
file.
DB_CONNECTION=sqlite
DB_DATABASE=/config/database.sqlite
@alexjustesen sorry I just meant it creates a .env
file by default and manually creating enviroment variables might be having a conflict
@alexjustesen sorry I just meant it creates a
.env
file by default and manually creating enviroment variables might be having a conflict
No worries, I'm marching towards getting rid of the the .env
file so environment variables passed through are absolutely preferred at this point.
@alexjustesen If using unraid, are there any other variables I'd need to use if opting for sqlite?
What @SaltireSoul is correct, you just need those two vars.
Adding these to Unraid:
Resulted in:
Removed them. Started and it failed. Restarted and it worked.
Adding these to Unraid:
Resulted in:
Removed them. Started and it failed. Restarted and it worked.
Added both variables, got the same 500 | Server Error. Removed as you said you tried with success, failed.
In Connection.php line 801:
SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select *
from information_schema.tables where table_schema = speedtest_tracker and
table_name = migrations and table_type = 'BASE TABLE')
In Connector.php line 65:
SQLSTATE[HY000] [2002] Connection refused
@StirCwazy config looks right, not sure if it was the unraid forums or here but it required a second restart for the container to pickup the env variables.
it required a second restart for the container to pickup the env variables
I did try the second, and third, restart after adding the variables without success. It was only after removing them that it worked.
Okay, I tried it again and it worked.
UPDATE @alexjustesen :
I added the following variables to Unraid and set up a MariaDB (Linuxserver image) container:
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=speedtest_tracker
DB_USERNAME=speedy
DB_PASSWORD=password
TZ=America/Chicago
I had to do the same start, stop, and restart to clear the 500 error code. Seems to be working.
I will update the template with this
speedtest_tracker
@StirCwazy config looks right, not sure if it was the unraid forums or here but it required a second restart for the container to pickup the env variables.
That's really weird , but yes it is the case.
speedtest_tracker
@StirCwazy config looks right, not sure if it was the unraid forums or here but it required a second restart for the container to pickup the env variables.
That's really weird , but yes it is the case.
After adding the variables for DB_CONNECTION and DB_DATABASE it worked after a restart. I've been busy and haven't had a chance to reply, so my apologies to all.
APP_KEY
should that be missing on start up.Seems it's not creating the db if it doesn't exist. How to start using this image when no preexisting sqlite db exists? Should be documented I believe
Using SQLite added to the FAQ
Using SQLite added to the FAQ
I try this method but not work for me. I back to v0.11.17
I moved to MariaDB.
Using SQLite added to the FAQ
I try this method but not work for me. I back to v0.11.17
If you're still having problems please open a new issue and we'll get it sorted. I'll be unsubscribing from this one
Seeing db errors with the latest release. Since I used Watchtower - it pulled down the latest 0.11.19 and now the container wont come back up. Have multiple deployments effected.
Assuming this is related to the SQLite changes? How does one fix this? Was a working deployment - only update was the container.