admin管理员组

文章数量:1417107

I'm using node-red to fetch some data from OPCUA server. For connection I'm using opcua browser node and listener node. the connection was working before but after the opcua server got restarted I'm getting this error and unable to connect.

Error: The connection may have been rejected by server,
Err = (Invalid message header detected)

Also in the container logs i can see this:

01:18:57.874Z :client_secure_channel_layer   :747   [NODE-OPCUA-W33]  client : server token creation date exposes a time discrepancy late by 1 hours 1 minutes 11.906 seconds
 ...                                                remote server clock doesn't match this computer date !
 ...                                                 please check both server and client clocks are properly set !
 ...                                                 server time :2025-02-03T00:17:45.005Z
 ...                                                 client time :2025-02-03T01:18:56.911Z
 ...                                                 transaction duration = early by 1.926 seconds
 ...                                                 server URL = opc.tcp://endpoint_ip:4840
 ...                                                 token.createdAt  has been updated to reflect client time

Nothing has changed in client side and also the administrator of server is able to connect to the server locally there.

I tried restarting the flow and reconfigured everything with the new node-red instance but the issue still persists. the certificates are also ok.

How can i fix this issue?

I'm using node-red to fetch some data from OPCUA server. For connection I'm using opcua browser node and listener node. the connection was working before but after the opcua server got restarted I'm getting this error and unable to connect.

Error: The connection may have been rejected by server,
Err = (Invalid message header detected)

Also in the container logs i can see this:

01:18:57.874Z :client_secure_channel_layer   :747   [NODE-OPCUA-W33]  client : server token creation date exposes a time discrepancy late by 1 hours 1 minutes 11.906 seconds
 ...                                                remote server clock doesn't match this computer date !
 ...                                                 please check both server and client clocks are properly set !
 ...                                                 server time :2025-02-03T00:17:45.005Z
 ...                                                 client time :2025-02-03T01:18:56.911Z
 ...                                                 transaction duration = early by 1.926 seconds
 ...                                                 server URL = opc.tcp://endpoint_ip:4840
 ...                                                 token.createdAt  has been updated to reflect client time

Nothing has changed in client side and also the administrator of server is able to connect to the server locally there.

I tried restarting the flow and reconfigured everything with the new node-red instance but the issue still persists. the certificates are also ok.

How can i fix this issue?

Share Improve this question edited Feb 3 at 18:31 hardillb 60k11 gold badges80 silver badges116 bronze badges asked Feb 3 at 1:43 RugvedRugved 112 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

(...) and also the administrator of server is able to connect to the server locally there.

You have a big time difference between client and server. From the server's point of view the client is in the future.
This can cause several unwanted side effects like that a new created certificate is seen as not yet valid or getting strange timestamps.

When this test is done locally on the server machine, then it is obvious that client and server use the same system time and thus have no time discrepancy.

Fix the system time of the machine which is out of sync.
I hope this solves the source of your problems.

本文标签: