开发者社区> 问答> 正文

函数计算custom container错误如何处理

已解决

函数计算custom container错误如何处理

展开
收起
提个问题 2024-06-03 11:07:29 11 0
1 条回答
写回答
取消 提交回答
  • 开发者社区问答官方账号
    官方回答
    采纳回答
    Custom Container Runtime启动的服务一定监听 0.0.0.0: CAPort或者 *:CAPort端口,不用使用127.0.0.1:CAPort, 会导致请求超时。 
    {"ErrorCode":"FunctionNotStarted","ErrorMessage":"The CA's http server cannot be started:ContainerStartDuration:25000000000. Ping CA failed due to: dial tcp 21.0.5.7:9000: getsockopt: connection refused Logs : 2019-11-29T09:53:30.859837462Z Listening on port 9000\r\n"} 其中 CAPort 是用户创建函数自定义的,默认是9000。
    Custom Container Runtime 启动的服务中如果调用了第三方服务的话,需要注意该第三方服务是否有网络限制,如果有网络限制会导致没有走到 启动 server 的逻辑,出现如下异常 
    {"ErrorCode":"FunctionNotStarted","ErrorMessage":"The CA's http server cannot be started:ContainerStartDuration:25000000000. Ping CA failed due to: dial tcp 21.0.3.1:9000: getsockopt: connection refused"}
    您实现的http server本身消耗的时间很长,35s 内也无法成功启动 http server, 建议您优化 http server 启动速度,详细可点此参考
    2024-06-03 11:07:30
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Serverless开发平台: 让研发效能再提升 立即下载
Serverless 引领云上研发新范式 立即下载
All in Serverless 阿里云核心产品全面升级 立即下载