henrywhitaker3 / Speedtest-Tracker

Continuously track your internet speed
GNU General Public License v3.0
1.5k stars 122 forks source link

[BUG] sh: /config/www/app/Bin/speedtest: not found + No successfully speedtest result #855

Open tobidemski opened 2 years ago

tobidemski commented 2 years ago

Describe the bug Trying to start the docker image from the latest tag. Error "sh: /config/www/app/Bin/speedtest: not found" is shown in the container logs and no speedtest result is successful. Im running the app behind a nginx with nginx proxy manager.

Setup docker compose file: version: '3.3'

services: speedtest: container_name: speedtest image: henrywhitaker3/speedtest-tracker ports:

To Reproduce Steps to reproduce the behavior:

  1. Create a fresh new docker container from the latest speedtest image 1.1 Inspect container logs and see the error message (first time seen)
  2. Setup nginx proxy manager with host speedtest.domain.com to rewrite to 192.168.1.77:35080
  3. Open speedtest.domain.com and trigger a new test
  4. Inspect container logs and see the error appears again (sh: /config/www/app/Bin/speedtest: not found)

Expected behavior The error does not appear and a speedtest runs successfully.

Context

Edit: I think this problem is related to issue #727

Edit 2: How to fix / workaround this issue:

Step 1: https://github.com/henrywhitaker3/Speedtest-Tracker/issues/727#issuecomment-942637535 Step 2: Follow this: https://github.com/henrywhitaker3/Speedtest-Tracker/issues/733#issuecomment-938589083

In short:

  1. Download the missing speedtest file and place it in the following folder: \config\www\app\Bin 1.1 Download: wget https://install.speedtest.net/app/cli/ookla-speedtest-1.0.0-x86_64-linux.tgz -O speedtest.tgz 1.2 Extract tar zxvf speedtest.tgz
  2. Because of the missing file we have to accept the eula manually with the command "php /config/www/artisan speedtest:eula" inside of the running container
  3. Start a new speedtest: Result: successfully
tcaxle commented 2 years ago

I have the same issue. I tried your workaround but I am getting /config/www/app/Bin/speedtest: line 1: syntax error: unexpected ";"

wmar commented 2 years ago

I have same issue by using the https://mariushosting.com/how-to-install-speedtest-tracker-on-your-synology-nas/ to install this on my Synology nas with the same problem. How can I fix it?

tobidemski commented 2 years ago

Have you tried to extract the file "speedtest" from the https://install.speedtest.net/app/cli/ookla-speedtest-1.0.0-x86_64-linux.tgz tgz file? (This tgz is double zipped, so extract this and you will get a tar file - extract this again and you will get 3 files but you only need the speedtest file (without any extensions)) This file needs to be placed in your speedtest docker folder which you have mounted. Something like this should be your path: "/volume1/docker/speedtest/www/app/Bin" <-- place this "speedtest" file in this folder.

After that you have to login into your docker instance and call "php /config/www/artisan speedtest:eula" to accept the speedtest GDPR.

Thats all and after that it should work.

wmar commented 2 years ago

Work! Excellent

aaronspruit commented 2 years ago

FYI, I'd recommend NOT using the 1.0.0 version - especially if this docker image is running on Ubuntu 20.04 LTS. Quite awhile ago, it was showing my download speed as super inconsistent. I have a 940/940Mbps connection and while upload speeds were fine, downloads showed ~200-600Mbps and it was quite erratic. Needless to say I've spent a lot of time (and money) trying to figure out what was going on with my networking equipment.

Today I was poking around with it yet again, and was trying to find the dockerfile, etc. Needless to say, I went ahead and updated the speedtest cli to the latest version (1.1.1), and TADA, no more download issues. Simply use the same commands as above, but wget https://install.speedtest.net/app/cli/ookla-speedtest-1.1.1-linux-x86_64.tgz instead

The crazy thing is that using the installer sh script (and the other packages that uses...which is different than the tgz file) still shows the inconsistent download speeds with the latest version. Definitely pulling my hair out on this one.

akeschmidi commented 2 years ago

I found a solution for my problem and id works https://github.com/henrywhitaker3/Speedtest-Tracker/issues/421#issuecomment-989923605

JDMils commented 1 year ago

Thanks Stefan, the solution you quoted also worked for me!

johnnygoodface commented 1 year ago

@tobidemski

After that you have to login into your docker instance and call "php /config/www/artisan speedtest:eula" to accept the speedtest GDPR.

Sorry, but kinda new with Docker, how would someone "log into docker instance" and call the php command.... Thx

tobidemski commented 1 year ago

@tobidemski

After that you have to login into your docker instance and call "php /config/www/artisan speedtest:eula" to accept the speedtest GDPR.

Sorry, but kinda new with Docker, how would someone "log into docker instance" and call the php command.... Thx

Try to use the exec command: Example: docker exec -it CONTAINER_ID /bin/bash With this command you are connected to the container through bash and you can call the php command

johnnygoodface commented 1 year ago

@tobidemski Thx I've managed to log into my docker with sudo docker exec -it 491ec0fc9055 bash Now the weird stuff: I don't have a /volume1/docker/speedtest/config/www path but www and config are reversed: /volume1/docker/speedtest/www/config Screenshot 2022-11-20 at 11 12 48 AM But even when I tried this command with the adjusted path, it doesn't work: Screenshot 2022-11-20 at 11 14 32 AM

And in my terminal window, I always get this error Screenshot 2022-11-20 at 11 16 28 AM

tobidemski commented 1 year ago

You have to execute the command "php /config/www/artisan speedtest:eula" inside your container after you called "docker exec -it CONTAINER_ID /bin/bash". Inside your container you should be able to call php.

What do you mean with "/volume1/docker/speedtest/config/www"? This was my mounted volume from the host side, not container side. Just connect to your container and call the php command and you should good to go.

johnnygoodface commented 1 year ago

@tobidemski This is what I get: Screenshot 2022-11-20 at 11 42 58 AM FYI, this is the file structure of the speedtest container. As you can see, no /config/www/artisan folder, unless I'm completely mad ;) Screenshot 2022-11-20 at 11 44 28 AM

tobidemski commented 1 year ago

artisan is not a folder, its a file and its located under "/config/www" and NOT "/config/www/config"

tobidemski commented 1 year ago

Not sure if your container is fully functional because in my case its working as expected. image I just connected to the container and executed the command

tobidemski commented 1 year ago

My "/config/www" folder content: image

johnnygoodface commented 1 year ago

Almost there, but now, no "vendor" folder Screenshot 2022-11-20 at 11 58 19 AM

tobidemski commented 1 year ago

Maybe you should remove your container (not just stop - docker-compose down / up) and mapped volumes and start from scratch. Seems like your container is broken. And clean up your mounted volumes first before you remove and start your container again.

johnnygoodface commented 1 year ago

Ok I was planning on using Portainer to help me with the cleaning Thx for your time

tobidemski commented 1 year ago

No worries! Using portainer too with docker compose files to manage my containers. But for fast setups / test purposes a docker run command should do it too.,

johnnygoodface commented 1 year ago

Hi @tobidemski

I've uninstall the container with Portainer, deleted the Speedtest folder under /docker, restarted Docker. I've re-install using Marius Bogdan Lixandru's instructions: running the script in the task scheduler:

docker run -d --name=speedtest \ -p 8788:80 \ -v /volume1/docker/speedtest:/config \ -e PUID=1027 \ -e PGID=100 \ -e TZ=America/Montreal \ -e OOKLA_EULA_GDPR=true \ --restart always \ henrywhitaker3/speedtest-tracker

I still haven't got the vendor folder under /config/www, thus I get the same error running the "php /config/www/artisan speedtest:eula" command

Screenshot 2022-11-20 at 1 25 38 PM

and I still get this continuous error in Speedtest's terminal window:

Screenshot 2022-11-20 at 11 16 28 AM

tobidemski commented 1 year ago

Thats weird. I just spun up a test container and can find the vendor in my container. Maybe try without binding a volume and check the container again.

version: '3.3'

services:
  speedtest:
    container_name: speedtest-test
    image: henrywhitaker3/speedtest-tracker:latest
    restart: unless-stopped
    environment:
      - TZ=Europe/Berlin
      - PUID=1000
      - PGID=1000
      - OOKLA_EULA_GDPR=true
      - BASE_PATH=/
      - APP_URL=https://speedtest.xxxx.de

image

johnnygoodface commented 1 year ago

Without a mapped volume, still no vendor. I'm going back to the drawing board and will get back later Screenshot 2022-11-20 at 2 24 45 PM

tobidemski commented 1 year ago

Sorry not sure whats happening on your side and haven't a solution for it. Last try would be to try spinning up a container with the latest tag on the image "henrywhitaker3/speedtest-tracker:latest" instead of "henrywhitaker3/speedtest-tracker"

JDMils commented 1 year ago

As far as I know, if you have the line "OOKLA_EULA_GDPR=true" then when executed, this line accepts the Eula on your behalf. Is this not true? Sent on the go with Vodafone -------- Original message --------From: Tobi @.> Date: 21/11/22 6:01 am (GMT+10:00) To: henrywhitaker3/Speedtest-Tracker @.> Cc: JDMils @.>, Comment @.> Subject: Re: [henrywhitaker3/Speedtest-Tracker] [BUG] sh: /config/www/app/Bin/speedtest: not found + No successfully speedtest result (Issue #855) Thats weird. I just spun up a test container and can find the vendor in my container. Maybe try without binding a volume and check the container again. `version: '3.3' services: speedtest: container_name: speedtest-test image: henrywhitaker3/speedtest-tracker:latest restart: unless-stopped environment:

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

johnnygoodface commented 1 year ago

@tobidemski I finally found out the problem. After testing a new install on a VirtualDSM session (which worked very well by the way), and analyzing the Terminal output of the Docker container of my NAS (it showed packages that couldn't download), I figured that my Firewall was a bit too strong! Everything ran perfectly fine once I turned it off! So now I'm trying to figure out exactly what ports to open for Speedtest to work...