matomo-org / docker

Official Docker project for Matomo Analytics

Home Page:https://matomo.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

500: Internal Server Error (Yes i read other issues)

FuckingToasters opened this issue · comments

Hello, so here are the matomo logs:

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.26.0.10. Set the 'ServerName' directive globally to suppress this message

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.26.0.10. Set the 'ServerName' directive globally to suppress this message

[Fri Dec 01 07:59:24.160237 2023] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.57 (Debian) PHP/8.2.13 configured -- resuming normal operations

[Fri Dec 01 07:59:24.160673 2023] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
172.26.0.3 - - [01/Dec/2023:07:59:29 +0000] "GET / HTTP/1.1" 500 211 "-" "Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/119.0"

172.26.0.3 - - [01/Dec/2023:07:59:30 +0000] "GET / HTTP/1.1" 500 211 "-" "Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/119.0"
172.26.0.3 - - [01/Dec/2023:07:59:31 +0000] "GET / HTTP/1.1" 500 211 "-" "Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/119.0"
172.26.0.3 - - [01/Dec/2023:07:59:33 +0000] "GET / HTTP/1.1" 500 211 "-" "Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/119.0"

172.26.0.3 - - [01/Dec/2023:08:00:01 +0000] "GET / HTTP/1.1" 500 211 "-" "Uptime-Kuma/1.23.2"
172.26.0.3 - - [01/Dec/2023:08:01:01 +0000] "GET / HTTP/1.1" 500 211 "-" "Uptime-Kuma/1.23.2"
172.26.0.3 - - [01/Dec/2023:08:02:01 +0000] "GET / HTTP/1.1" 500 211 "-" "Uptime-Kuma/1.23.2"

Here the DB Logs:

[i] pre-init.d - processing /scripts/pre-init.d/01_secret-init.sh
[i] mysqld not found, creating....
[i] MySQL directory already present, skipping creation

2023-12-01  7:45:35 0 [Note] Starting MariaDB 10.11.5-MariaDB source revision 7875294b6b74b53dd3aaa723e6cc103d2bb47b2c as process 1
2023-12-01  7:45:35 0 [Note] Plugin 'InnoDB' is disabled.
2023-12-01  7:45:35 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-12-01  7:45:35 0 [Note] Server socket created on IP: '0.0.0.0'.
2023-12-01  7:45:35 0 [Note] Server socket created on IP: '::'.
2023-12-01  7:45:35 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1286: Unknown storage engine 'InnoDB'
2023-12-01  7:45:35 0 [Note] /usr/bin/mysqld: ready for connections.
Version: '10.11.5-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Alpine Linux
2023-12-01  7:46:05 0 [Note] /usr/bin/mysqld (initiated by: unknown): Normal shutdown
2023-12-01  7:46:05 0 [Note] /usr/bin/mysqld: Shutdown complete

[i] pre-init.d - processing /scripts/pre-init.d/01_secret-init.sh
[i] mysqld already present, skipping creation
[i] MySQL directory already present, skipping creation

2023-12-01  7:46:39 0 [Note] Starting MariaDB 10.11.5-MariaDB source revision 7875294b6b74b53dd3aaa723e6cc103d2bb47b2c as process 1
2023-12-01  7:46:39 0 [Note] Plugin 'InnoDB' is disabled.
2023-12-01  7:46:39 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-12-01  7:46:39 0 [Note] Server socket created on IP: '0.0.0.0'.
2023-12-01  7:46:39 0 [Note] Server socket created on IP: '::'.
2023-12-01  7:46:39 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1286: Unknown storage engine 'InnoDB'
2023-12-01  7:46:39 0 [Note] /usr/bin/mysqld: ready for connections.
Version: '10.11.5-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Alpine Linux

Now i found a simmilar issue on stackoverflow which did not got any response: https://stackoverflow.com/questions/67685989/matomo-docker-500-error-while-mounting-config-volume

Additionally, i found another GitHub Issue about it: #168

The solutions given in the other github issue however, don't resolve my issue. I ran it first with the logs iand config lines uncommented, after read the issue, i added the comments back and redeployed the image yet the issue kept being the same.

The Website produces a page with no content (fully blank)

Finally, here the docker-compose file i used:

version: '3.0'

services:
  matomo:
    image: matomo:latest
    command: apache2-foreground
    entrypoint: /entrypoint.sh
    environment:
      - APACHE_CONFDIR=/etc/apache2
      - APACHE_ENVVARS=/etc/apache2/envvars
      - GPG_KEYS=528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544 F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD
      - MATOMO_DATABASE_ADAPTER=MYSQLI
      - MATOMO_DATABASE_CHARSET=utf8mb4
      - MATOMO_DATABASE_CONNECT_TIMEOUT=60
      - MATOMO_DATABASE_DBNAME=matomo
      - MATOMO_DATABASE_ENABLE_SSL=0
      - MATOMO_DATABASE_HOST=db
      - MATOMO_DATABASE_PASSWORD=REDACTED
      - MATOMO_DATABASE_PORT=3306
      - MATOMO_DATABASE_TABLES_PREFIX=matomo_
      - MATOMO_DATABASE_USERNAME=InfinityMonster
    volumes:
       # - ./config:/var/www/html/config:z
       # - ./logs:/var/www/html/logs:z
      - matomo:/var/www/html:z
    restart: always
    networks:
      webproxy:
        ipv4_address: 172.26.0.10

  db:
    image: jc21/mariadb-aria:latest
    command: null
    entrypoint: /scripts/run.sh
    environment:
      - MYSQL_DATABASE=matomo
      - MYSQL_PASSWORD=REDACTED
      - MYSQL_ROOT_PASSWORD=REDACTED
      - MYSQL_USER=InfinityMonster
    volumes:
      - db:/var/lib/mysql:Z
    networks:
      webproxy:
        ipv4_address: 172.26.0.202

networks:
  webproxy:
    external: true

volumes:
  db:
  matomo:

update:
I seem to have solved this issue mentioned above by changing the volume from matomo aka matomo_matomo to data aka matomo_data