[GH-ISSUE #2148] Database / Migration update failed on new docker instance #1537

Closed
opened 2026-02-26 07:31:28 +03:00 by kerem · 2 comments
Owner

Originally created by @rmiddle on GitHub (Jul 8, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2148

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

Fresh installation on mysql results in an error.

Nginx Proxy Manager Version

v2.9.18

To Reproduce
Steps to reproduce the behavior:
Install docker instance with a config file pointing at mysql.

From the
❯ Enabling IPV6 in hosts: /data/nginx
[7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info Current database version: none
[7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] Migrating Up...
[7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] auth Table created
[7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] user Table created
[7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] user_permission Table created
[7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] proxy_host Table created
[7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] redirection_host Table created
[7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] dead_host Table created
[7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] stream Table created
[7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] access_list Table created
[7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] certificate Table created
[7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] access_list_auth Table created
migration file "20180618015850_initial.js" failed
migration failed with error: create table audit_log (id int unsigned not null auto_increment primary key, created_on datetime not null, modified_on datetime not null, user_id int unsigned not null, object_type varchar(255) not null default '', object_id int unsigned not null default '0', action varchar(255) not null, meta json not null) - Connection lost: The server closed the connection.
[7/8/2022] [4:03:49 AM] [Global ] › ✖ error ROLLBACK - Cannot enqueue Query after fatal error.
[7/8/2022] [4:03:50 AM] [Global ] › ✖ error connect ECONNREFUSED 172.24.0.3:3306
[7/8/2022] [4:03:51 AM] [Migrate ] › ℹ info Current database version: none
Can't take lock to run migrations: Migration table is already locked
If you are sure migrations are not running you can release the lock manually by deleting all the rows = require(migrations lock table: migrations_lock

Expected behavior

A working install.

Operating System

DietPi 64 on a RPI 4 8G. Also having the problem with Pi OS

Additional context

The template I am using has worked with prior version, it has only recently started to fail.

Originally created by @rmiddle on GitHub (Jul 8, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2148 **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** <!-- A clear and concise description of what the bug is. --> Fresh installation on mysql results in an error. **Nginx Proxy Manager Version** <!-- What version of Nginx Proxy Manager is reported on the login page? --> v2.9.18 **To Reproduce** Steps to reproduce the behavior: Install docker instance with a config file pointing at mysql. From the ❯ Enabling IPV6 in hosts: /data/nginx [7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info Current database version: none [7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] Migrating Up... [7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] auth Table created [7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] user Table created [7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] user_permission Table created [7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] proxy_host Table created [7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] redirection_host Table created [7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] dead_host Table created [7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] stream Table created [7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] access_list Table created [7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] certificate Table created [7/8/2022] [4:03:49 AM] [Migrate ] › ℹ info [initial-schema] access_list_auth Table created migration file "20180618015850_initial.js" failed migration failed with error: create table `audit_log` (`id` int unsigned not null auto_increment primary key, `created_on` datetime not null, `modified_on` datetime not null, `user_id` int unsigned not null, `object_type` varchar(255) not null default '', `object_id` int unsigned not null default '0', `action` varchar(255) not null, `meta` json not null) - Connection lost: The server closed the connection. [7/8/2022] [4:03:49 AM] [Global ] › ✖ error ROLLBACK - Cannot enqueue Query after fatal error. [7/8/2022] [4:03:50 AM] [Global ] › ✖ error connect ECONNREFUSED 172.24.0.3:3306 [7/8/2022] [4:03:51 AM] [Migrate ] › ℹ info Current database version: none Can't take lock to run migrations: Migration table is already locked If you are sure migrations are not running you can release the lock manually by deleting all the rows = require(migrations lock table: migrations_lock **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> A working install. **Operating System** <!-- Please specify if using a Rpi, Mac, orchestration tool or any other setups that might affect the reproduction of this error. --> DietPi 64 on a RPI 4 8G. Also having the problem with Pi OS **Additional context** <!-- Add any other context about the problem here, docker version, browser version, logs if applicable to the problem. Too much info is better than too little. --> The template I am using has worked with prior version, it has only recently started to fail.
kerem 2026-02-26 07:31:28 +03:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@github-actions[bot] commented on GitHub (Feb 14, 2024):

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

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

@github-actions[bot] commented on GitHub (Mar 30, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2764342931 --> @github-actions[bot] commented on GitHub (Mar 30, 2025): Issue was closed due to inactivity.
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#1537
No description provided.