12:47, EET
December 30, 2016
I have a OPA UA client that reads data from a Kepserver. It seems that when I’m disconnecting the client the subscriptions are still active in the server.
I’ve done the following steps to disconnect:
1 – subscription.setPublishingEnabled(false);
2 – subscription.removeItems();
3 – uaClient.removeSubscription(subscription);
4 – uaClient.disconnect();
Also I have set:
uaClient.setKeepSubscriptions(false);
Do I have to do anything else? Is someting wrong?
13:24, EET
April 17, 2013
Hello Bruno,
Initially this sounds like a bug in the server application. Have you already contacted Kepware about the issue?
Actually you don’t need to call anything else than UaClient.disconnect(). In CloseSession service, there’s a parameter “deleteSubscriptions” which tells the server if the subscriptions associated with the session should be deleted. As you mentioned, you can change the behaviour with UaClient.setKeepSubscriptions method. The default operation in Java SDK is that the client will request server to delete subscriptions.
Also, calling uaClient.removeSubscription(subscription) should delete the mentioned subscription so this is clearly a bug if the server does not delete the subscription.
12:53, EET
December 30, 2016
Hello Heikki,
Sorry about the delay but I was waiting for a return from Kepware, this is what they find:
****************
I finally got a chance to talk to a developer about this. There are actually 2 issues.
1. The Close channel request needs to have a timestamp in it.
2. The close channel type should be set to CLO per the specification. Their client is setting it to MSG and since the close secure channel message is not an MSG type it is being rejected as an invalid service.
Note: they need to correct the time stamp issue as well because that will result in an invalid message format error when it gets processed.
I attached an image to the case which should help.
****************
Can you help me understand it? Is there somthing I can do when creating the client? Or is sometinhg in the UA client?
13:32, EET
April 17, 2013
Hi Bruno,
Thank you for the information.
As for the issue 2: This is a known issue in SDK versions 2.2.0 and earlier.
This was fixed in version 2.2.2. Please see the release notes at https://downloads.prosysopc.com/opcua/release_notes2.2.2-638.html . The line “Fixed (Github #2): CloseSecureChannelRequest should be sent with CLOF header” is this issue.
As for the issue 1: The Java SDK (or actually Java Stack) works how described. However, we are currently not aware that the Close Secure Channel request header should have a timestamp in it.
The OPC UA specification version 1.03, part 4, table 165 describes the RequestHeader timestamp as “The time the Client sent the request. The parameter is only used for diagnostic and logging purposes in the server.” So, based on that part of the specification, it’s not clear that setting this timestamp should be mandatory. Also, we haven’t received similar complaints from other vendors.
Most Users Ever Online: 1919
Currently Online:
28 Guest(s)
Currently Browsing this Page:
2 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 730
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
HypromeImpupe, toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, DeakinModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1