全部產品
Search
文件中心

Function Compute:Custom Runtime的監聽連接埠一定要和HTTP Server的監聽連接埠一致嗎?

更新時間:Jul 06, 2024

是的。Custom Runtime的監聽連接埠(CAPort)預設是9000。如果Custom Runtime使用預設的監聽連接埠,那麼您實現的Custom Runtime的HTTP Server監聽的連接埠也必須是9000。 如果Custom Runtime使用的監聽連接埠是8080,那麼您實現的Custom Runtime的HTTP Server監聽的連接埠也必須是8080。

Custom Runtime啟動的HTTP Server一定要監聽0.0.0.0:CAPort*:CAPort連接埠。如果您使用127.0.0.1:CAPort連接埠,會導致請求逾時,出現以下錯誤:
{
"ErrorCode":"FunctionNotStarted",
"ErrorMessage":"TheCA'shttpservercannotbestarted:ContainerStartDuration:25000000000.PingCAfaileddueto:dialtcp21.0.5.7:9000:getsockopt:connectionrefusedLogs:2019-11-29T09:53:30.859837462ZListeningonport9000"
}