Rank: Member
Joined: 12/1/2014(UTC) Posts: 19
Thanks: 2 times Was thanked: 2 time(s) in 2 post(s)
|
Hi, I have "OPC UA Embeded Server SDK Evalution Kit" on LPC4088 QuickStart Board. Using a standard "opcua_demo_v1_0_1" server software coming with it.
Two UA clients it hold with no problem. But third can not connect. Is soon as I disconnect one of the clients other can connect.
I use a different UA clients(browsers& my app).
Does this package has a network connection limitation?
|
|
|
|
Rank: Newbie
Joined: 4/1/2015(UTC) Posts: 1
|
Vladimir,
The demo server on the SDK evaluation kit has a hard coded connection limit of 10 connections. A 3rd connection should not fail based on that limit. It is possible, however, to run out of ram or processing time to respond to the connection in a timely fashion.
To get a better idea of what is happening, can you provide me with the UA error code from the UA client that is failing to connect? UA Error codes often represent a fairly specific cause.
Thanks,
--Colin Peart MatrikonOPC
|
|
|
|
Rank: Member
Joined: 12/1/2014(UTC) Posts: 19
Thanks: 2 times Was thanked: 2 time(s) in 2 post(s)
|
Colin, Hire is some error from different opc UA app:
OPC UA Viewer by CommServer. Error: BadSecureChannelClosed Id: BadSecureChannelClosed === Id: BadSecureChannelClosed
at Opc.Ua.Bindings.TcpAsyncOperation`1.End(Int32 timeout) at Opc.Ua.Bindings.TcpClientChannel.EndSendRequest(IAsyncResult result) at Opc.Ua.Bindings.TcpTransportChannel.EndSendRequest(IAsyncResult result) at Opc.Ua.Bindings.TcpTransportChannel.SendRequest(IServiceRequest request) at Opc.Ua.SessionClient.CreateSession(RequestHeader requestHeader, ApplicationDescription clientDescription, String serverUri, String endpointUrl, String sessionName, Byte[] clientNonce, Byte[] clientCertificate, Double requestedSessionTimeout, UInt32 maxResponseMessageSize, NodeId& sessionId, NodeId& authenticationToken, Double& revisedSessionTimeout, Byte[]& serverNonce, Byte[]& serverCertificate, EndpointDescriptionCollection& serverEndpoints, SignedSoftwareCertificateCollection& serverSoftwareCertificates, SignatureData& serverSignature, UInt32& maxRequestMessageSize) at Opc.Ua.Client.Session.Open(String sessionName, UInt32 sessionTimeout, IUserIdentity identity, IList`1 preferredLocales) at Opc.Ua.Client.Session.Open(String sessionName, IUserIdentity identity) at CAS.OPC.UA.Viewer.Controls.SessionOpenDlg.Open(Object state)
My app (based on your UA_CLIENT_SDK for Linux) on Server Sate Changed. Messages:
Server OnStateChanged.result.GetMessageId: 0x0 State: OPC Server: Connecting CreateConnection() result: false Server OnStateChanged.result.GetMessageId: 0x0 State: OPC Server: Cannot Connect Server OnStateChanged.result.GetMessageId: 0x0 State: OPC Server: Connecting Server OnStateChanged.result.GetMessageId: 0x0 State: OPC Server: Cannot Connect
your executable example from UA_CLIENT_SDK for linux: Enter the Number (1-2, 0): --------------------------------- Status
- No discovery server endpoints found.
Press any key to continue...
IX Developer (HMI Development tool support opc UA): opc_ua:Comm Error on URL: opc.tcp://xxx.xxx.xx.xx
All of them works fine if I have up to two clients.
|
|
|
|
Rank: Newbie
Joined: 12/1/2014(UTC) Posts: 7
Was thanked: 2 time(s) in 2 post(s)
|
Hi Vladimir,
I will perform some testing here to try to identify the issue and follow up with you next week.
Best regards,
Liam.
|
|
|
|
Rank: Newbie
Joined: 12/1/2014(UTC) Posts: 7
Was thanked: 2 time(s) in 2 post(s)
|
Hi Vladimir,
I've had a look into this for you and there is a limit in the TCP/IP stack that needs to be tweaked. This is very easy to do and the instructions are as follows:
In the MBED IDE open the file opcua_demo_v2/EthernetInterface/lwip/lwipopts.h
Add the following line to this file:
#define MEMP_NUM_NETCONN 10
Save, compile all and download to the board. You can now support more than two connections. If you want to support very many connections the TCP/IP stack configuration may need to be tweaked further as it has not been optimised for many connections and there may be other issues that need to be resolved.
Best regards,
Liam.
|
|
|
|
Rank: Member
Joined: 12/1/2014(UTC) Posts: 19
Thanks: 2 times Was thanked: 2 time(s) in 2 post(s)
|
Hi Liam, This tweak helped only partially. Now on my third connection I have this error:
OPC UA Viewer by CommServer. Error:
BadTooManySessions Id: BadTooManySessions
at Opc.Ua.ClientBase.ValidateResponse(ResponseHeader header) at Opc.Ua.SessionClient.CreateSession(RequestHeader requestHeader, ApplicationDescription clientDescription, String serverUri, String endpointUrl, String sessionName, Byte[] clientNonce, Byte[] clientCertificate, Double requestedSessionTimeout, UInt32 maxResponseMessageSize, NodeId& sessionId, NodeId& authenticationToken, Double& revisedSessionTimeout, Byte[]& serverNonce, Byte[]& serverCertificate, EndpointDescriptionCollection& serverEndpoints, SignedSoftwareCertificateCollection& serverSoftwareCertificates, SignatureData& serverSignature, UInt32& maxRequestMessageSize) at Opc.Ua.Client.Session.Open(String sessionName, UInt32 sessionTimeout, IUserIdentity identity, IList`1 preferredLocales) at Opc.Ua.Client.Session.Open(String sessionName, IUserIdentity identity) at CAS.OPC.UA.Viewer.Controls.SessionOpenDlg.Open(Object state)
But I have only two clients connected with a single session each.
PS. You mentioned opcua_demo_v2 (version 2). I have v1.1. Could you please send me v2?
Thank you.
|
|
|
|
Rank: Newbie
Joined: 12/1/2014(UTC) Posts: 7
Was thanked: 2 time(s) in 2 post(s)
|
Hi Vladimir,
This is just a server configuration issue. I'll send you an update via email along with e few steps you'll need to jump through in order to complete the update as V2 uses a different licensing method to V1.
Best regards,
Liam.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.