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

Number of Hosts are not displayed in dashboard when mariadb backend is used #4448

Open
targetingsnake opened this issue Mar 23, 2025 · 4 comments
Labels

Comments

@targetingsnake
Copy link

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
Numbers of Hosts are not displayed in Dashboard. See screenshot below. Instance is running with the mysql-backend. On another instance with the sqlite-database the issue is not there.

There is a HTTP-500-Error in API-Endpoint api/reports/hosts .

Nginx Proxy Manager Version
v2.12.3

To Reproduce
Steps to reproduce the behavior:

  1. Login
  2. Look at Dashboard

Expected behavior
Number of hosts in each category is displayed.

Screenshots
Image

Operating System
VM with Debian and docker ($hostname is the hostname of the vm, removed for security reasons)
uname -a : Linux $hostname 6.1.0-31-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.128-1 (2025-02-07) x86_64 GNU/Linux
Docker-version: Docker version 28.0.1, build 068a01e

Additional context
Docker-Compose content:

services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format :
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP
environment:
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: $dbport
DB_MYSQL_USER: "$username"
DB_MYSQL_PASSWORD: "$password"
DB_MYSQL_NAME: "$dbname"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db

db:
image: 'jc21/mariadb-aria:latest'
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: '$root_password'
MYSQL_DATABASE: '$dbname'
MYSQL_USER: '$username'
MYSQL_PASSWORD: '$password'
MARIADB_AUTO_UPGRADE: '1'
volumes:
- ./data/mysql:/var/lib/mysql

@targetingsnake
Copy link
Author

Logs saying this:

db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').
db-1   | 2025-03-23 10:41:25 14 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
db-1   | 2025-03-23 10:41:25 12 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').
db-1   | 2025-03-23 10:41:25 12 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
db-1   | 2025-03-23 10:41:25 13 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').
db-1   | 2025-03-23 10:41:25 13 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
app-1  | [3/23/2025] [10:41:25 AM] [Express  ] › ⚠  warning   select count(`id`) as `count` from `stream` where `is_deleted` = 0 and `owner_user_id` = 1 - Table 'npm.stream' doesn't exist

@jc21
Copy link
Member

jc21 commented Mar 24, 2025

Why wouldn't the stream table exist? There are 4 db migrations that create/alter it, so the app shouldn't have started when that table didn't exist.

@jc21
Copy link
Member

jc21 commented Mar 24, 2025

I've added a test for this to the suite and it's passing.

@targetingsnake
Copy link
Author

i looked into it more detailed today. it turned out, that i also couldn't create the table as it was already there according to phpmyAdmin / the maria-db server. So i looked into the filesystem and found wrong file permissions on the files for those (see
Screenshot below ).

Image

Way to solve:

  1. move mariadb files from old location ./data/mysql to ./mysql with cp -aRv /data/mysql ./mysql after mkdir ./mysql
  2. fix filepermissions on corrupted files with chmod -Rv 777 $tablename.* (replace $tablename with the required tablename)

@jc21 i think issue can be marked as resolved if that's fine with you

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

No branches or pull requests

2 participants