Clean install via docker run with existing mysql does not populate all tables in database and fails. #2334
Replies: 22 comments
-
|
Do only thing I can think of is that something went wrong with the database connection. My suggestion would be recreate the database, and docker volume and make sure that all the database information is correct. |
Beta Was this translation helpful? Give feedback.
-
I already did the following a couple of times without luck: Delete all tables in the database, deleted all folders/files in the config share and restart the docker volume. As tables are being created in the database and folders/files are being created in the config share, database information is correct. Did not yet recreate the database and docker volume. Will do that as next step. Thx. |
Beta Was this translation helpful? Give feedback.
-
|
I just deleted and re-created the database on mariadb 10 (port 3007). And recreated the docker container for speedtest-tracker. No luck. Same errors. Then deleted the database on mariadb 10 and re-created the database on mariadb 5 (port 3006). And recreated the docker container for speedtest-tracker again (changed port to 3006 and had to limit userid to 16 characters). Again no luck. Only thing different now, was that only two tables (migrations and users) were created instead of four tables. I read in another issue something about timing? That during first start of the speedtest-tracker container, the database was not setup in time and then the speedtest-tracker app also ran in errors. Could this be the case here? Is there a way to force full initialization of the database first? Anything else to look at/try? |
Beta Was this translation helpful? Give feedback.
-
|
Can you run below on the shell of the container. If the migration did not run you can try |
Beta Was this translation helpful? Give feedback.
-
|
Thx for quick response. Output of 'php artisan migrate:status'
Output of 'php artisan migrate'
Seems like a catch 22. As when I would clean the database first and then start the container, immediately the tables migrations and users would be created and would be in same situation. Or should I just drop the tables after starting the container and then do |
Beta Was this translation helpful? Give feedback.
-
|
Decided just to drop the two tables and do
Does this give more info as to why initialization fails? |
Beta Was this translation helpful? Give feedback.
-
|
Maybe, but that goes above my database knowledge. Maybe @alexjustesen does have the magic tip here. |
Beta Was this translation helpful? Give feedback.
-
|
Just switched back to mariadb 10, as I read here the following: And now see the following as output of 'php artisan migrate:status':
So now there seems no issue in creating the users table. Will now check again with |
Beta Was this translation helpful? Give feedback.
-
|
Result of
So similar error, but now on table 'telescope_entries_tags'. |
Beta Was this translation helpful? Give feedback.
-
|
I suggest taking a back up of your results table, you can do this with DBeaver or another DB IDE. After that I would start over fresh with new volumes/drives and import your results back to the table once the new setup is running. Seems something went wrong during all the migrations/switching of containers and it's going to be pretty hard for us to track down. |
Beta Was this translation helpful? Give feedback.
-
Hello @alexjustesen, I get the impression you think I had a previously working speedtest-tracker container. This is not the case. I am trying to do a clean/new install, as I have not used speedtest-tracker before. So totally new mariadb database with clean config share and recreated speedtest-tracker container. |
Beta Was this translation helpful? Give feedback.
-
|
The way it was worded sounded like you had an existing instance working. That being said it sounds more like Speedtest Tracker can't access the database instance. Since you're connecting to the DB by it's host IP and port let's change a couple of things...
|
Beta Was this translation helpful? Give feedback.
-
|
@alexjustesen Actually, Speedtest Tracker can access the databaase as tables migrations, password_reset, telescope_entries and users are being created when connected to mariadb 10 (port 3007). Then the initialization aborts with the error mentioned in my initial comment. Anyhow, I added the environment parameter CACHE_STORE with session as value. Deleted and recreated the database. And recreated the container. Then get the following error:
Or did I interpret the session value to literally and you meant something else? |
Beta Was this translation helpful? Give feedback.
-
|
Sorry I meant |
Beta Was this translation helpful? Give feedback.
-
|
Sorry to say, but still no luck...
Still only tables migrations, password_reset, telescope_entries and users are being created. |
Beta Was this translation helpful? Give feedback.
-
|
Instead of Docker run, can you use composer and setup a new DB within the stack? I'm thinking there is some incompatibility with your existing instance. |
Beta Was this translation helpful? Give feedback.
-
|
Will use docker composer and will get back here with the outcome. |
Beta Was this translation helpful? Give feedback.
-
|
Tried the following docker composer. Took it from the docs.speedtest-tracker.dev site and modified it a bit.
But still have issues. [2025-09-02 20:26:28] production.ERROR: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'speedtesttracker.cache' doesn't exist (Connection: mariadb, SQL: select * from Did not have the time to do some more analysis. Will do that next week due to a short vacation. |
Beta Was this translation helpful? Give feedback.
-
|
Did some more analysis by adding a myphpadmin container.
Somehow, the mariadb database was not initialize at all. No table created. Then executed 'php artisan migrate' and immediately started initializing and created tables in the mariadb database. After that I could successfully start the Speedtest Tracker site. So the common behavior with my earlier attempt to get it working is that the initialization process does needs attention. Next step is doing the same with mariadb 10. To see if the issues I experienced is specifically with mariadb 10 in general or the specific implementation of mariadb10 on my qnap. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you Meridiumus. Your instructions got me running on my QNAP. |
Beta Was this translation helpful? Give feedback.
-
|
I just used same docker compose, but for MariaDB 10. And same issue as I had with the docker compose for MariaDB 11. But could not reproduce the issue with the MariaDB 10 app on QNAP. However then saw a difference in storage engine. Apparently, by default the storage engine is InnoDB with the MariaDB created containers. On the MariaDB 10 app on my QNAP, I noticed the default storage engine to be MyISAM. No idea why. I changed the default to InnoDB, and now could initialize the MariaDB database via 'php artisan migrate' and got the speedtest-tracker working using the MariaDB 10 app database on my QNAP. Hope this helps others. Still remains then, why tables are not initialized after running the docker compose as displayed above (Sep 13). |
Beta Was this translation helpful? Give feedback.
-
|
I'm going to move this over to a discussion, as far as we can tell it's nothing specific with Speedtest Tracker so hopefully someone in the community can help. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-work
Description
During a clean install and first initialization of the mysql database, the process ends in errors.
[2025-08-18 16:09:14] production.ERROR: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'speedtest_tracker.cache' doesn't exist (Connection: mariadb, SQL: select * fromcachewherekeyin (laravel_cache_illuminate:queue:restart)) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'speedtest_tracker.cache' doesn't exist (Connection: mariadb, SQL: select * fromcachewherekeyin (laravel_cache_illuminate:queue:restart)) at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:824)Seems not to be a database connection issue, as during initialization some tables are created. The following tables are created: migrations, password_reset, telescope_entries and users.
Also the config folder created for the container is populated.
I have used the app_debug, but does not seem to give any additional info.
Speedtest Tracker.pdf
Expected Behavior
A working speedtest tracker connected to the mariadb database.
Steps to Reproduce
Deployment Environment
Docker Run
Application Information
Creating the container on a QNAP NAS. mariadb is installed as app locally on the NAS. So not as a container. I have both mariadb 5 as mariadb 10 installed on the NAS and therefore the port is set to 3307 for mariadb 10.
What browser(s) are you seeing the problem on?
Both Chrome and Firefox
Logs
Beta Was this translation helpful? Give feedback.
All reactions