Closed Coobik closed 6 years ago
I'll take a look and see if I can reproduce the errors. It's possible that the Node server is sending an array value larger than the configured default, which would account for the first error you saw, and possibly many stranger errors beyond that point.
This server you've provided is not responding with either Milo or UaExpert
Hi, just checked the server opc.tcp://opcuademo.sterfive.com:26543 and it responds. after I created subscription to nodes ns=1;s=FanSpeed and ns=1;s=Pressure i am getting: unknown builtin type: 0, unknown builtin type: 45 on the second run, the errors are: max array length exceeded (length=187518659, max=65535)
Can you get a Wireshark capture? I'm going to check with IT and see if something is blocked on our network now...
Prosys client is able to communicate with this server:
here is the trace: $ traceroute opcuademo.sterfive.com traceroute to opcuademo.sterfive.com (145.239.218.238), 64 hops max, 52 byte packets 1 172.23.71.1 (172.23.71.1) 3.733 ms 4.707 ms 4.302 ms 2 156.67.50.1 (156.67.50.1) 2.529 ms 2.681 ms 1.973 ms 3 80.91.186.21 (80.91.186.21) 15.889 ms 16.189 ms 13.861 ms 4 5 be100-2.var-5-a9.pl.eu (91.121.215.208) 28.830 ms be100-1102.fra-1-a9.de.eu (213.251.128.113) 47.592 ms 47.222 ms 6 be105.gra-g1-nc5.fr.eu (213.186.32.212) 56.354 ms 57.098 ms be100-1167.ams-1-a9.nl.eu (91.121.215.192) 54.647 ms 7 8 9 10 * 11 ocl11.e-c.com (217.182.192.56) 56.799 ms 60.996 ms 54.869 ms 12 ip238.ip-145-239-218.eu (145.239.218.238) 58.366 ms 57.021 ms 56.342 ms
Yes, they started blocking outbound traffic on unknown ports recently. I'll be able to connect and test shortly.
Thank you, I see what's going wrong. The encoder/decoder for DataValue does not handle when the picosends fields are present. I'm not sure how this has gone undiscovered for so long.
This should be fixed on master now. Thanks again.
@kevinherron , I am glad our public server did help finding this isssue 😃
@erossignon Yep, thanks! You're the only server I've encountered so far using picoseconds... even at the interop events nobody has used them.
For the record, it seems that Ignition by Inductive Automation Version: Ignition-7.9.7 is affected by this bug.
Yep, covered here: https://forum.inductiveautomation.com/t/node-opc-ua-does-not-work/17953/13
Milo 0.2.1 has been integrated for the 7.9.8 release.
@erossignon while it's nice that it exposed a bug, have you considered that your stack should not be including picoseconds by default? You certainly don't actually have that kind of resolution and you're increasing the size of every data transmission by doing so.
Picoseconds might be usuful to distinguish values that change faster than the standard clock resolution ( usually 1ms, depending on your system &/or language).
@erossignon Yes, that's their purpose, but the resolution of the UTC time in OPC UA is already in nanoseconds. None of the platforms NodeJS will run on (or Java, or the vast majority of things OPC UA will actually run on in the real world) have picosecond resolution, which makes including it by default somewhat nonsensical. It implies a precision and resolution of the timestamp that is simply not true.
@kevinherron , you have a point here ! picoseconds is not at all practical and representative at all.
As you know we do need a system clock clock which is monotonically increasing to apply timestamps to dataValue.
OPCUA specifies that Date are encoded as "double" value which represent nano seconds.
Unfortunalty , the standard javascript DateTime object has a resolution of 1 milliseconds which is 10000 time less accurate than the 100 nano resolution of OPCUA Date.
node-opcua "unconventionally" uses picosecond to disambiguate and distinguished between two ticks that returns the same milisecond value.
This being said picoseonds encoding are part of the spec since 1.01 ...
I also agreed that this negatively impact the size of binary encoded datavalue by 2x16bits.
I'll try to improve on my end and apply the désambiguïsation number to the nano part of the date instead. ( i have opened https://github.com/node-opcua/node-opcua/issues/483 for this)
Thanks for the tip
@erossignon Sounds good 👍
FYI, dates are encoded as 64-bit integers. You may be thinking of the Duration
simple/alias type, which is encoded as a Double
.
Hi all,
I've tried to use Eclipse Milo to create a simple OPC UA java client. Found a public demo server at opc.tcp://opcuademo.sterfive.com:26543 (Sterfive is a company behind NodeJS implementation https://node-opcua.github.io so I think this server runs on NodeJS) This server has several nodes with the constantly changed values.
I've set up Milo using Gradle: https://mvnrepository.com/artifact/org.eclipse.milo/sdk-client compile group: 'org.eclipse.milo', name: 'sdk-client', version: '0.1.6'
then connected to that server and subscribed to 2 nodes: ns=1;s=FanSpeed and ns=1;s=Pressure
On most responses from that server, I get an error in the log. Errors may be different, here are the common ones:
I've tried some other public OPC UA servers and they appear to be OK: https://github.com/node-opcua/node-opcua/wiki/publicly-available-OPCUA-servers
Prosys OPC UA Client app is able to handle Sterfive server without issues. https://downloads.prosysopc.com/opc-ua-client-downloads.php
I am trying to understand, are there different versions of message format and is there an ability to switch them? Can anybody advise? Thanks!
Here are my observations from the Milo source code: