首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在使用Docker/Node加载时,是什么导致ESOCKETTIMEDOUT或ECONNREFUSED错误?

在使用Docker/Node加载时,是什么导致ESOCKETTIMEDOUT或ECONNREFUSED错误?
EN

Stack Overflow用户
提问于 2017-12-12 10:58:17
回答 1查看 6K关注 0票数 0

在docker上运行的Node API在加载时会出现ESOCKETTIMEDOUT或ECONNREFUSED错误。当我们从节点接口调用.NET接口时,就会发生这种情况。

代码语言:javascript
复制
{   [-] 
         _anonFuncCount:     3  
         _body:  {"events":[{"serviceCategoryCode":{"codeValue":"core"},"eventNameCode":{"codeValue":"clock.punch","shortName":"Clock Punch"},"data":{"eventContext":{"associateOID":"","workAssignmentId":""},"transform":{"clockEntry":{"deviceDateTime":"2017-12-10T18:21:46-04:00","entryDateTime":"2017-12-10T18:21:46-04:00","actionCode":{"codeValue":"clockout","shortName":"clockout"},"laborAllocations":[]}}}}]} 
         _cacheURL:  /api/offlinePunch  
         _clen:  424    
         _consuming:     true   
         _contentType:   application/json   
         _currentHandler:    handler-2  
         _currentRoute:  postapiofflinepunch100 
         _dtraceId:  5276   
         _dumped:    false  
         _events:   {   [+] 
        }   
         _eventsCount:   4  
         _matchedVersion:    1.0.0  
         _negotiator:   {   [+] 
        }   
         _parsedBody:    true   
         _readBody:  true   
         _readableState:    {   [+] 
        }   
         _time:  1512958462607  
         _timerMap: {   [+] 
        }   
         _url:  {   [+] 
        }   
         _version:   \x7e1  
         body:  {   [+] 
        }   
         client:     ~socket    
         complete:   true   
         connection:     ~socket    
         context:    ~params    
         domain:     null   
         headers:   {   [+] 
        }   
         httpVersion:    1.1    
         httpVersionMajor:   1  
         httpVersionMinor:   1  
         log:    ~socket~_httpMessage~log   
         method:     POST   
         params:    {   [+] 
        }   
         query: {   [+] 
        }   
         rawBody:    {"events":[{"serviceCategoryCode":{"codeValue":"core"},"eventNameCode":{"codeValue":"clock.punch","shortName":"Clock Punch"},"data":{"eventContext":{"associateOID":"","workAssignmentId":""},"transform":{"clockEntry":{"deviceDateTime":"2017-12-10T18:21:46-04:00","entryDateTime":"2017-12-10T18:21:46-04:00","actionCode":{"codeValue":"clockout","shortName":"clockout"},"laborAllocations":[]}}}}]} 
         rawHeaders:    [   [+] 
        ]   
         rawTrailers:   [   [+] 
        ]   
         readable:   false  
         route: {   [+] 
        }   
         serverName:     time-clocking-api  
         socket:    {   [+] 
        }   
         statusCode:     null   
         statusMessage:  null   
         timers:    [   [+] 
        ]   
         trailers:  {   [+] 
        }   
         upgrade:    false  
         url:    /api/offlinePunch  
         uuid:   f008be5d-ee11-4e1e-8ae4-afa47dc5e587   
    }   
EN

回答 1

Stack Overflow用户

发布于 2018-03-07 02:53:05

这很可能是由于here的相同问题造成的。此外,here很好地解释了node中发生的事情。您可能需要在Docker Container中设置UV_THREADPOOL_SIZE。

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

https://stackoverflow.com/questions/47764703

复制
相关文章

相似问题

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