[GH-ISSUE #330] Database is always in read_only mode #290

Closed
opened 2026-02-26 06:32:03 +03:00 by kerem · 16 comments
Owner

Originally created by @dkumarc on GitHub (Mar 15, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/330

I have followed the instruction and using Intel h/w I see following error from proxy container:

[3/15/2020] [2:35:25 AM] [Global   ] › ✖  error     show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only
Db docker
2020-03-15  2:34:24 6 [Warning] 'proxies_priv' entry '@% root@90a2cca335fa' ignored in --skip-name-resolve mode.
/scripts/run.sh: ignoring or entrypoint initdb empty /docker-entrypoint-initdb.d/*
Originally created by @dkumarc on GitHub (Mar 15, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/330 I have followed the instruction and using Intel h/w I see following error from proxy container: ``` [3/15/2020] [2:35:25 AM] [Global ] › ✖ error show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only Db docker 2020-03-15 2:34:24 6 [Warning] 'proxies_priv' entry '@% root@90a2cca335fa' ignored in --skip-name-resolve mode. /scripts/run.sh: ignoring or entrypoint initdb empty /docker-entrypoint-initdb.d/* ```
kerem 2026-02-26 06:32:03 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jc21 commented on GitHub (Mar 15, 2020):

This is a new problem we've never seen before.

Just need to determine what database you're using. Can you paste your docker-compose.yml file?

<!-- gh-comment-id:599279262 --> @jc21 commented on GitHub (Mar 15, 2020): This is a new problem we've never seen before. Just need to determine what database you're using. Can you paste your `docker-compose.yml` file?
Author
Owner

@Anzic23 commented on GitHub (Apr 16, 2020):

+1
Nginx Proxy Manager v2.2.3
docker-compose.yml.txt
config.json.txt

[4/16/2020] [1:21:48 PM] [Global ] › ✖ error select * from migrations_lock - ER_OPEN_AS_READONLY: Table './npm/migrations_lock.MAI' is read only

<!-- gh-comment-id:614650279 --> @Anzic23 commented on GitHub (Apr 16, 2020): +1 Nginx Proxy Manager v2.2.3 [docker-compose.yml.txt](https://github.com/jc21/nginx-proxy-manager/files/4487356/docker-compose.yml.txt) [config.json.txt](https://github.com/jc21/nginx-proxy-manager/files/4487357/config.json.txt) [4/16/2020] [1:21:48 PM] [Global ] › ✖ error select * from `migrations_lock` - ER_OPEN_AS_READONLY: Table './npm/migrations_lock.MAI' is read only
Author
Owner

@jc21 commented on GitHub (Apr 16, 2020):

ok, next make sure that the db files in /volume2/doker_mapping/nginx-db have write permission by the owner. The files also need to be owned by the container user. You can ensure this is the case by:

chmod -R +w /volume2/doker_mapping/nginx-db
chown -R 100:101 /volume2/doker_mapping/nginx-db

After restarting the db container, if the table is still in readonly mode, log in to the mysql client and try to repair the table:

docker exec -ti nginxproxymanager_db_1 mysql -u npm -p npm
> REPAIR TABLE migrations_lock
<!-- gh-comment-id:614938850 --> @jc21 commented on GitHub (Apr 16, 2020): ok, next make sure that the db files in `/volume2/doker_mapping/nginx-db` have write permission by the owner. The files also need to be owned by the container user. You can ensure this is the case by: ```bash chmod -R +w /volume2/doker_mapping/nginx-db chown -R 100:101 /volume2/doker_mapping/nginx-db ``` After restarting the db container, if the table is still in readonly mode, log in to the mysql client and try to repair the table: ```bash docker exec -ti nginxproxymanager_db_1 mysql -u npm -p npm > REPAIR TABLE migrations_lock ```
Author
Owner

@Anzic23 commented on GitHub (Apr 16, 2020):

didn't help, still an error. Tried a completely clean installation from #374. But it didn't work out either.

Click to view log ``` ❯ /data/nginx/ip_ranges.conf

nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/npm-17/fullchain.pem": PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)

finish: applet not found

[4/16/2020] [11:36:23 PM] [Global ] › ✖ error select * from migrations_lock - ER_OPEN_AS_READONLY: Table './npm/migrations_lock.MAI' is read only

❯ Enabling IPV6 in hosts: /etc/nginx/conf.d

❯ /etc/nginx/conf.d/include/assets.conf

❯ /etc/nginx/conf.d/include/block-exploits.conf

❯ /etc/nginx/conf.d/include/force-ssl.conf

❯ /etc/nginx/conf.d/include/ip_ranges.conf

❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf

❯ /etc/nginx/conf.d/include/proxy.conf

❯ /etc/nginx/conf.d/include/ssl-ciphers.conf

❯ /etc/nginx/conf.d/include/resolvers.conf

❯ /etc/nginx/conf.d/default.conf

❯ /etc/nginx/conf.d/production.conf

❯ Enabling IPV6 in hosts: /data/nginx

❯ /data/nginx/default_host/site.conf

❯ /data/nginx/proxy_host/1.conf

❯ /data/nginx/proxy_host/10.conf

❯ /data/nginx/proxy_host/11.conf

❯ /data/nginx/proxy_host/13.conf

❯ /data/nginx/proxy_host/14.conf

❯ /data/nginx/proxy_host/17.conf

❯ /data/nginx/proxy_host/20.conf

❯ /data/nginx/proxy_host/23.conf

❯ /data/nginx/proxy_host/25.conf

❯ /data/nginx/proxy_host/26.conf

❯ /data/nginx/proxy_host/3.conf

❯ /data/nginx/proxy_host/4.conf

❯ /data/nginx/proxy_host/5.conf

❯ /data/nginx/proxy_host/6.conf

❯ /data/nginx/proxy_host/7.conf

❯ /data/nginx/proxy_host/8.conf

❯ /data/nginx/proxy_host/9.conf

❯ /data/nginx/ip_ranges.conf

nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/npm-17/fullchain.pem": PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)

finish: applet not found

[4/16/2020] [11:36:24 PM] [Global ] › ✖ error select * from migrations_lock - ER_OPEN_AS_READONLY: Table './npm/migrations_lock.MAI' is read only

</details>

      
<!-- gh-comment-id:614950172 --> @Anzic23 commented on GitHub (Apr 16, 2020): didn't help, still an error. Tried a completely clean installation from #374. But it didn't work out either. <details><summary>Click to view log</summary> ``` ❯ /data/nginx/ip_ranges.conf nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/npm-17/fullchain.pem": PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE) finish: applet not found [4/16/2020] [11:36:23 PM] [Global ] › ✖ error select * from `migrations_lock` - ER_OPEN_AS_READONLY: Table './npm/migrations_lock.MAI' is read only ❯ Enabling IPV6 in hosts: /etc/nginx/conf.d ❯ /etc/nginx/conf.d/include/assets.conf ❯ /etc/nginx/conf.d/include/block-exploits.conf ❯ /etc/nginx/conf.d/include/force-ssl.conf ❯ /etc/nginx/conf.d/include/ip_ranges.conf ❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf ❯ /etc/nginx/conf.d/include/proxy.conf ❯ /etc/nginx/conf.d/include/ssl-ciphers.conf ❯ /etc/nginx/conf.d/include/resolvers.conf ❯ /etc/nginx/conf.d/default.conf ❯ /etc/nginx/conf.d/production.conf ❯ Enabling IPV6 in hosts: /data/nginx ❯ /data/nginx/default_host/site.conf ❯ /data/nginx/proxy_host/1.conf ❯ /data/nginx/proxy_host/10.conf ❯ /data/nginx/proxy_host/11.conf ❯ /data/nginx/proxy_host/13.conf ❯ /data/nginx/proxy_host/14.conf ❯ /data/nginx/proxy_host/17.conf ❯ /data/nginx/proxy_host/20.conf ❯ /data/nginx/proxy_host/23.conf ❯ /data/nginx/proxy_host/25.conf ❯ /data/nginx/proxy_host/26.conf ❯ /data/nginx/proxy_host/3.conf ❯ /data/nginx/proxy_host/4.conf ❯ /data/nginx/proxy_host/5.conf ❯ /data/nginx/proxy_host/6.conf ❯ /data/nginx/proxy_host/7.conf ❯ /data/nginx/proxy_host/8.conf ❯ /data/nginx/proxy_host/9.conf ❯ /data/nginx/ip_ranges.conf nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/npm-17/fullchain.pem": PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE) finish: applet not found [4/16/2020] [11:36:24 PM] [Global ] › ✖ error select * from `migrations_lock` - ER_OPEN_AS_READONLY: Table './npm/migrations_lock.MAI' is read only ``` </details>
Author
Owner

@jc21 commented on GitHub (Apr 16, 2020):

Is there anything from the db docker container logs that might indicate why it's in readonly?

<!-- gh-comment-id:614954162 --> @jc21 commented on GitHub (Apr 16, 2020): Is there anything from the db docker container logs that might indicate why it's in readonly?
Author
Owner

@Anzic23 commented on GitHub (Apr 17, 2020):

I don't think so

[i] mysqld not found, creating....,
[i] MySQL directory already present, skipping creation,
2020-04-16 23:31:25 0 [Note] /usr/bin/mysqld (mysqld 10.4.10-MariaDB) starting as process 1 ...,
2020-04-16 23:31:25 0 [Note] InnoDB: Using Linux native AIO,
2020-04-16 23:31:25 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins,
2020-04-16 23:31:25 0 [Note] InnoDB: Uses event mutexes,
2020-04-16 23:31:25 0 [Note] InnoDB: Compressed tables use zlib 1.2.11,
2020-04-16 23:31:25 0 [Note] InnoDB: Number of pools: 1,
2020-04-16 23:31:25 0 [Note] InnoDB: Using SSE2 crc32 instructions,
2020-04-16 23:31:25 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M,
2020-04-16 23:31:25 0 [Note] InnoDB: Completed initialization of buffer pool,
2020-04-16 23:31:25 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().,
2020-04-16 23:31:25 0 [Note] InnoDB: 128 out of 128 rollback segments are active.,
2020-04-16 23:31:25 0 [Note] InnoDB: Creating shared tablespace for temporary tables,
2020-04-16 23:31:25 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...,
2020-04-16 23:31:25 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.,
2020-04-16 23:31:25 0 [Note] InnoDB: 10.4.10 started; log sequence number 113964; transaction id 9,
2020-04-16 23:31:25 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql//ib_buffer_pool,
2020-04-16 23:31:25 0 [Note] Plugin 'FEEDBACK' is disabled.,
2020-04-16 23:31:25 0 [Note] InnoDB: Buffer pool(s) load completed at 200416 23:31:25,
2020-04-16 23:31:25 0 [Note] Server socket created on IP: '::'.,
2020-04-16 23:31:25 0 [Warning] 'proxies_priv' entry '@% root@ea29945ef5b7' ignored in --skip-name-resolve mode.,
2020-04-16 23:31:26 0 [Note] Reading of all Master_info entries succeeded,
2020-04-16 23:31:26 0 [Note] Added new Master_info '' to hash table,
2020-04-16 23:31:26 0 [Note] /usr/bin/mysqld: ready for connections.,
Version: '10.4.10-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  MariaDB Server,
2020-04-16 23:44:26 0 [Note] /usr/bin/mysqld (initiated by: unknown): Normal shutdown,
2020-04-16 23:44:26 0 [Note] Event Scheduler: Purging the queue. 0 events,
2020-04-16 23:44:26 0 [Note] InnoDB: FTS optimize thread exiting.,
2020-04-16 23:44:26 0 [Note] InnoDB: Starting shutdown...,
2020-04-16 23:44:26 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql//ib_buffer_pool,
2020-04-16 23:44:26 0 [Note] InnoDB: Buffer pool(s) dump completed at 200416 23:44:26,
2020-04-16 23:44:28 0 [Note] InnoDB: Shutdown completed; log sequence number 113973; transaction id 9,
2020-04-16 23:44:28 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1",
2020-04-16 23:44:28 0 [Note] /usr/bin/mysqld: Shutdown complete,
,
[i] mysqld already present, skipping creation,
[i] MySQL directory already present, skipping creation,
2020-04-16 23:48:47 0 [Note] /usr/bin/mysqld (mysqld 10.4.10-MariaDB) starting as process 1 ...,
2020-04-16 23:48:47 0 [Note] InnoDB: Using Linux native AIO,
2020-04-16 23:48:47 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins,
2020-04-16 23:48:47 0 [Note] InnoDB: Uses event mutexes,
2020-04-16 23:48:47 0 [Note] InnoDB: Compressed tables use zlib 1.2.11,
2020-04-16 23:48:47 0 [Note] InnoDB: Number of pools: 1,
2020-04-16 23:48:47 0 [Note] InnoDB: Using SSE2 crc32 instructions,
2020-04-16 23:48:47 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M,
2020-04-16 23:48:47 0 [Note] InnoDB: Completed initialization of buffer pool,
2020-04-16 23:48:47 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().,
2020-04-16 23:48:47 0 [Note] InnoDB: 128 out of 128 rollback segments are active.,
2020-04-16 23:48:47 0 [Note] InnoDB: Creating shared tablespace for temporary tables,
2020-04-16 23:48:47 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...,
2020-04-16 23:48:47 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.,
2020-04-16 23:48:47 0 [Note] InnoDB: Waiting for purge to start,
2020-04-16 23:48:47 0 [Note] InnoDB: 10.4.10 started; log sequence number 113973; transaction id 9,
2020-04-16 23:48:47 0 [Note] Plugin 'FEEDBACK' is disabled.,
2020-04-16 23:48:47 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql//ib_buffer_pool,
2020-04-16 23:48:47 0 [Note] InnoDB: Buffer pool(s) load completed at 200416 23:48:47,
2020-04-16 23:48:47 0 [Note] Server socket created on IP: '::'.,
2020-04-16 23:48:48 0 [Warning] 'proxies_priv' entry '@% root@ea29945ef5b7' ignored in --skip-name-resolve mode.,
2020-04-16 23:48:48 0 [Note] Reading of all Master_info entries succeeded,
2020-04-16 23:48:48 0 [Note] Added new Master_info '' to hash table,
2020-04-16 23:48:48 0 [Note] /usr/bin/mysqld: ready for connections.,
Version: '10.4.10-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  MariaDB Server,
<!-- gh-comment-id:614961168 --> @Anzic23 commented on GitHub (Apr 17, 2020): I don't think so ``` [i] mysqld not found, creating...., [i] MySQL directory already present, skipping creation, 2020-04-16 23:31:25 0 [Note] /usr/bin/mysqld (mysqld 10.4.10-MariaDB) starting as process 1 ..., 2020-04-16 23:31:25 0 [Note] InnoDB: Using Linux native AIO, 2020-04-16 23:31:25 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins, 2020-04-16 23:31:25 0 [Note] InnoDB: Uses event mutexes, 2020-04-16 23:31:25 0 [Note] InnoDB: Compressed tables use zlib 1.2.11, 2020-04-16 23:31:25 0 [Note] InnoDB: Number of pools: 1, 2020-04-16 23:31:25 0 [Note] InnoDB: Using SSE2 crc32 instructions, 2020-04-16 23:31:25 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M, 2020-04-16 23:31:25 0 [Note] InnoDB: Completed initialization of buffer pool, 2020-04-16 23:31:25 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority()., 2020-04-16 23:31:25 0 [Note] InnoDB: 128 out of 128 rollback segments are active., 2020-04-16 23:31:25 0 [Note] InnoDB: Creating shared tablespace for temporary tables, 2020-04-16 23:31:25 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ..., 2020-04-16 23:31:25 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB., 2020-04-16 23:31:25 0 [Note] InnoDB: 10.4.10 started; log sequence number 113964; transaction id 9, 2020-04-16 23:31:25 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql//ib_buffer_pool, 2020-04-16 23:31:25 0 [Note] Plugin 'FEEDBACK' is disabled., 2020-04-16 23:31:25 0 [Note] InnoDB: Buffer pool(s) load completed at 200416 23:31:25, 2020-04-16 23:31:25 0 [Note] Server socket created on IP: '::'., 2020-04-16 23:31:25 0 [Warning] 'proxies_priv' entry '@% root@ea29945ef5b7' ignored in --skip-name-resolve mode., 2020-04-16 23:31:26 0 [Note] Reading of all Master_info entries succeeded, 2020-04-16 23:31:26 0 [Note] Added new Master_info '' to hash table, 2020-04-16 23:31:26 0 [Note] /usr/bin/mysqld: ready for connections., Version: '10.4.10-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 3306 MariaDB Server, 2020-04-16 23:44:26 0 [Note] /usr/bin/mysqld (initiated by: unknown): Normal shutdown, 2020-04-16 23:44:26 0 [Note] Event Scheduler: Purging the queue. 0 events, 2020-04-16 23:44:26 0 [Note] InnoDB: FTS optimize thread exiting., 2020-04-16 23:44:26 0 [Note] InnoDB: Starting shutdown..., 2020-04-16 23:44:26 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql//ib_buffer_pool, 2020-04-16 23:44:26 0 [Note] InnoDB: Buffer pool(s) dump completed at 200416 23:44:26, 2020-04-16 23:44:28 0 [Note] InnoDB: Shutdown completed; log sequence number 113973; transaction id 9, 2020-04-16 23:44:28 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1", 2020-04-16 23:44:28 0 [Note] /usr/bin/mysqld: Shutdown complete, , [i] mysqld already present, skipping creation, [i] MySQL directory already present, skipping creation, 2020-04-16 23:48:47 0 [Note] /usr/bin/mysqld (mysqld 10.4.10-MariaDB) starting as process 1 ..., 2020-04-16 23:48:47 0 [Note] InnoDB: Using Linux native AIO, 2020-04-16 23:48:47 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins, 2020-04-16 23:48:47 0 [Note] InnoDB: Uses event mutexes, 2020-04-16 23:48:47 0 [Note] InnoDB: Compressed tables use zlib 1.2.11, 2020-04-16 23:48:47 0 [Note] InnoDB: Number of pools: 1, 2020-04-16 23:48:47 0 [Note] InnoDB: Using SSE2 crc32 instructions, 2020-04-16 23:48:47 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M, 2020-04-16 23:48:47 0 [Note] InnoDB: Completed initialization of buffer pool, 2020-04-16 23:48:47 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority()., 2020-04-16 23:48:47 0 [Note] InnoDB: 128 out of 128 rollback segments are active., 2020-04-16 23:48:47 0 [Note] InnoDB: Creating shared tablespace for temporary tables, 2020-04-16 23:48:47 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ..., 2020-04-16 23:48:47 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB., 2020-04-16 23:48:47 0 [Note] InnoDB: Waiting for purge to start, 2020-04-16 23:48:47 0 [Note] InnoDB: 10.4.10 started; log sequence number 113973; transaction id 9, 2020-04-16 23:48:47 0 [Note] Plugin 'FEEDBACK' is disabled., 2020-04-16 23:48:47 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql//ib_buffer_pool, 2020-04-16 23:48:47 0 [Note] InnoDB: Buffer pool(s) load completed at 200416 23:48:47, 2020-04-16 23:48:47 0 [Note] Server socket created on IP: '::'., 2020-04-16 23:48:48 0 [Warning] 'proxies_priv' entry '@% root@ea29945ef5b7' ignored in --skip-name-resolve mode., 2020-04-16 23:48:48 0 [Note] Reading of all Master_info entries succeeded, 2020-04-16 23:48:48 0 [Note] Added new Master_info '' to hash table, 2020-04-16 23:48:48 0 [Note] /usr/bin/mysqld: ready for connections., Version: '10.4.10-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 3306 MariaDB Server, ```
Author
Owner

@jc21 commented on GitHub (Apr 17, 2020):

There's nothing in there that indicates a problem.

I would suggest to wipe out your entire stack, including the database files and start it up again. Firstly though, dump the SQL from your existing db then import it after you have the new stack.

Backup with:

docker exec -ti nginxproxymanager_db_1 mysqldump -u npm -p npm > backup.sql

Make sure the file has the SQL with your data in it!

Import with:

echo "drop database npm; create database npm;" | docker exec -ti nginxproxymanager_db_1 mysql -u npm -p npm
cat backup.sql | docker exec -ti nginxproxymanager_db_1 mysql -u npm -p npm
<!-- gh-comment-id:615029839 --> @jc21 commented on GitHub (Apr 17, 2020): There's nothing in there that indicates a problem. I would suggest to wipe out your entire stack, including the database files and start it up again. Firstly though, dump the SQL from your existing db then import it after you have the new stack. Backup with: ``` docker exec -ti nginxproxymanager_db_1 mysqldump -u npm -p npm > backup.sql ``` Make sure the file has the SQL with your data in it! Import with: ``` echo "drop database npm; create database npm;" | docker exec -ti nginxproxymanager_db_1 mysql -u npm -p npm cat backup.sql | docker exec -ti nginxproxymanager_db_1 mysql -u npm -p npm ```
Author
Owner

@Anzic23 commented on GitHub (Apr 17, 2020):

the problem is that even with a new clean installation, I still get an error.

[4/17/2020] [10:30:40 AM] [Global   ] › ✖  error     show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only


[4/17/2020] [10:30:41 AM] [Migrate  ] › ℹ  info      Current database version: 20180929054513


[4/17/2020] [10:30:41 AM] [Migrate  ] › ℹ  info      [forward_host] Migrating Up...


migration file "20181019052346_forward_host.js" failed


migration failed with error: show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only


[4/17/2020] [10:30:41 AM] [Global   ] › ✖  error     show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only
<!-- gh-comment-id:615173414 --> @Anzic23 commented on GitHub (Apr 17, 2020): the problem is that even with a new clean installation, I still get an error. ``` [4/17/2020] [10:30:40 AM] [Global ] › ✖ error show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only [4/17/2020] [10:30:41 AM] [Migrate ] › ℹ info Current database version: 20180929054513 [4/17/2020] [10:30:41 AM] [Migrate ] › ℹ info [forward_host] Migrating Up... migration file "20181019052346_forward_host.js" failed migration failed with error: show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only [4/17/2020] [10:30:41 AM] [Global ] › ✖ error show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only ```
Author
Owner

@theraw commented on GitHub (Apr 17, 2020):

This seems like a problem with your server, docker is failing to mount properly volumes on container for some reason which i can't understand lack of information you give.

can you try?

rm -Rf /tmp; mkdir -p /tmp; rm -Rf /var/tmp; mkdir -p /var/tmp;

then delete/build containers again.

if that didn't work can you try to bring up mysql container without a shared volume?
https://gist.github.com/theraw/bc557197181eafe5ba9f4235fc75593d#file-npm-L1

the docker compose template which i gave is build for v 3.7 which requires docker v18.06.0+

if this didn't help in any way, please make sure docker can even bring up a writable container at all
docker exec -it nginx /bin/touch /file

<!-- gh-comment-id:615201395 --> @theraw commented on GitHub (Apr 17, 2020): This seems like a problem with your server, docker is failing to mount properly volumes on container for some reason which i can't understand lack of information you give. can you try? ```bash rm -Rf /tmp; mkdir -p /tmp; rm -Rf /var/tmp; mkdir -p /var/tmp; ``` then delete/build containers again. if that didn't work can you try to bring up mysql container without a shared volume? https://gist.github.com/theraw/bc557197181eafe5ba9f4235fc75593d#file-npm-L1 the docker compose template which i gave is build for v `3.7` which requires docker v`18.06.0+ ` if this didn't help in any way, please make sure docker can even bring up a writable container at all `docker exec -it nginx /bin/touch /file`
Author
Owner

@Anzic23 commented on GitHub (Apr 17, 2020):

sorry guys, I can't check further. Returned the ports to synology control. I will do it through the built-in reverse proxy. Maybe on another computer I will return to this project later. Well done, I liked it.

<!-- gh-comment-id:615380239 --> @Anzic23 commented on GitHub (Apr 17, 2020): sorry guys, I can't check further. Returned the ports to synology control. I will do it through the built-in reverse proxy. Maybe on another computer I will return to this project later. Well done, I liked it.
Author
Owner

@theraw commented on GitHub (May 3, 2020):

Hello,

just got a similar issue as you with read-only problem about mysql

migration failed with error: show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only
[5/3/2020] [4:01:12 PM] [Global   ]    error     show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only

this happend after trying lots of times to create those 2 containers with this template https://github.com/jc21/nginx-proxy-manager/issues/374

🤔
docker container of mysql permissions seems ok

[root@server654234 ~]# docker exec -it db ls -la /var/lib/mysql
total 122936
drwxr-xr-x    5 mysql    mysql         4096 May  3 16:05 .
drwxr-xr-x    1 root     root          4096 Mar 10 08:20 ..
-rw-rw----    1 mysql    mysql        24576 May  3 16:05 aria_log.00000001
-rw-rw----    1 mysql    mysql           52 May  3 16:05 aria_log_control
-rw-rw----    1 mysql    mysql            2 May  3 16:05 c08f60ff9583.pid
-rw-r-----    1 mysql    mysql         1946 May  3 16:05 ib_buffer_pool
-rw-rw----    1 mysql    mysql     50331648 May  3 16:10 ib_logfile0
-rw-rw----    1 mysql    mysql     50331648 May  3 15:43 ib_logfile1
-rw-rw----    1 mysql    mysql     12582912 May  3 16:10 ibdata1
-rw-rw----    1 mysql    mysql     12582912 May  3 16:05 ibtmp1
-rw-rw----    1 mysql    mysql            0 May  3 15:43 multi-master.info
drwx------    2 mysql    mysql         4096 May  3 15:43 mysql
drwx------    2 mysql    mysql         4096 May  3 16:00 nginx
drwx------    2 mysql    mysql         4096 May  3 15:43 performance_schema

looks weird i can confirm that mysql is running and database is created including some data

MariaDB [nginx]> show tables
    -> ;
+------------------+
| Tables_in_nginx  |
+------------------+
| access_list      |
| access_list_auth |
| audit_log        |
| auth             |
| certificate      |
| dead_host        |
| migrations       |
| migrations_lock  |
| proxy_host       |
| redirection_host |
| stream           |
| user             |
| user_permission  |
+------------------+
13 rows in set (0.001 sec)

MariaDB [nginx]>

however node index.js into /app fails like

[root@docker-5a142d95379f:/app]# node index.js
[5/3/2020] [4:15:54 PM] [Migrate  ] › ℹ  info      Current database version: 20180929054513
[5/3/2020] [4:15:54 PM] [Migrate  ] › ℹ  info      [forward_host] Migrating Up...
migration file "20181019052346_forward_host.js" failed
migration failed with error: show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only
[5/3/2020] [4:15:54 PM] [Global   ] › ✖  error     show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only

I usually use debian/ubuntu, but this time got a fresh VPS server installed CentOS 7.4 + Docker and this happend

Right now i have no idea what's wrong.

Did A vps reinstallation and using Debian 9, did exactly same steps and there is no problem 😕

<!-- gh-comment-id:623134369 --> @theraw commented on GitHub (May 3, 2020): Hello, just got a similar issue as you with read-only problem about mysql ```js migration failed with error: show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only [5/3/2020] [4:01:12 PM] [Global ] › ✖ error show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only ``` this happend after trying lots of times to create those 2 containers with this template https://github.com/jc21/nginx-proxy-manager/issues/374 🤔 docker container of mysql permissions seems ok ```bash [root@server654234 ~]# docker exec -it db ls -la /var/lib/mysql total 122936 drwxr-xr-x 5 mysql mysql 4096 May 3 16:05 . drwxr-xr-x 1 root root 4096 Mar 10 08:20 .. -rw-rw---- 1 mysql mysql 24576 May 3 16:05 aria_log.00000001 -rw-rw---- 1 mysql mysql 52 May 3 16:05 aria_log_control -rw-rw---- 1 mysql mysql 2 May 3 16:05 c08f60ff9583.pid -rw-r----- 1 mysql mysql 1946 May 3 16:05 ib_buffer_pool -rw-rw---- 1 mysql mysql 50331648 May 3 16:10 ib_logfile0 -rw-rw---- 1 mysql mysql 50331648 May 3 15:43 ib_logfile1 -rw-rw---- 1 mysql mysql 12582912 May 3 16:10 ibdata1 -rw-rw---- 1 mysql mysql 12582912 May 3 16:05 ibtmp1 -rw-rw---- 1 mysql mysql 0 May 3 15:43 multi-master.info drwx------ 2 mysql mysql 4096 May 3 15:43 mysql drwx------ 2 mysql mysql 4096 May 3 16:00 nginx drwx------ 2 mysql mysql 4096 May 3 15:43 performance_schema ``` looks weird i can confirm that mysql is running and database is created including some data ```bash MariaDB [nginx]> show tables -> ; +------------------+ | Tables_in_nginx | +------------------+ | access_list | | access_list_auth | | audit_log | | auth | | certificate | | dead_host | | migrations | | migrations_lock | | proxy_host | | redirection_host | | stream | | user | | user_permission | +------------------+ 13 rows in set (0.001 sec) MariaDB [nginx]> ``` however `node index.js` into `/app` fails like ```bash [root@docker-5a142d95379f:/app]# node index.js [5/3/2020] [4:15:54 PM] [Migrate ] › ℹ info Current database version: 20180929054513 [5/3/2020] [4:15:54 PM] [Migrate ] › ℹ info [forward_host] Migrating Up... migration file "20181019052346_forward_host.js" failed migration failed with error: show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only [5/3/2020] [4:15:54 PM] [Global ] › ✖ error show fields from `proxy_host` where field = 'forward_ip' - ER_OPEN_AS_READONLY: Table '/var/tmp/#sql_1_0.MAI' is read only ``` I usually use debian/ubuntu, but this time got a fresh VPS server installed CentOS 7.4 + Docker and this happend Right now i have no idea what's wrong. **Did A vps reinstallation** and using Debian 9, did exactly same steps and there is no problem 😕
Author
Owner

@pvdochtend commented on GitHub (Nov 4, 2020):

I experience the the problem on one of the two Synology NAS devices.

The software versions are the same. I can get around in linux but I am not a guru.. So.. Are there more tips how to solve this? I can't just reinstall like the last comment (VPS) because this is my NAS :D

<!-- gh-comment-id:722008468 --> @pvdochtend commented on GitHub (Nov 4, 2020): I experience the the problem on one of the two Synology NAS devices. The software versions are the same. I can get around in linux but I am not a guru.. So.. Are there more tips how to solve this? I can't just reinstall like the last comment (VPS) because this is my NAS :D
Author
Owner

@theraw commented on GitHub (Nov 5, 2020):

@pvdochtend i don't suggest doing reinstallations like that, i posted just to say that in some distros the problem happens and in some no, maybe the creator created the image on debian and is not well tested on other distros,

What i would suggest for you and for myself which i didn't do because i didn't had time is to give a try and building the image by yourself for your NAS https://github.com/jc21/nginx-proxy-manager/tree/master/docker i don't actually know if u could do that on your NAS (because i don't use that) but that's the thing that can tell us if is a image build problem or no

<!-- gh-comment-id:722500182 --> @theraw commented on GitHub (Nov 5, 2020): @pvdochtend i don't suggest doing reinstallations like that, i posted just to say that in some distros the problem happens and in some no, maybe the creator created the image on debian and is not well tested on other distros, What i would suggest for you and for myself which i didn't do because i didn't had time is to give a try and building the image by yourself for your NAS https://github.com/jc21/nginx-proxy-manager/tree/master/docker i don't actually know if u could do that on your NAS (because i don't use that) but that's the thing that can tell us if is a image build problem or no
Author
Owner

@pvdochtend commented on GitHub (Nov 5, 2020):

Thanks for replying!

The strange thing is that I have two (actually three, I will test it also on the third one) synology devices. On on it works perfectly and the second it doesn’t.
The synology software version and docker version are the same.

I will check the build option from the nas itself.

<!-- gh-comment-id:722525012 --> @pvdochtend commented on GitHub (Nov 5, 2020): Thanks for replying! The strange thing is that I have two (actually three, I will test it also on the third one) synology devices. On on it works perfectly and the second it doesn’t. The synology software version and docker version are the same. I will check the build option from the nas itself.
Author
Owner

@pvdochtend commented on GitHub (Nov 5, 2020):

Tried to build (on Synology but also my laptop)

I did the following:
Git clone https://github.com/jc21/nginx-proxy-manager.git
cd nginx-proxy-manager
cd docker
sudo docker build .

I received the following error:

Step 12/26 : COPY scripts/install-s6 /tmp/install-s6
COPY failed: stat /volume1/@docker/tmp/docker-builder826234128/scripts/install-s6: no such file or directory

<!-- gh-comment-id:722634694 --> @pvdochtend commented on GitHub (Nov 5, 2020): Tried to build (on Synology but also my laptop) I did the following: Git clone https://github.com/jc21/nginx-proxy-manager.git cd nginx-proxy-manager cd docker sudo docker build . I received the following error: Step 12/26 : COPY scripts/install-s6 /tmp/install-s6 COPY failed: stat /volume1/@docker/tmp/docker-builder826234128/scripts/install-s6: no such file or directory
Author
Owner

@pvdochtend commented on GitHub (Nov 5, 2020):

By the way.. I solved it by change the DB image to mariadb:latest instead of the jc21/mariadb-aria:10.4 version.

<!-- gh-comment-id:722635054 --> @pvdochtend commented on GitHub (Nov 5, 2020): By the way.. I solved it by change the DB image to mariadb:latest instead of the jc21/mariadb-aria:10.4 version.
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#290
No description provided.