When I use cronjob with jdk8,the socket is not working,until 5s I must retry the socket can work normal!

Asking for help? Comment out what you need so we can get more information to help you!

I use kubernate cronjob run a java application, when job started , there is a exception " connect refused" with java new socket(’$address","$port") in application logs, My main thread must sleep 5s and more for await ,the socket will be working! Can u give me help or explain ,thanks a lot!

Cluster information:

Kubernetes version:
Cloud being used: (put bare-metal if not on a public cloud)
Installation method:
Host OS: centos
CNI and version: .
CRI and version: .

You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.