All Products
Search
Document Center

Function Compute:Must the listening port of a custom container runtime be the same as that of the HTTP server started in the custom container runtime?

Last Updated:Aug 20, 2025

Yes, the listening ports of the custom container and the HTTP server in the custom container must be the same. The default listening port (CAPort) of a custom container is 9000. If a custom container uses the default listening port, the listening port of the HTTP server started in the custom container must also be 9000. If the listening port of the custom container is 8080, the listening port of the HTTP server started in the custom container must also be 8080.

The HTTP server started in a custom container must listen on the 0.0.0.0:CAPort or *:CAPort port. If you select the 127.0.0.1:CAPort port, the request times out and the following error occurs:
{
"ErrorCode":"FunctionNotStarted",
"ErrorMessage":"TheCA'shttpservercannotbestarted:ContainerStartDuration:25000000000.PingCAfaileddueto:dialtcp21.0.5.7:9000:getsockopt:connectionrefusedLogs:2019-11-29T09:53:30.859837462ZListeningonport9000"
}