Hello.
I have a simple docker-compose setup with two containers: The “client” container contains the application that needs to perform TPM operations, and the “server” container contains the TPM simulator s/w that provides (emulates) TPM functionality. Every time that the application performs a TPM operation, it will create a TCP socket connection to the TPM simulator running in the other container, send the command and receive the response. The connection is closed after the operation is completed. The application performs the TPM operations sequentially, so there’ll be at most one “open” connection at a time.
Now, this all works fine. But only for a limited amount of time! After about ~1500 TPM operations, the next operation will suddenly fail with the following error:
socket_connect() Failed to connect to host 10.0.0.20, port 2321:
errno 99: Cannot assign requested address
And once an operation has failed with this error, all subsequent operations fail too, with the same error!
When I shut down and restart the complete docker-compose setup, then it will work again. But, again, only for ~1500 TPM operations, before the errors are back
The reason why I know that this must be some weird Docker issue (not a problem with the application) is because if I start a shell in the “client” container after the error has started, even a simple nc -zv 10.0.0.20 2321
will fail with “errno 99: Cannot assign requested address” too! If I run that very same command, also from within the “client” container, before the errors have started, all is good (nc
returns “open”). So, obviously, new socket connections from the “client” container to the “server” container are no longer possible, after a certain time has elapsed, for some weird reason.
I also started a shell in the “server” container and verified that the TPM simulator software is still up and running, and is ready to accept incoming connections. So, not a problem with the simulator software!
Is there any way to fix this ?!?!
Than youk