-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Bad Gateway - error create table npm.migrations Permission Denied #1499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
After verification 172.29.0.7 is the NPM IP address. So maybe there's a simple issue with NPM that is not connected to mariadb. |
I successfully connect from another container to mariadb (after installing mysql client) to the db IPadress (172.29.0.7) or with the internal docker name "db". |
i have the same issue except mine says migrations lock read only |
@zippyy those two issues have nothing to do with each other, yours is entirely different. But issues like these is why we now recommend using the SQLite database, which is much less error prone than having a second container for the database. If you have not set up much just use the new |
There are two options:
Somehow the database is intergrated in the image. The only disadvantage is that you need to build up the url's in the proxy again. |
There are two options:
Somehow the database is intergrated in the image. The only disadvantage is that you need to build up the url's in the proxy again. |
I get the same error on the latest build. I switched to the Here's the error that's getting spammed in my log:
|
I got it working. Had to access the db-container and change the owner of the folder
|
hey @jornl i also got it working like that, but that would suggest that on every update of the db-container this configuration needs be done - right? - any fix on that? |
Hi, If you are updating from 2.9.22 and using a Docker Compose file, the Persistent Volume for the MariaDB Aria Container must not be the same as the Persistent Volume for the NPM Container. So you if you have a "mysql" folder in ./data folder from NPM, create a new Persistent Volume for MariaDB Aria Container, copy the "mysql" folder into it. Then recreate both containers with "latest" and you'll have no issues. In Docker Compose it would look like this: NPM Container
MariaDB Aria Containter
Trust me it works. Please check here: https://nginxproxymanager.com/setup/#using-mysql-mariadb-database BR, |
@domidetres you're correct about having to change this every time. A permanent solution would be what @ggriffinorg posted. |
If you don't want to rebuild the database image with new entrypoints you can start the docker environment with a start script like this:
Save this as startup.sh in your docker-compose.yml file location and make it executable with Maybe you have to adjust the path "/var/lib/mysql/nginxproxymanager" to your specific (from your docker-compose.yml) file. In my case I took the startup.sh file to my crontab file as @reboot. |
Many thanks for this solution - it was starting to do my head in! |
Thank you for this. Was driving me nuts, and tripped over it quite by accident. |
After 3 hours of trying to figure out what happened to my NPM instance, I just got to your post and magically everything is running normally. THANKS !!!!! |
it works when upgrading from 2.9.19 to 2.10.3. |
Thank you! Running the above commands (my container name is different) worked perfectly and immediately NPM started working. The issue was that I have Watchtower running in another container and it alerted me that mariadb had a newer version. I ran docker-compose pull to upgrade, and that caused the problem. Thankfully the above bash script fixed it. Matt |
That worked for me! |
This worked for me, too! Thanks! |
Hello everyone, what about users with database.sqlite? Nothing works for that to my configuration. Thank you |
I got the same issue when trying to access NGINX Proxy Manager Here is my Docker Compose File
How do I fix it? I tried the command -
|
Hi all So how can I fix this now and get rid of the "Bad Gateway" message when trying to login? |
Go to your server. Docker exec -it <<your db name>> /bin/sh
Then type cd bar/lib/mysql
Then CHOWN -R mysql:mysql npm
That did it for me.
On Mar 22, 2024, at 6:35 AM, Andreas Messerli ***@***.***> wrote:
Hi all
I have a standalone mariadb server where I host the data of NPM. I DO NOT WANT to migrate to SQLITE as I have hundreds of DBs already on the standalone server and I don't want to manage multiple DB systems. So the solution above setting the folders right or using chown etc. does obviously not work as it is not in a container nor do I start a db container.
So how can I fix this now and get rid of the "Bad Gateway" message when trying to login?
—
Reply to this email directly, view it on GitHub<#1499 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGQILYC4IAZ524TENQUNHGDYZQXQFAVCNFSM5GJVTAW2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBRGUYTCMJTGU4Q>.
You are receiving this because you commented.Message ID: ***@***.***>
|
I was able to fix this with the following docker compose: version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
environment:
PUID: 1000
PGID: 1000
DB_SQLITE_FILE: "/data/sqlite/database.sqlite"
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- nginx-mgr-sqlite:/data/sqlite
- /mnt/prox-share/docker/nginx-proxy-manager/data:/data
- /mnt/prox-share/docker/nginx-proxy-manager/letsencrypt:/etc/letsencrypt
volumes:
nginx-mgr-sqlite:
external: false |
I also facing the same issue with my instance. A quick fix is to restart the MariaDB docker container: docker restart <container-id-db> This at least helps to clear the error and you can login to the webinterface again. Not a permanent solution but mabe helps if you are in a hurry ;) |
Issue is now considered stale. If you want to keep it open, please comment 👍 |
Uh oh!
There was an error while loading. Please reload this page.
Hi Team,
looking some help regarding NPM. Strangely I manage to make NPM work perfectly yesterday. But now that I started again my docker compose I have a strange issue.
Problem:
Sadly I didn't change anything from the initial config (except ports) :
Do you guys have any idea about this issue ?
The text was updated successfully, but these errors were encountered: