mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #330] Database is always in read_only mode #290
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#290
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
@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.ymlfile?@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@jc21 commented on GitHub (Apr 16, 2020):
ok, next make sure that the db files in
/volume2/doker_mapping/nginx-dbhave write permission by the owner. The files also need to be owned by the container user. You can ensure this is the case by: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:
@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.confnginx: [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@jc21 commented on GitHub (Apr 16, 2020):
Is there anything from the db docker container logs that might indicate why it's in readonly?
@Anzic23 commented on GitHub (Apr 17, 2020):
I don't think so
@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:
Make sure the file has the SQL with your data in it!
Import with:
@Anzic23 commented on GitHub (Apr 17, 2020):
the problem is that even with a new clean installation, I still get an error.
@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?
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.7which 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@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.
@theraw commented on GitHub (May 3, 2020):
Hello,
just got a similar issue as you with read-only problem about mysql
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
looks weird i can confirm that mysql is running and database is created including some data
however
node index.jsinto/appfails likeI 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 😕
@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
@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
@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.
@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
@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.