[Support] devzwf - Speedtest-tracker


Recommended Posts

On 9/15/2023 at 6:43 PM, Emphatic6264 said:

I'm trying to add mail server settings for notifications, but I cannot find the .env file to update - does it exist? When I look in the Unraid file manager I can see a .env in the appdata folder with my db-sqlite, but if I try and download it to edit it says it does not exist. If I FTP in, only the db is seen.

 

I'm sure I am doing something daft, but what is it?

 

Thanks

No-one else has this issue? I feel I must be doing something wrong. @ZappyZap are you able to give a steer?

 

I have had an otherwise working setup posting to influxDB since may, so I am reluctant to go poking about randomly and then break something!

 

Thanks 🙂

Edited by Emphatic6264
Link to comment

I've had this docker up and running for a while now and I'm surprised how variable my connection speeds are and I'd like to raise this with my service provider. To support this, I'd like to be able to export the data to a .csv and I note in the github documentation that this is available. Can someone give me a step by step guide to set this up? I have the basic install (sqlite)

Edited by Boyturtle
Link to comment

Probably easier to just go old school and take a photo or screenshot and email the ISP that as will be inline in the email form. (it's got to be pretty retard friendly for the initial customer support officer until it reaches a tech)

 

I'm on fibre and speeds hardly change now whereas before on copper it would move around a fair bit. So have relaxed tests to once a day at 8am as a fault test really.

Edited by dopeytree
Link to comment
  • 2 weeks later...
On 9/16/2023 at 3:43 AM, Emphatic6264 said:

I'm trying to add mail server settings for notifications, but I cannot find the .env file to update - does it exist? When I look in the Unraid file manager I can see a .env in the appdata folder with my db-sqlite, but if I try and download it to edit it says it does not exist. If I FTP in, only the db is seen.

 

I'm sure I am doing something daft, but what is it?

 

Thanks

 

Always try to familiarise yourself with project resources as much as possible when launching projects within your environment. 

Following the speedtest-tracker GitHub through to their Documentation page reveals the email environment variables needed.

 

Quote

To configure the mail server settings you'll need to update the following variables in your .env file or add them to the environment variables passed into the container.

 

Which can be attributed via "Add another Path, Port, Variable, Label or Device" in your container configuration settings:

 

529392522_Screenshotfrom2023-10-0519-04-07.png.fb793e2765f4735ffe8eee0d86f1806b.png

  • Like 1
Link to comment

I don't have any database running on UnRaid now.

 

Can someone give a quick "do this, then this" to get Speedtest Tracker to run again.

 

I have completely removed the version that was working using sqllite.

 

I prefer mySQL/MariaDB.  I worked with it some many, many moons ago.

 

Thanks

 

Link to comment
1 hour ago, DWomack said:

I don't have any database running on UnRaid now.

 

Can someone give a quick "do this, then this" to get Speedtest Tracker to run again.

 

I have completely removed the version that was working using sqllite.

 

I prefer mySQL/MariaDB.  I worked with it some many, many moons ago.

 

Thanks

 

 

Hey I'm with you.

I tried going over the wiki/guide but it's confusing to say the least.

 

Went from working right out of the box to complicated to get running again. 

Link to comment

EDIT:

I missread your post an thought you weren't able to set the new variable but that is not the case. I will leave my response here for others who might need it.

I am using InfluxDB as Database, because I had it already installed.

 

Hey,

just follow the directions for Docker Containers on the linked page:

  1. Open the CLI of the Speedtest Docker container
  2. Run
    php artisan key:generate --show

     

    1. This will create a key starting with base64:
  3. Add the generated string to your environment variables attached to APP_KEY=generatedstringgoeshere (paste the key including the 'base64:' in the beginning)
  4. Restart the container

For Step 3 I added an additional variable in the speedtesttracker config:

Add another Path, Port, Variable, Label or Device -> config type: Variable

 

Or you reinstall the Container because @ZappyZap added the variable already.

 

Cheers

Edited by Kiwih
  • Thanks 1
Link to comment

Hi there,

 

I noticed my speedtest container wasn't working anymore and saw there's been some changes.

Namely, no more sqlite support. I've deleted the old container and installed the new one (to bring in the new container mappings) and added the details to point it to my existing mariaDB instance, but I'm getting the following issue.

It seems the container is using a completing different IP address to reach my DB than I've specified.

My key: DB_HOST

Value: 192.168.70.9

 

I see the following in the log.

I'm not sure where it's getting 172.19.0.1 from.


```

In Connection.php line 801:
                                                                               
  SQLSTATE[HY000] [1045] Access denied for user 'speedtest'@'172.19.0.1' (usi  
  ng password: YES) (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] [1045] Access denied for user 'speedtest'@'172.19.0.1' (usi  
  ng password: YES)    ````
 

Link to comment
  • 2 weeks later...
  • 3 weeks later...
On 10/9/2023 at 6:49 PM, Kiwih said:

EDIT:

I missread your post an thought you weren't able to set the new variable but that is not the case. I will leave my response here for others who might need it.

I am using InfluxDB as Database, because I had it already installed.

 

Hey,

just follow the directions for Docker Containers on the linked page:

  1. Open the CLI of the Speedtest Docker container
  2. Run
    php artisan key:generate --show

     

    1. This will create a key starting with base64:
  3. Add the generated string to your environment variables attached to APP_KEY=generatedstringgoeshere (paste the key including the 'base64:' in the beginning)
  4. Restart the container

For Step 3 I added an additional variable in the speedtesttracker config:

Add another Path, Port, Variable, Label or Device -> config type: Variable

 

Or you reinstall the Container because @ZappyZap added the variable already.

 

Cheers

 

Hi

 

Can you clarify where I should add the additions as I've tried a few different things but I'm still getting the 500 SERVER ERROR message. I have got the string using the 'php artisan key:generate --show' command, I'm just not sure where I should enter it in the fields below:

 

image.png.dfed11e9a1f9575b6b5cbbc289877fc8.png

Edited by takkischitt
Link to comment

I did a fresh install, GUI won't come up says ERR_CONNECTION_REFUSED.  My problem is right now I can't run php artisan key:generate --show becuase when I go to run the CLI for the docker, the CLI comes up and goes away immediately, so i can't even run any commands.  Where is the key stored at?  Hoping I could try to ssh into unraid and grab it that way maybe?  Not sure what else to do.

Link to comment

unless i misunderstand your issue :

"Key used to encrypt and decrypt data. To create your own key to persist run php artisan key:generate --show from within the running container. Currently not used and generated at random on startup of the container."

 

what your log is saying ?

Edited by ZappyZap
Link to comment

Log below.  Again I can't run the php command because when I open the CLI for the speedtest docker in unraid it open and closes immediately so i don't even get the chance to run any commands.

 


[2023-11-15 16:23:00] production.ERROR: SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: select * from information_schema.tables where table_schema = speedtest_tracker and table_name = migrations and table_type = 'BASE TABLE') {"exception":"[object] (Illuminate\\Database\\QueryException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: select * from information_schema.tables where table_schema = speedtest_tracker and table_name = migrations and table_type = 'BASE TABLE') at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:822)
[stacktrace]
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(976): Illuminate\\Database\\Connection->runQueryCallback()
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(955): Illuminate\\Database\\Connection->tryAgainIfCausedByLostConnection()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(778): Illuminate\\Database\\Connection->handleQueryException()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(407): Illuminate\\Database\\Connection->run()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(394): Illuminate\\Database\\Connection->select()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php(43): Illuminate\\Database\\Connection->selectFromWriteConnection()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php(184): Illuminate\\Database\\Schema\\MySqlBuilder->hasTable()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(700): Illuminate\\Database\\Migrations\\DatabaseMigrationRepository->repositoryExists()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(140): Illuminate\\Database\\Migrations\\Migrator->repositoryExists()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(248): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(140): retry()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(116): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->repositoryExists()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(84): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->prepareDatabase()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(83): Illuminate\\Database\\Migrations\\Migrator->usingConnection()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->handle()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call()
#21 /var/www/html/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run()
#23 /var/www/html/vendor/symfony/console/Application.php(1081): Illuminate\\Console\\Command->run()
#24 /var/www/html/vendor/symfony/console/Application.php(320): Symfony\\Component\\Console\\Application->doRunCommand()
#25 /var/www/html/vendor/symfony/console/Application.php(174): Symfony\\Component\\Console\\Application->doRun()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run()
#27 /var/www/html/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#28 {main}

[previous exception] [object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:65)
[stacktrace]
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(65): PDO->__construct()
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(83): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(48): Illuminate\\Database\\Connectors\\Connector->tryAgainIfCausedByLostConnection()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(184): Illuminate\\Database\\Connectors\\MySqlConnector->connect()
#5 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1319): call_user_func()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(521): Illuminate\\Database\\Connection->getPdo()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(416): Illuminate\\Database\\Connection->getPdoForSelect()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(809): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(976): Illuminate\\Database\\Connection->runQueryCallback()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(955): Illuminate\\Database\\Connection->tryAgainIfCausedByLostConnection()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(778): Illuminate\\Database\\Connection->handleQueryException()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(407): Illuminate\\Database\\Connection->run()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(394): Illuminate\\Database\\Connection->select()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php(43): Illuminate\\Database\\Connection->selectFromWriteConnection()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php(184): Illuminate\\Database\\Schema\\MySqlBuilder->hasTable()
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(700): Illuminate\\Database\\Migrations\\DatabaseMigrationRepository->repositoryExists()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(140): Illuminate\\Database\\Migrations\\Migrator->repositoryExists()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(248): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(140): retry()
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(116): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->repositoryExists()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(84): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->prepareDatabase()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(83): Illuminate\\Database\\Migrations\\Migrator->usingConnection()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->handle()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call()
#31 /var/www/html/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute()
#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run()
#33 /var/www/html/vendor/symfony/console/Application.php(1081): Illuminate\\Console\\Command->run()
#34 /var/www/html/vendor/symfony/console/Application.php(320): Symfony\\Component\\Console\\Application->doRunCommand()
#35 /var/www/html/vendor/symfony/console/Application.php(174): Symfony\\Component\\Console\\Application->doRun()
#36 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run()
#37 /var/www/html/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#38 {main}
"} 
s6-rc: warning: unable to start service laravel-automations: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
prog: fatal: stopping the container.

In Connection.php line 822:
                                                                               
  SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: s  
  elect * from information_schema.tables where table_schema = speedtest_track  
  er and table_name = migrations and table_type = 'BASE TABLE')                
                                                                               

In Connector.php line 65:
                                                    
  SQLSTATE[HY000] [2002] No such file or directory  

Link to comment

yes should have
but in your log  :
 

Quote

SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: s  
  elect * from information_schema.tables where table_schema = speedtest_track  
  er and table_name = migrations and table_type = 'BASE TABLE')   

Check also your mysql/mariadb host ....

 

Edited by ZappyZap
Link to comment

Ok I think I'm close, this is where I'm at now:

 

--------------------------------------------------------------------

 _______                       __ __                __
|     __|.-----.-----.-----.--|  |  |_.-----.-----.|  |_
|__     ||  _  |  -__|  -__|  _  |   _|  -__|__ --||   _|
|_______||   __|_____|_____|_____|____|_____|_____||____|
         |__|
 _______                   __
|_     _|.----.---.-.----.|  |--.-----.----.
  |   |  |   _|  _  |  __||    <|  -__|   _|
  |___|  |__| |___._|____||__|__|_____|__|


--------------------------------------------------------------------

To support Speedtest Tracker visit:
https://github.com/alexjustesen/speedtest-tracker
-------------------------------------
GID/UID
-------------------------------------

User uid:    1000
User gid:    1000
-------------------------------------

🔒 SSL_MODE has been set to MIXED, setting the web server to work in HTTP + HTTPS...

🐇  Configuring Speedtest Tracker...

🔒  Fixing app path file permissions...
 Permissions fixed.

🧹  Clearing any previous caches...

In Application.php line 849:
                                                                        
  Class "Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider" not found  

Edited by SleeperCell
Link to comment

After adding the `APP_KEY` variable, I'm getting conflicting messages in the logs:

 

  An application key exists.

 

AND 

 

[2023-11-17 12:59:53] production.ERROR: No application encryption key has been specified. {"exception":"[object]

 

Anyone else?

 

Full log:

🔗  Creating symlinks for config and log files...
  Symlinks created.

  An application key exists.

💰  Building the cache...
  Cache set.

🚛  Migrating the database...
  Database migrated.

  All set, Speedtest Tracker started.

[17-Nov-2023 07:58:38] NOTICE: fpm is running, pid 115
[17-Nov-2023 07:58:38] NOTICE: ready to handle connections
[17-Nov-2023 07:58:38] NOTICE: systemd monitor interval set to 10000ms
[2023-11-17 12:59:53] production.ERROR: No application encryption key has been specified. {"exception":"[object] (Illuminate\\Encryption\\MissingAppKeyException(code: 0): No application encryption key has been specified. at /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:79)
[stacktrace]

 

Edited by johnny2678
formatting
Link to comment
On 11/17/2023 at 8:02 AM, johnny2678 said:

After adding the `APP_KEY` variable, I'm getting conflicting messages in the logs:

 

  An application key exists.

 

AND 

 

[2023-11-17 12:59:53] production.ERROR: No application encryption key has been specified. {"exception":"[object]

 

Anyone else?

 

Full log:

🔗  Creating symlinks for config and log files...
  Symlinks created.

  An application key exists.

💰  Building the cache...
  Cache set.

🚛  Migrating the database...
  Database migrated.

  All set, Speedtest Tracker started.

[17-Nov-2023 07:58:38] NOTICE: fpm is running, pid 115
[17-Nov-2023 07:58:38] NOTICE: ready to handle connections
[17-Nov-2023 07:58:38] NOTICE: systemd monitor interval set to 10000ms
[2023-11-17 12:59:53] production.ERROR: No application encryption key has been specified. {"exception":"[object] (Illuminate\\Encryption\\MissingAppKeyException(code: 0): No application encryption key has been specified. at /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:79)
[stacktrace]

 

Dev here... this is likely a collision between the `.env` file that gets created in the `/config` directory and any variable passed in the UI.

 

Working on a fix for this in the next release, follow along here: https://github.com/alexjustesen/speedtest-tracker

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.