node-opcua-logger icon indicating copy to clipboard operation
node-opcua-logger copied to clipboard

Multi OPC Server and auto-reconnect

Open Maddin-619 opened this issue 6 years ago • 3 comments

For my use case I need to log data form diffrent opc ua server so I made a few changes that you can config multiple opc ua endpoints with their datapoints you want to log in the config file.

When a opc ua server restarts the connection should be reestablished automatically with all the monitored itmes. The opc ua npm package unfortunately dosen't do that. I tested with python-opcua Server. The solution is a little bit hacky: When the opc ua server comes back up the client object gets newly initialized.

Maddin-619 avatar Oct 02 '18 09:10 Maddin-619

Reconnection no work for me. Freeze in this message:

Timeout .... waiting for response for PublishRequest { /RequestHeader/

authenticationToken /* NodeId */: ns=0;b=0e28be824eff8be6ad9a2f71c0e870394c530565d9e50ff321bf04dfefda7cd9

timeStamp /* UtcTime */: 2019-07-25T16:51:14.060Z

requestHandle /* IntegerId */: 747 0x2eb

returnDiagnostics /* UInt32 */: 0 0x0

auditEntryId /* UAString */:

timeoutHint /* UInt32 */: 60000 0xea60

additionalHeader /* ExtensionObject */: null

};

visued avatar Jul 25 '19 17:07 visued

Can you give me more information. Which server? Is it freezing when loosing connection or when Server is up again? This reconnect mechanism listens on the event when server gets back up and than initializes new client connection. I will check it tomorrow. Maybe there is now a better solution provided by the opc ua stack. Last year there was no way to get the monitored items automaticly reconnecting.

Maddin-619 avatar Jul 25 '19 19:07 Maddin-619

Can you give me more information. Which server? Is it freezing when loosing connection or when Server is up again? This reconnect mechanism listens on the event when server gets back up and than initializes new client connection. I will check it tomorrow. Maybe there is now a better solution provided by the opc ua stack. Last year there was no way to get the monitored items automaticly reconnecting.

Free when loosing connection... I runing in container docker, when server OPCUA restart node logger freeze, i need restart container for node logger running normally.

visued avatar Jul 28 '19 22:07 visued