[GH-ISSUE #4448] Number of Hosts are not displayed in dashboard when mariadb backend is used #2847

Open
opened 2026-02-26 07:36:58 +03:00 by kerem · 7 comments
Owner

Originally created by @targetingsnake on GitHub (Mar 23, 2025).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4448

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

Originally created by @targetingsnake on GitHub (Mar 23, 2025). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4448 **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](https://github.com/user-attachments/assets/5f521131-ec36-415d-a5b7-cdedf179a275) **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 <host-port>:<container-port> - '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
Author
Owner

@targetingsnake commented on GitHub (Mar 23, 2025):

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
<!-- gh-comment-id:2746140098 --> @targetingsnake commented on GitHub (Mar 23, 2025): 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 ```
Author
Owner

@jc21 commented on GitHub (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.

<!-- gh-comment-id:2746850699 --> @jc21 commented on GitHub (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.
Author
Owner

@jc21 commented on GitHub (Mar 24, 2025):

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

<!-- gh-comment-id:2746904146 --> @jc21 commented on GitHub (Mar 24, 2025): I've added a [test for this to the suite](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/5e66d677f1402b0414ae07124ad810fbc12c36ec) and it's passing.
Author
Owner

@targetingsnake commented on GitHub (Mar 24, 2025):

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

<!-- gh-comment-id:2748061892 --> @targetingsnake commented on GitHub (Mar 24, 2025): 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](https://github.com/user-attachments/assets/63ced3ad-24d6-40b1-8cc2-d3374575f182) 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
Author
Owner

@github-actions[bot] commented on GitHub (Sep 23, 2025):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:3322113189 --> @github-actions[bot] commented on GitHub (Sep 23, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@scharez commented on GitHub (Feb 6, 2026):

Hi @targetingsnake I am having the same problem on two npm instances. Are your steps to solve this issue still valid with the newer versions of npm?

2026-02-06  7:39:20 4 [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').

2026-02-06  7:39:20 4 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
<!-- gh-comment-id:3858573557 --> @scharez commented on GitHub (Feb 6, 2026): Hi @targetingsnake I am having the same problem on two npm instances. Are your steps to solve this issue still valid with the newer versions of npm? ``` 2026-02-06 7:39:20 4 [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'). 2026-02-06 7:39:20 4 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255). ```
Author
Owner

@targetingsnake commented on GitHub (Feb 6, 2026):

@scharez I can't tell you, i didn't ran in this issue again. Also i'm thinking about to migrate the schema with all the data onto my central mariadb host.

<!-- gh-comment-id:3861009158 --> @targetingsnake commented on GitHub (Feb 6, 2026): @scharez I can't tell you, i didn't ran in this issue again. Also i'm thinking about to migrate the schema with all the data onto my central mariadb host.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2847
No description provided.