Skip to content
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

Bad Gateway on Nginx proxy manager login screen #3052

Open
die-lolol opened this issue Jul 11, 2023 · 10 comments
Open

Bad Gateway on Nginx proxy manager login screen #3052

die-lolol opened this issue Jul 11, 2023 · 10 comments
Labels

Comments

@die-lolol
Copy link

I've just setup nginx proxy manager but whenever I go to the login and input the default credentials it always says bad gateway could anyone tell me why this is?

@SignFinder
Copy link

I am not sure that you provided enough of information. Where is info about OS, way to install npm, description how you made login to npm - ip. name, what port etc.

@adamnock
Copy link

Just going to add to this as I had the same problem, and debugged it for a bit till it just, vanished

  • Using both sqllite compose file (latest tag) and mysql example
  • Kubuntu Jammy running docker engine
  • Port 81 exposed for Admin per default example
  • Login would see Bad Gateway on page, console showed 502 openresty error
  • Docker logs were vague, not showing changes on attempts
  • Connected into container via docker exec and debugged for a bit

Eventually understood that the frontend was attempting to pass /api/token to 127.0.01:3000 inside the container, and this was the backend.
lsof -i showed only 80, 81 and 443 were listening

force ran node /app/index.js
Backend came up and could login

Closed container, rebooted it. Still working

Deleted container, image and volumes, including DB.
Reinstalled clean
Same problem
Exec in, force start backend, reboot. Works
So something is stalling the backend start to the point it wont run, but forcing an execute is kicking it in

Attached docker logs output from after a forced run. Might help. Happy to assist further

docker.logs.txt

@davhae
Copy link

davhae commented Jul 17, 2023

Have you looked at the container logs of your database?

Probably a known error, when having the database volume (of mysql container) as a subdirectory of the NPM volume.

@andycandy-de
Copy link
Contributor

Please check your docker-compose.yml. Maybe you mount the mysql folder to the npm container, which also gives me a bad gateway response.
#3078

The volume of the db container should be defined as follow:

    volumes:
      - ./mysql:/var/lib/mysql

@nmatton
Copy link
Contributor

nmatton commented Aug 22, 2023

I have this issues that pops up from updating... all was fine before :(

    volumes:
      - ./mysql:/var/lib/mysql

on my side, I used

    volumes:
      - ./data/mysql:/var/lib/mysql

but I guess it makes no difference

@nmatton
Copy link
Contributor

nmatton commented Aug 22, 2023

when checking logs, I have the following:

[8/22/2023] [10:00:50 AM] [Global   ] › ✖  error     create table `migrations` (`id` int unsigned not null auto_increment primary key, `name` varchar(255), `bae `npm`.`migrations` (errno: 13 "Permission denied")

I (quick)fixed it using mariadb;latest image as described in #2990

@b141r
Copy link

b141r commented Sep 6, 2023

same bad gateway issue.
add this container to "bridge" network solve my problem..

@andycandy-de
Copy link
Contributor

but I guess it makes no difference

@nmatton it makes an difference. With your definition ./data/mysql:/var/lib/mysql the NPM container can access the DB data files. Because the NPM container mounts the data folder ./data:/data. And that is the problem. Because of that you got the "Permission denied" error.

So moving your DB folder and using the correct mount for your DB container will solve your issue! ./mysql:/var/lib/mysql

@ProudActor
Copy link

I want to know how to solve my problem?thanks. the log show:select * from migrations_lock - ER_OPEN_AS_READONLY: Table './npm/migrations_lock.MAI' is read only

Copy link

github-actions bot commented Jun 3, 2024

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

@github-actions github-actions bot added the stale label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants