Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Reading Time

More
05 Jul 2017 18:36 #5311 by support
Replied by support on topic Reading Time
Dear Sir,
thank you for this post. You are right - at least, in this case you have described.

It should be noted that Live Mapping, in order to be able to operate in a generic way, by its very definition, must rely primarily on browsing paths. Only browsing paths can guarantee, that an identification of a mapped member can be composed together, using data about its parent, and about the current member. In order for this to work in OPC UA, at some point the browse paths need to be translated to Node IDs - which is the call you are describing.

Whether and how much the TranslateBrowsePathsToNodeIds is demanding on the server side is completely server specific. For some servers, it may be an easy and fast operation. For other servers, it can be expensive. And, it can be expensive because either a) the developers have not implemented it well, or b) because the nature of the underlying device/protocol makes it so (in such case the developers have no way to make it fast).

This was one of the reasons we have, in addition to browse paths, also allowed the Live Mapping to work directly with Node IDs, using the "template" concept. Luckily, you were able to use it in your case, so - good for you. It should be noted, however, that (again, depending on the server), it is not always applicable. The Node IDs that the server uses may be completely unrelated - for example, the server might be using a unique integer for each node, and you would have no way of guessing that integer from the ID of the parent node and a name of your member.

One last note: I have some doubts about whether, in your particular case, the expensiveness of the TranslateBrowsePathsToNodeIds is truly a necessity. The fact is that what the TranslateBrowsePathsToNodeIds call gets on input is in principle similar to the structure of your NodeIdTemplatString. Why then should interpreting it be much more expensive than interpreting the Node ID is not clear to me.

Best regards

Please Log in or Create an account to join the conversation.

More
05 Jul 2017 15:12 #5310 by Captain_Dash
Replied by Captain_Dash on topic Reading Time
To whom it may concern or is interested in a solution for this issue, I wanted to give a little hint how you can overcome the problem. I will try to translate and explain as good as I understood the issue.

We talked about this issue with the vendor of the opc ua server and they told us that from the server point of view the TranslateBrowsePathsToNodeIdsRequest is a very, very expensive operation. In our case the server tried to allocate and free memory in the kernel space which is not a quick operation and in this short example this invokes about 5000 of this operations. Instead of using browsepaths we are now using the nodeids which speeds up this operation to under 2 seconds for the first call and even faster for every further call of the read method.

Here a little code snippet:
 axisDescriptor = new UANodeDescriptor
                    {
                        NodeId = new UANodeId(NodeId)
                    };
 
                    lock (MapLock)
                    {
                        clientMapper.Map(MappedObjectInternal,
                            new UAMappingContext
                            {
                                EndpointDescriptor = ServerInstance.DiscoveryUriString,
                                NodeDescriptor = axisDescriptor,
                                NodeIdTemplateString = "$(ParentNodeId)$(BrowseName)",
                                MonitoringParameters = 250
                            });
                    }
 
                    clientMapper.Subscribe(true);
                    clientMapper.Read();

Please Log in or Create an account to join the conversation.

More
09 Jun 2017 09:28 #5217 by support
Replied by support on topic Reading Time
No problem.
Upload instructions sent by email.

Best regards

Please Log in or Create an account to join the conversation.

More
08 Jun 2017 09:36 #5215 by Captain_Dash
Replied by Captain_Dash on topic Reading Time
I would like to send you the logs for a quick look to verify that I reported it correctly and not missed something important. Maybe you can see why and where the BadSessionIdInvalid failure is occurring.

By the way a big thank you for your patience and effort.

Please Log in or Create an account to join the conversation.

More
07 Jun 2017 17:04 #5210 by support
Replied by support on topic Reading Time
Well, if the client had sent a request and it took 77 seconds to receive a response, you need to look for the reason in the network or in the server. I cannot help you much with that.

If needed, I can provide you with a way to deliver us the logs confidentially. But with what you have just described, I think that you should first look for reasons elsewhere. For example, you can put Wireshark on both sides, and by doing that, determine whether the cause for such enormous delay is in the network, or in the server.

Please Log in or Create an account to join the conversation.

More
07 Jun 2017 16:23 #5209 by Captain_Dash
Replied by Captain_Dash on topic Reading Time
I repeated the recordings on another pc which can be resolved by the dns.

What I can see in Wireshark now is that

UA Secure Conversation Message: TranslateBrowsePathsToNodeIdsRequest


was send from the client and after about 77 seconds the client received

UA Secure Conversation Message: TranslateBrowsePathsToNodeIdsResponse


Then the client sent a read request

UA Secure Conversation Message: ReadRequest


and receives

UA Secure Conversation Message: ServiceFault


with the ServiceResult BadSessionIDInvalid.

Please Log in or Create an account to join the conversation.

More
07 Jun 2017 11:29 #5201 by Captain_Dash
Replied by Captain_Dash on topic Reading Time
yes, we did this serious diagnosis as I pointet out at the beginning of my last post. Unfortunately we are not able to see where the problem explicit should be. The Response of the server came up late and the client tried to reset the connect after 70 seconds. Then they transfered data but still the BadSessionIdInvalid error occur. I could send you what wireshark recorded, but this file we do not want to be seen public in this forum.

Please Log in or Create an account to join the conversation.

More
07 Jun 2017 10:37 - 07 Jun 2017 10:58 #5199 by support
Replied by support on topic Reading Time
Most likely the cause of errors is in the networking infrastructure. "The requested name is valid, but no data of the requested type was found" typically occurs when the host name cannot be resolved (through DNS or WINS).

For a serious diagnosis, please follow the instructions I have given in earlier post(s).
Last edit: 07 Jun 2017 10:58 by support.

Please Log in or Create an account to join the conversation.

More
07 Jun 2017 09:49 #5198 by Captain_Dash
Replied by Captain_Dash on topic Reading Time
Hello,

we are still not able to get to the ground of our issues. We recorded some information with wireshark but cannot find the origin of the failure. The client sends a Hello message several times with a time diference of 15 seconds, and the acknowledge message will not be received. Then a Reset will be send multiple times and afterwards the Hello message receives the acknowledge message, data will be transfered but we're still receiving errors in our application.

Something like "BadSessionIdInvalid"

I could send you the wireshark recording, but i do not want to load it up here for the public viewers.

Since yesterday the behavior changed to worse. I am not aware of changes on the code but we are receiving errors when we want to discover the server by name.

UAException

"An OPC-UA operation failure with error code -1 (0xFFFFFFFF) occurred, originating from 'Opc.Ua.Core'. The inner exception, of type 'System.Net.Sockets.SocketException', contains details about the problem."


SocketException

"The requested name is valid, but no data of the requested type was found"


Can you say something to this error?

Best Regards

Please Log in or Create an account to join the conversation.

More
24 May 2017 09:17 #5179 by support
Replied by support on topic Reading Time
OK, I understand.

Please see kb.opclabs.com/Collecting_information_for_troubleshooting .

Best regards

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.099 seconds