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, versions after v0.11.17 dont work #895

Closed
y0nei opened this issue Nov 10, 2023 · 14 comments
Closed

500 server error, versions after v0.11.17 dont work #895

y0nei opened this issue Nov 10, 2023 · 14 comments

Comments

@y0nei
Copy link

y0nei commented Nov 10, 2023

Describe the bug
Nothing much to say, v0.11.17 is the latest version that works, latest (v0.13.1) and versions prior to that just refuse to work properly and throw empty error logs, then freeze and give a 500 error on the UI.

Error log:

speedtest-tracker     | ❌ There seems to be a failure in checking the web server + PHP-FPM. Here's the response:

docker-compose.yml:

services:
  speedtest-tracker:
    # New releases cause problems, v0.11.17 is stable
    #image: "ghcr.io/alexjustesen/speedtest-tracker:v0.11.17"
    image: "ghcr.io/alexjustesen/speedtest-tracker:v0.13.1"
    container_name: speedtest-tracker
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000
      - DB_CONNECTION=mysql
      - DB_HOST=db
      - DB_PORT=3306
      - DB_DATABASE=speedtest_tracker
      - DB_USERNAME=${DB_USER}
      - DB_PASSWORD=${DB_PASS}
      - TZ=Europe/Warsaw
    ports:
      - "8300:80"
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "./config:/config"
      - "./web:/etc/ssl/web"
    depends_on:
      - db

  db:
    image: mariadb:10
    container_name: speedtest-tracker_db
    restart: always
    expose:
      - 3306
    environment:
      - MARIADB_DATABASE=speedtest_tracker
      - MARIADB_USER=${DB_USER}
      - MARIADB_PASSWORD=${DB_PASS}
      - MARIADB_RANDOM_ROOT_PASSWORD=true
    volumes:
      - speedtest-db:/var/lib/mysql

volumes:
  speedtest-db:
    name: "speedtest-db"

networks:
  default:
    name: "speedtest"
@y0nei y0nei changed the title 500 server error, app not working after update 500 server error, versions after v0.11.17 dont work Nov 10, 2023
@bam7
Copy link

bam7 commented Nov 10, 2023

Confirmed - I see the same behavior, I posted in #893

@alexjustesen
Copy link
Owner

Since you're specifying your environment variables in your docker-compose.yml file make sure you remove .env from your mounted volume if it exists.

I also don't see an APP_KEY in your config so you'll want to add that.

@KGBist2000
Copy link

KGBist2000 commented Nov 12, 2023

I have the same issue

version: '3.3' services: speedtest-tracker: container_name: speedtest-tracker ports: #- '8080:80' - '5443:443' environment: - PUID=1000 - PGID=1000 - DB_CONNECTION=mysql - DB_HOST=db - DB_PORT=3306 - DB_DATABASE=speedtest_tracker - DB_USERNAME=speedy - DB_PASSWORD=password - TZ=Europe/Berlin - TELEGRAM_BOT_TOKEN=Replaced:Replaced volumes: - '/etc/localtime:/etc/localtime:ro' - '/root/speedtest_tracker/config:/config' - '/root/speedtest_tracker/web:/etc/ssl/web' image: 'ghcr.io/alexjustesen/speedtest-tracker:latest' restart: unless-stopped depends_on: - db db: image: mariadb:10 restart: always environment: - MARIADB_DATABASE=speedtest_tracker - MARIADB_USER=speedy - MARIADB_PASSWORD=password - MARIADB_RANDOM_ROOT_PASSWORD=true volumes: - /root/speedtest_tracker/mariadb:/var/lib/mysql

Logs:
Clearing any previous caches...

[2023-11-12 20:55:48] production.ERROR: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'speedtest_tracker.cache' doesn't exist (Connection: mysql, SQL: delete from cache) {"exception":"[object] (Illuminate\Database\QueryException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'speedtest_tracker.cache' doesn't exist (Connection: mysql, SQL: delete from cache) at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:822)

�������
[stacktrace]

prog: fatal: stopping the container.

@itzik1058
Copy link

Had the same error (using the docker compose), I set the APP_KEY using php artisan key:generate --show and it worked.
It says in the documentation that the key should be generated automatically but it doesn't look like it.

@KGBist2000
Copy link

Had the same error (using the docker compose), I set the APP_KEY using php artisan key:generate --show and it worked. It says in the documentation that the key should be generated automatically but it doesn't look like it.

Thank you, i done it.

With Version v0.11.17, no issues. With he latest Version its not working.

🔒 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...

✅ Cache cleared.

✅ Environment file exists.

🔗 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.

[12-Nov-2023 21:20:24] NOTICE: fpm is running, pid 123

[12-Nov-2023 21:20:24] NOTICE: ready to handle connections

[12-Nov-2023 21:20:24] NOTICE: systemd monitor interval set to 10000ms

[2023-11-12 21:20:31] 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]

@y0nei
Copy link
Author

y0nei commented Nov 12, 2023

Since you're specifying your environment variables in your docker-compose.yml file make sure you remove .env from your mounted volume if it exists.

I also don't see an APP_KEY in your config so you'll want to add that.

the .env file is only used for docker compose variables, I don't mount that file as a volume

@KGBist2000
Copy link

KGBist2000 commented Nov 12, 2023

The *.env file is deleted already.
here the latest version of the docker-compose file from portainer.

API_KEY was generated by docker exec speedtest-tracker php artisan key:generate --show

version: '3.3'
services:
speedtest-tracker:
container_name: speedtest-tracker
ports:
#- '8080:80'
- '5443:443'
environment:
- PUID=1000
- PGID=1000
- DB_CONNECTION=mysql
- DB_HOST=db
- DB_PORT=3306
- DB_DATABASE=speedtest_tracker
- DB_USERNAME=speedy
- DB_PASSWORD=password
- TZ=Europe/Berlin
- TELEGRAM_BOT_TOKEN=Replaced:Replaced
- API_KEY=base64:XLBVEvy2wHbwEMEJuwh94r9hCB7YKAW1T5xfJBPA8a0=
volumes:
- '/etc/localtime:/etc/localtime:ro'
- '/root/speedtest_tracker/config:/config'
- '/root/speedtest_tracker/web:/etc/ssl/web'
image: 'ghcr.io/alexjustesen/speedtest-tracker:latest
restart: unless-stopped
depends_on:
- db
db:
image: mariadb:10
restart: always
environment:
- MARIADB_DATABASE=speedtest_tracker
- MARIADB_USER=speedy
- MARIADB_PASSWORD=password
- MARIADB_RANDOM_ROOT_PASSWORD=true
volumes:
- /root/speedtest_tracker/mariadb:/var/lib/mysql

@epiclulz666
Copy link

yeah broken for me too using it via docker on a unraid server. 500 server error

@Milkysunshine
Copy link

The *.env file is deleted already. here the latest version of the docker-compose file from portainer.

API_KEY was generated by docker exec speedtest-tracker php artisan key:generate --show

API_KEY=base64:XLBVEvy2wHbwEMEJuwh94r9hCB7YKAW1T5xfJBPA8a0=

You have API_KEY not APP_KEY

@alexjustesen
Copy link
Owner

You have API_KEY not APP_KEY

☝️ this, going to close this issue. If the APP_KEY update doesn't work feel free to open a new issue and reference this one.

@yllekz
Copy link

yllekz commented Nov 28, 2023

Hi folks, I'm wresting with a similar issue. I'm not clear on what the fix is based on the above comments. Is there official documentation on this? My container was working then suddenly started erroring out with this encryption key error out of nowhere. The default docker compose yml reference file in this repo doesn't mention this.

If there was a breaking change, it needs to be more up front for folks who have run this container for a long time.

@bam7
Copy link

bam7 commented Nov 28, 2023

Yeah, it's stated that the API key format is the root of these problems, but I had all that correct and it didn't help. The only way I could make the container work was a total redo with all config and database cleared out and a fresh install. I saved all my old data with the hope to import my history back in but it's becoming less likely the more I look at it.

@Milkysunshine
Copy link

it's stated that the API key format is the root of these problems

Again, APP_KEY, NOT API

@Milkysunshine
Copy link

Hi folks, I'm wresting with a similar issue. I'm not clear on what the fix is based on the above comments. Is there official documentation on this? My container was working then suddenly started erroring out with this encryption key error out of nowhere. The default docker compose yml reference file in this repo doesn't mention this.

If there was a breaking change, it needs to be more up front for folks who have run this container for a long time.

run this command and get the APP_KEY: docker exec speedtest-tracker php artisan key:generate --show

I use docker compose (stacks via portainer), so it is as easy as adding the APP_KEY to the environment variables.

Here's my entire docker compose: (Key Redacted)


version: '3.3'
services:
    speedtest-tracker:
        container_name: speedtest-tracker
        ports:
            - '8686:80'
            - '18443:443'
        environment:
            - PUID=1000
            - PGID=1000
            - TZ=America/New_York
            - APP_KEY=InsertTheGibberishThatTheCommandYouRanCrappedOut (Including the base64: prefix)
        volumes:
            - '/etc/localtime:/etc/localtime:ro'
            - '/docker/speedtest-tracker/config:/config'
            - '/docker/speedtest-tracker/web:/etc/ssl/web'
        image: 'ghcr.io/alexjustesen/speedtest-tracker:latest'
        restart: unless-stopped

I hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants