NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.34k stars 2.7k forks source link

[ERROR] Incorrect definition of table ... in log #3428

Open Apollon77 opened 10 months ago

Apollon77 commented 10 months ago

Checklist

Describe the bug I restarted my host today and looked at the nginx-proxy-manager logs just to see if all is good ... I saw several DB structure errors ...

Directly on DB start:

nginx-proxy-manager-db-1   | 2024-01-04 13:15:47 0 [ERROR] Incorrect definition of table mysql.event: expected column 'definer' at position 3 to have type varchar(, found type char(141).
nginx-proxy-manager-db-1   | 2024-01-04 13:15:47 0 [ERROR] mysqld: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
nginx-proxy-manager-db-1   | 2024-01-04 13:15:47 0 [Note] /usr/bin/mysqld: ready for connections.

And a bit later after NPM was also started:

nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [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').
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [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').
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
nginx-proxy-manager-app-1  | [1/4/2024] [1:17:00 PM] [Migrate  ] › ℹ  info      Current database version: 20211108145214
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [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').
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [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').
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [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').
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [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').
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [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').
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [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').
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [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').
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [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').
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [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').
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [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').
nginx-proxy-manager-db-1   | 2024-01-04 13:17:00 3 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
...

Nginx Proxy Manager Version v2.10.4

To Reproduce I just started it :-)

Expected behavior No errors?

Operating System Ubuntu 22.04 in an Proxmox LXC container

tilalx commented 10 months ago

Hello,

I experienced a similar issue and resolved it by following these steps. First, back up the database. Then, if you're using MariaDB/MySQL within a Docker container, perform an upgrade of the database. You can do this using the following command: backup the db and then upgrade db via if mariadb/mysql is in docker container:

docker exec -it nginx-proxy-manager-db mysql_upgrade -u root -p npm

This command executes within the Docker container to upgrade the database.

Apollon77 commented 10 months ago

I do not usean explicit DB .. so the default docker-compose setup ... should be sqlite then right?

tilalx commented 10 months ago

Can you post your docker compose?

Apollon77 commented 10 months ago

ooohhh ... iinteresting ... sorry I was wring .,.. seems I have mysql ... uups :-) Completely forgot that

version: "3"
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      # Public HTTP Port:
      - '80:80'
      # Public HTTPS Port:
      - '443:443'
      # Admin Web Port:
      - '81:81'
      # Add any other Stream port you want to expose
      # - '21:21' # FTP
    environment:
      # These are the settings to access your db
      DB_MYSQL_HOST: "db"
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: "npm"
      DB_MYSQL_PASSWORD: "npm"
      DB_MYSQL_NAME: "npm"
      # If you would rather use Sqlite uncomment this
      # and remove all DB_MYSQL_* lines above
      # DB_SQLITE_FILE: "/data/database.sqlite"
      # Uncomment this if IPv6 is not enabled on your host
      # DISABLE_IPV6: 'true'
    volumes:
      - ./data/app:/data
      - ./letsencrypt:/etc/letsencrypt
      - ./logrotated.conf:/etc/logrotate.d/nginx-proxy-manager
    depends_on:
      - db
  db:
    image: 'jc21/mariadb-aria:latest'
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'
    volumes:
      - ./data/mysql:/var/lib/mysql

will try your idea now (soon) - in the morning with not that much traffic

github-actions[bot] commented 2 months ago

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