草庐IT

getaddrinfo

全部标签

node.js - Docker DNS getaddrinfo ENOTFOUND

我正在使用node:4.2.1-wheezy和dnsdock容器运行docker-compose。我在/etc/default/docker中有DOCKER_OPTS="--dns172.17.42.1"。当我在node.js容器中运行node-e"require('dns').resolve('host_name_here')"时,主机通过172.17.42.1dns服务器正确解析。但是当我运行node-e"require('dns').lookup('host_name_here')"时,它会因ENOTFOUND错误而失败。问题是http.request使用dns.lookup而不

python - "getaddrinfo failed",这是什么意思?

File"C:\Python27\lib\socket.py",line224,inmethreturngetattr(self._sock,name)(*args)gaierror:[Errno11004]getaddrinfofailed从此处启动helloworld示例时出现此错误:http://bottlepy.org/docs/dev/ 最佳答案 这很可能意味着无法解析主机名。importsocketsocket.getaddrinfo('localhost',8080)如果它在那里不起作用,那么它在Bottle示例中也不

node.js - 使用 mongoose 连接到 MongoDb - 错误 : getaddrinfo ENOTFOUND

我有以下配置:"mongoose":{"url":"mongodb://127.0.0.1:27017/chat","options":{"server":{"socketOptions":{"keepAlive":1}}}}并连接到我的数据库mongoose.connect(config.get('mogoose:url'),config.get('mongoose:options'))但我收到这样的错误:node_modules/mongoose/node_modules/mongodb/lib/server.js:236process.nextTick(function(){th

node.js - 错误 : getaddrinfo ENOTFOUND in nodejs for get call

我正在Node上运行一个Web服务器,其代码如下所示varrestify=require('restify');varserver=restify.createServer();varquotes=[{author:'AudreyHepburn',text:"Nothingisimpossible,theworditselfsays'I'mpossible'!"},{author:'WaltDisney',text:"Youmaynotrealizeitwhenithappens,butakickintheteethmaybethebestthingintheworldforyou"}

php_network_getaddresses : getaddrinfo failed: Name or service not known

这是我的代码片段$fp=fsockopen($s['url'],80,$errno,$errstr,5);if($fp){fwrite($fp,$out);fclose($fp);当我运行它时,它会输出:unabletoconnecttowww.mydomain.net/1/file.php:80(php_network_getaddresses:getaddrinfofailed:Nameorservicenotknown我正在使用它向$s['url']提交GET数据我不知道为什么。任何帮助将不胜感激。 最佳答案 您不能使用fso

ruby-on-rails - rails 服务器无法启动; getaddrinfo : nodename nor servname provided, 或未知 (SocketError)

我还没有找到解决问题的方法,但是几天前已经有人问过同样的问题-(RailsServerKeepsExiting(SocketError))在我启动Rails服务器后,系统返回一些我无法理解的错误。为了在我的Mac上安装RubyonRails,我做了所有列在http://railsapps.github.io/installrubyonrails-mac.html上的事情。这是我的终端响应:$railsserver=>BootingWEBrick=>Rails4.2.0applicationstartingindevelopmentonhttp://localhost:3000=>Run