当我执行运行在Docker容器中运行的nodemon服务器的restful请求时,我收到此错误:
12 Nov 14:41:37 - [nodemon] v1.2.1
12 Nov 14:41:37 - [nodemon] to restart at any time, enter `rs`
12 Nov 14:41:37 - [nodemon] watching: *.*
12 Nov 14:41:37 - [nodemon] starting `node api.js -c config.json`
Server listening on port 8002
[2014-11-12T14:41:41.359Z] TRACE: API/284 on ee7afec994f4: running _sanitizePath
[2014-11-12T14:41:41.363Z] TRACE: API/284 on ee7afec994f4: running ?
[2014-11-12T14:41:41.364Z] INFO: API/284 on ee7afec994f4: Got request: PUT /authentications/password
[2014-11-12T14:41:41.370Z] TRACE: API/284 on ee7afec994f4: running ?
[2014-11-12T14:41:41.371Z] TRACE: API/284 on ee7afec994f4: running bunyan
[2014-11-12T14:41:41.374Z] TRACE: API/284 on ee7afec994f4: running readBody
[2014-11-12T14:41:41.381Z] TRACE: API/284 on ee7afec994f4: running parseBody
[2014-11-12T14:41:41.382Z] TRACE: API/284 on ee7afec994f4: running parseQueryString
[2014-11-12T14:41:41.383Z] TRACE: API/284 on ee7afec994f4: running gzip
[2014-11-12T14:41:41.393Z] TRACE: API/284 on ee7afec994f4: running ?
[2014-11-12T14:41:41.397Z] TRACE: API/284 on ee7afec994f4: running PUT_password
[2014-11-12T14:41:41.435Z] TRACE: API/284 on ee7afec994f4: response::send entered (code=200, headers={})
Error: connect ECONNREFUSED
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
[2014-11-12T14:41:41.443Z] TRACE: User API/284 on ee7afec994f4: response sent
HTTP/1.1 500 Internal Server Error
HTTP/1.1 500 Internal Server Error
Content-Encoding: gzip
Content-Type: application/json
Date: Wed, 12 Nov 2014 14:41:41 GMT
Connection: keep-alive
Transfer-Encoding: chunked
[2014-11-12T14:41:41.444Z] DEBUG: API/284 on ee7afec994f4: (req_id=0401aad0-6a7a-11e4-b06d-77810fe1ae21)
Error: connect ECONNREFUSED
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
我打开了所有可以想到的端口。
我还可以手动卷曲容器内的端点并获得正确的响应。似乎错误发生在节点实例
中他们有没有工作原因并抛出此错误?