I'm not sure exactly what you are expecting and how it is not working to your satisfaction. I suspect it is possible to figure that out from what you've provided, but I am finding it rather difficult so I suspect that making that easier may lead to more helpful responses.
For example, what does "i saw that the port '4444' was already openning by the shell script's program" mean? Is this based on running something like "netstat"? Perhaps if you show the command you ran and the part of the output that you noticed, then it will make your problem easier to understand.