ukaea / UDA

Universal Data Access library to provide data over the network in a unified data object.
https://ukaea.github.io/UDA/
Apache License 2.0
11 stars 4 forks source link

[handshakeClient] [Protocol 10 Error (Client Block)] #37

Open DavidPCoster opened 4 months ago

DavidPCoster commented 4 months ago

Could someone explain why my server is seeing multiple messages of the form

[root@da239993f1a6 etc]# tail Error.log 1 [Thu Jun 20 06:51:54 2024] 2 20 [handshakeClient] [Protocol 10 Error (Client Block)] 1 [Thu Jun 20 06:52:04 2024] 2 20 [handshakeClient] [Protocol 10 Error (Client Block)] 1 [Thu Jun 20 06:52:14 2024] 2 20 [handshakeClient] [Protocol 10 Error (Client Block)] 1 [Thu Jun 20 06:52:24 2024] 2 20 [handshakeClient] [Protocol 10 Error (Client Block)] 1 [Thu Jun 20 06:52:34 2024] 2 20 [handshakeClient] [Protocol 10 Error (Client Block)] 1 [Thu Jun 20 06:52:44 2024] 2 20 [handshakeClient] [Protocol 10 Error (Client Block)] 1 [Thu Jun 20 06:52:55 2024] 2 20 [handshakeClient] [Protocol 10 Error (Client Block)] 1 [Thu Jun 20 06:53:05 2024] 2 20 [handshakeClient] [Protocol 10 Error (Client Block)] 1 [Thu Jun 20 06:53:15 2024] 2 20 [handshakeClient] [Protocol 10 Error (Client Block)] 1 [Thu Jun 20 06:53:25 2024] 2 20 [handshakeClient] [Protocol 10 Error (Client Block)] [root@da239993f1a6 etc]#

Currently 719974 records in Error.log contain 'handshakeClient'.

How can I fix whatever problem is causing this?

Thanks.

jholloc commented 4 months ago

Hi @DavidPCoster,

This error is usually seen when a connection is made to the server from outside of UDA, i.e. when running nc -z localhost 56565. This opens a connection and then closes it without sending a valid UDA handshake - which causes the server to close with an error.

The fact that this error is appearing every 10 seconds implies there is something somewhere 'pinging' the server every 10 seconds.

Cheers.

DavidPCoster commented 4 months ago

Looking at the docker configuration, I see

    healthcheck:
      test: "bash -c 'echo test > /dev/tcp/127.0.0.1/56565; exit $?'"
      start_period: 10s
      interval: 10s
      retries: 10

Do you think this is the cause?

If so, do we need to check the health this frequently? Is there a better way of testing the health of the server that doesn't fill the log file?

jholloc commented 4 months ago

Yes, that's definitely the cause.

I'm not sure what this 'healthcheck' is in the docker configuration, that would be a question for Poznan.

I think the underlying issue is that there needs to be some kind of log compression and deletion happening in the docker image to mitigate these kind of issues.

DavidPCoster commented 4 months ago

I have created an issue at PSNC:

https://gitlab.eufus.psnc.pl/containerization/imas/uda-demo/-/issues/3

Let's see if a resolution can be found ...