Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Matthias Max
@bitflower
And this is with node-opcua: it receives an update all 3 minutes without a value change:
prosys_wireshark_node.gif
Andreas Heine
@AndreasHeine
thats strange... can you compare thr create subscription / create monitored item req/res !? there must be some parameter different!
Etienne
@erossignon
@bitflower i am noticing that each packet have a different subscription id. It should be the same. Can you share your code for review ? There must be something wrong with the way you're creating subscription.
I would like to get a viee on the create subscription transaction . Can you share the wireshark capture in private ?
Matthias Max
@bitflower
I think you are both on to something here... Investigating.
Sure, I will share in DM.
Matthias Max
@bitflower
Close to having it solved. This is executed every 3 min from MY code:
image.png
Matthias Max
@bitflower
Here's my code (remove a few bits that are related to my backend)
https://gist.github.com/bitflower/77529de473246498d3a5c4fab5f31f34
Matthias Max
@bitflower
"Create" calls resulting from my code:
Bildschirmfoto 2020-12-16 um 21.34.55.png
Bildschirmfoto 2020-12-16 um 21.36.01.png
"Create" calls from Prosys:
Bildschirmfoto 2020-12-16 um 21.37.33.png
Bildschirmfoto 2020-12-16 um 21.38.24.png
The 2 differ in "MaxNotificationsPerPublish" and "Priority"
Matthias Max
@bitflower
Aha, just found something "faulty" (and sorry for spamming this channel):
image.png
Matthias Max
@bitflower
I haven thousands of them every few milliseconds.
Matthias Max
@bitflower
It seems that after roughly 3 min my process crashes and restarts which causes my impression of the "automatic 3 min event"
Matthias Max
@bitflower
I just found a whole other suspect in the OpenSecureChannelResposnse which might be my root cause:
Bildschirmfoto 2020-12-16 um 22.53.33.png
Could this be related to all my issues? On the other hand I can read values successfully. It's not that my whole connection isn't "certified" or so.
Andreas Heine
@AndreasHeine
if you have SecurityPolicy.None and MessageSecurityMode.None the cert does not matter
Matthias Max
@bitflower
image.png
Yep, Prosys has the <MISSING> there too.
I'm trying the most simple example this morning to exclude any of my logic faults.
Matthias Max
@bitflower
Hi @all, just wanted to let you know that my issue is solved. I had set a "requestedSessionTimeout" to 5000 somewhere deep in my code and that caused the sessions to fail. They usually are around 60000.... Thanks so much all for taking the time to get back to me and try to help!
Jérôme
@jeromevalentin
Hi @erossignon , I'm using the last version 2.28.3 of node-opcua, and I've got the following log (CANCELING TIMEOUT PUBLISH REQUEST) that appears sometime in the console. What does it mean exactly? Is that normal? Or did I miss to declare a listener somewhere to catch those kinds of logs? Thanks in advance for your help, and by the way thanks for this amazing library ;)
Andreas Heine
@AndreasHeine
@bitflower is the problem really solved? or sceduled to the future (longrun)!
Matthias Max
@bitflower
@AndreasHeine I appreciate the humor :-D As fundamental as this blocked me I see as resolved for now. My solution needs a bit more robustness though - that's for sure. But I learned a lot and would know much better how to act next time ;-) Havin' you guys is really worth so much. Thank you
Etienne
@erossignon

@jeromevalentin There could be several causes here:

  • server not being responsive
  • subscription with no monitored item
    I would need more information about your usage, : what is the server ? How many subscriptions ? How many subscriptions.

Usually this warning can be ignored, but it show some behavior that may hide a wider problem so it is good to understand what is causing it.

Jérôme
@jeromevalentin
@erossignon I'm using node-opcua as server, and UA Expert as client most of the time to test my server implementation, on the field the server may be accessed by all other OPC UA client. This log appears more frequently when other clients are connected. I was testing Matrikon Flex client from my phone, when I got this log on server side. Concerning subscription, I was only monitoring three or four items.
Etienne
@erossignon
@jeromevalentin One other case that could cause this message is when clients that connect to the server are interrupted abruptly and do not close session properly. (CTRL+C + or crash)
Matthias Max
@bitflower
Hey guys, happy new year every one :-)
image.png
I'm wondering how you solved the issue of re-connecting to an OPC server. For example right now my script exists if the given server is not available.
4 replies
Matthias Max
@bitflower
Just came across async module which seems to be used in node-opcua anyway. Also backoff seems to be used.
Etienne
@erossignon
@bitflower you can pass connectionStrategy parameter to your client constructor, this will control the number of time and how often node-opcua will retry to connect , by default it will try indefinitely , unless the connection.url is malformed , in which case the connect method will raise an expection
Matthias Max
@bitflower
image.png

@erossignon hi, thanks for getting back. With "indefinitely" you mean that it is not an exact timeout value?

I did some research and found that it does error every few minutes and pm2 grabs up to restart (see above)

1 reply
Etienne
@erossignon
Look at the log ... to understand why your client is crashing
Matthias Max
@bitflower
I know why it is crashing. I all makes complete sense (the machine I'm connecting to is switched of around 17:00 when the workers go home....)
Thanks so much for clarifying though!
Matthias Max
@bitflower
I have another question regarding ClientMonitoredItem: Will this send an initial event with the latest value upon setup of the item? Or just when actual changes to the value occur? I have the impression that I get the most recent value once no matter when that changed in the past.
4 replies
image.png
Matthias Max
@bitflower
I think I found the issue why I was getting an initial changed event. My code immediately registered the .on() after creating the monitoredItem. It now looks like this and doesn't emit an inital event anymore:
image.png
Is this the right way to do it? Or should the monitored item not emit initially when there wasn't a change? We are talking about a bale press here. Like a change every 10-30 minutes.