Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix the stuck at startup causing 502 bad gateway.#4021

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jqknono wants to merge1 commit intoNginxProxyManager:develop
base:develop
Choose a base branch
Loading
fromjqknono:fix-fetching-stuck

Conversation

jqknono
Copy link

Some cloud vendors may have been blocked by AWS, this led to stuck at startup.

@jqknono
Copy link
Author

There are some issues about 502 bad gateway, cannot login.
The direct cause is the NPM getting stuck at startup, some of them related to the fetching ofhttps://ip-ranges.amazonaws.com/ip-ranges.json

Some cloud vendors like Tencentcloud may block aws or be block by aws. Also , it may take a long time downloading this file, which blocked the port 81 backend.

#3965
#3585
#3574
#3157

caicaicai, prinsss, nidbCN, hao-guocheng, and yangluoning reacted with thumbs up emoji

@jqknonojqknono changed the titleFix the stuck at startupFix the stuck at startup causing 502 bad gateway.Sep 26, 2024
@nginxproxymanagerci
Copy link

Docker Image for build 2 is available onDockerHub asjc21/nginx-proxy-manager:github-pr-4021

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

@@ -15,7 +15,6 @@ async function appStart () {
.then(() => {
return apiValidator.loadSchemas;
})
.then(internalIpRanges.fetch)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Removing this is not good enough to fix the problem. This call might be in the wrong place but you haven't put a better one in the pr.

@yangluoning
Copy link

@jc21 develop branch dont have your commit,Is it flushed by other commit?

@jc21
Copy link
Member

@jc21 develop branch dont have your commit,Is it flushed by other commit?

I'm not sure what "commit" you're talking about? This PR is not mine and is not merged either.

@jc21jc21 added the bug labelDec 16, 2024
@github-actionsGitHub Actions
Copy link

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

@jqknono
Copy link
Author

For a quick workaround, you can run the following commands:

NPM_CTR_NAME=nginxproxymanagerdockerexec$NPM_CTR_NAME sed -i's/\.then(internalIpRanges\.fetch)//g' /app/index.jsdocker restart$NPM_CTR_NAME

This will patch the application to skip fetching the IP ranges on startup.

Alternatively, as of#4398, you can use the IP_RANGES_FETCH_ENABLED environment variable to control this behavior.

To disable the fetch, set:

IP_RANGES_FETCH_ENABLED=false

This will also prevent the application from hanging at startup. However,note that the default behavior is still to attempt downloading the IP ranges unless explicitly disabled.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jc21jc21jc21 left review comments

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@jqknono@yangluoning@jc21

[8]ページ先頭

©2009-2025 Movatter.jp