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

[Bug] Docker 容器Nginx反向代理问题 #2718

Closed
3 tasks done
jiaxudonggit opened this issue Aug 27, 2023 · 8 comments
Closed
3 tasks done

[Bug] Docker 容器Nginx反向代理问题 #2718

jiaxudonggit opened this issue Aug 27, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@jiaxudonggit
Copy link

为了提高交流效率,我们设立了官方 QQ 群和 QQ 频道,如果你在使用或者搭建过程中遇到了任何问题,请先第一时间加群或者频道咨询解决,除非是可以稳定复现的 Bug 或者较为有创意的功能建议,否则请不要随意往 Issue 区发送低质无意义帖子。

点击加入官方群聊

反馈须知

⚠️ 注意:不遵循此模板的任何帖子都会被立即关闭,如果没有提供下方的信息,我们无法定位你的问题。

请在下方中括号内输入 x 来表示你已经知晓相关内容。

  • 我确认已经在 常见问题 中搜索了此次反馈的问题,没有找到解答;
  • 我确认已经在 Issues 列表(包括已经 Close 的)中搜索了此次反馈的问题,没有找到解答。
  • 我确认已经在 Vercel 使用教程 中搜索了此次反馈的问题,没有找到解答。

描述问题
1、nextJs 更新为13.4.19后,docker容器无法通过nginx反向代理。
2、初步原因是HOSTNAME为127.0.0.1,所以无法正常通过0.0.0.0:3000连接。
3、后将HOSTNAME修改为0.0.0.0,又报错如下:
image
4、发现当前版本nextJs启动方式有区别:
新(13.4.19):
image
旧(13.4.9):
image

疑似该问题导致:vercel/next.js#54203

如何复现
构建最新版本的docker镜像后即可复现该问题。

截图
image
image
image

一些必要的信息

  • 系统:macos 13.4.1/ linux
  • 浏览器:chrome
  • 版本:2.9.5
  • 部署方式:docker
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug]

In order to improve communication efficiency, we have set up official QQ groups and QQ channels. If you encounter any problems during use or construction, please join the group or channel for consultation and solve them as soon as possible, unless it is a bug that can be reproduced stably or More creative feature suggestions, otherwise please do not send low-quality meaningless posts to the Issue area.

Click to join the official group chat

Feedback Notice

⚠️ NOTE: Any post that does not follow this template will be closed immediately, and we cannot locate your issue without providing the information below.

Please enter x in the square brackets below to indicate that you already know the relevant content.

  • I confirm that I have searched for this feedback issue in FAQ, no answer found;
  • I confirm that I have searched for this feedback issue in the Issues list (including those that have been closed), but have not found an answer.
  • I confirm that I have searched for this feedback issue in Vercel Tutorial , did not find an answer.

Describe problem

  1. After nextJs is updated to 13.4.19, the docker container cannot pass the nginx reverse proxy.
  2. The initial reason is that the HOSTNAME is 127.0.0.1, so it cannot be connected through 0.0.0.0:3000 normally.
  3. After modifying the HOSTNAME to 0.0.0.0, the error is reported as follows:
image 4. Found that the current version of nextJs has a different startup method: New (13.4.19): image Old (13.4.9): image

It is suspected that this problem is caused by: vercel/next.js#54203

How ​​to reproduce
This problem can be reproduced after building the latest version of the docker image.

screenshot
image
image
image

some necessary information

  • System: macos 13.4.1/linux
  • Browser: chrome
  • Version: 2.9.5
  • Deployment method: docker

@jiaxudonggit jiaxudonggit changed the title [Bug] [Bug] Docker 容器Nginx反向代理问题 Aug 27, 2023
@Yidadaa Yidadaa added the bug Something isn't working label Aug 28, 2023
@Yidadaa
Copy link
Collaborator

Yidadaa commented Aug 28, 2023

#2721

@Yidadaa
Copy link
Collaborator

Yidadaa commented Aug 28, 2023

@Yidadaa
Copy link
Collaborator

Yidadaa commented Aug 28, 2023

以及回退到旧版本 nextjs 并重新构建了 docker 镜像,请重新拉取 latest 版本 docker 镜像后重试。

@Yidadaa Yidadaa closed this as completed Aug 28, 2023
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


And back to the old version of nextjs and rebuild the docker image, please re-pull the latest version of the docker image and try again.

@kevinriver
Copy link

我在nginx里把127.0.0.1改为0.0.0.0后可以了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I changed 127.0.0.1 to 0.0.0.0 in nginx and it worked.

@luandro
Copy link

luandro commented Jan 12, 2024

I'm having similar issue:

{
  "cause": {
    "errno": -111,
    "code": "ECONNREFUSED",
    "syscall": "connect",
    "address": "172.21.0.18",
    "port": 443
  }
}

Tried adding DEFAULT_HOST=0.0.0.0 to nginxproxy/nginx-proxy but didn't make any difference. Any tips on how to solve @kevinriver?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants