首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm错误!请求https://registry.npmjs.org/node-gyp失败,原因: getaddrinfo EAI_AGAIN registry.npmjs.org with meteor-up

npm错误!请求https://registry.npmjs.org/node-gyp失败,原因: getaddrinfo EAI_AGAIN registry.npmjs.org with meteor-up
EN

Stack Overflow用户
提问于 2022-06-10 15:43:44
回答 1查看 451关注 0票数 0

我的同事使用meteor在debian机器上部署码头集装箱。最近我们有一个服务器重新启动,它删除了我们添加的一些iptable,以避免ufw + docker安全漏洞。

我希望为这个安全漏洞配置一个新的配置(因为一开始它有点混乱),所以我将以下内容添加到iptable中,如docker文档中所述:

代码语言:javascript
复制
sudo iptables -I DOCKER-USER -i eth0 -j DROP

我的同事在部署时出错如下:

代码语言:javascript
复制
#14 [7/6] RUN cd /built_app/programs/server &&     npm install --unsafe-perm

    #14 41.92 npm ERR! code EAI_AGAIN

    #14 41.92 npm ERR! errno EAI_AGAIN

    #14 41.94 npm ERR! request to https://registry.npmjs.org/node-gyp failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org

    #14 41.95

    #14 41.95 npm ERR! A complete log of this run can be found in:

    #14 41.95 npm ERR!     /root/.npm/_logs/2022-06-07T09_25_12_763Z-debug.log

    #14 ERROR: executor failed running [/bin/sh -c cd /built_app/programs/server &&     npm install --unsafe-perm]: runc did not terminate sucessfully

我不知道这个错误是基于坞的还是基于iptables的。我怀疑有dns问题,所以我尝试了以下几点:

代码语言:javascript
复制
sudo docker run busybox nslookup google.com
;; connection timed out; no servers could be reached

在使用默认(桥)停靠器网络时,似乎无法访问dns服务器。但是,如果我使用主机网络:

代码语言:javascript
复制
sudo docker run --network host busybox nslookup google.com
Server:         213.186.33.99
Address:        213.186.33.99:53

Non-authoritative answer:
Name:   google.com
Address: 142.250.185.78

*** Can't find google.com: No answer

我需要换一下表吗?还是网络问题?还是两者兼备?

编辑1

这绝对是个问题。我试着在没有这些iptable的服务器上执行相同的命令,并且成功了。当我加入iptable的时候,它就停止工作了。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-06-29 07:58:40

我需要允许在iptables的公共接口上建立通信量。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72576877

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档