The listening port of a custom runtime must be the same as that of the HTTP server of the custom runtime. The default listening port of a custom runtime is port 9000. If a custom runtime uses the default listening port, the listening port of its HTTP server must be port 9000. If the listening port of the custom runtime is port 8080, the listening port of its HTTP server must be port 8080.
HTTP services that are started in a custom runtime must listen on 0.0.0.0:CAPort or *:CAPort. If you use the 127.0.0.1:CAPort port, a timeout error occurs, and the following error is returned:
{
"ErrorCode":"FunctionNotStarted",
"ErrorMessage":"TheCA'shttpservercannotbestarted:ContainerStartDuration:25000000000.PingCAfaileddueto:dialtcp21.0.5.7:9000:getsockopt:connectionrefusedLogs:2019-11-29T09:53:30.859837462ZListeningonport9000"
}