Local Discovery Server with mDNS (LDS-ME v1.03) seems not to recognize changes in Opc.Ua.DiscoveryServer.Config.xml|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Local Discovery Server with mDNS (LDS-ME v1.03) seems not to recognize changes in Opc.Ua.DiscoveryServer.Config.xml
Avatar
Paris
New Member
Members
Forum Posts: 1
Member Since:
07/18/2016
sp_UserOfflineSmall Offline
1
07/28/2016 - 09:16
sp_Permalink sp_Print sp_EditHistory

Hello,

I'm working on an OPC UA client and would like to use the FindServersOnNetwork feature of the LDS-ME server. By now my client is able to get the registered OPC UA server over the FindServers method, however when I invoke the FindServersOnNetwork method I get a StatusException 'Socket was closed gracefully' and InnerStatus 'BadSecureChannelClosed'. I think the reason for that is that I haven't implement a certificate creation feature to my client yet. Since you get the Discovery Endpoints from the LDS-ME which can be configured to use certificate authentication by themself I do not understand why this is the default configuration of the LDS-ME. I found on 'http://opcfoundation-onlineapplications.org/ProfileReporting/index.htm?ModifyProfile.aspx?ProfileID=61dff98c-25d8-48a0-93e8-bbb429b3a3ab' that there is a ServerSecurityPolicy specified for connecting without authentication but it is not implemented in the 'Opc.Ua.DiscoveryServer.Config.xml' after a standard installation of the LDS-ME. So I added the following ServerSecurityPolicy but when I'm trying to connect with the 'OPC Foundation Sample Client' to 'opc.tcp://localhost:4840' the added ServerSecurityPolicy is not visible. Here the added ServerSecurityPolicy:

<SecurityPolicies>
      <ServerSecurityPolicy>
        <SecurityMode>None</SecurityMode>
        <SecurityPolicyUri>https://opcfoundation.org/UA/S.....ri&gt;
        <SecurityLevel>0</SecurityLevel>
      </ServerSecurityPolicy>
      ...
</SecurityPolicies>

I also noticed that the LDS-ME is not reacting to changes to the BaseAddresses. If I change the port from 4840 to 4842 for example the LDS-ME is still listening to port 4840 although I restarted the LDS-ME service in the Services window.

<BaseAddresses>
      <ua:String>opc.tcp://localhost:4842/UADiscovery</ua:String>
      <ua:String>https://localhost:4843/UADisco.....ng&gt;
      <ua:String>http://localhost:52601/UADisco.....ng&gt;
</BaseAddresses>

Is there another config file or why is the LDS-ME not reacting to the Opc.Ua.DiscoveryServer.Config.xml? Is it possible to use a 'None' SecurityMode somehow?

In the documentation of the LDS-ME (file:///C:/Program%20Files%20%28x86%29/Common%20Files/OPC%20Foundation/UA/Discovery/doc/index.htm) it is specified to use the 'C:\ProgramData\OPC Foundation\UA\Discovery\pki' folder however in the 'OPC Foundation Configuration Tool' the folder '%CommonApplicationData%\OPC Foundation\CertificateStores\UA Certificate Authorities' is going to be used.

Why are there to different folders and which of them should be used?

For my client implementation I'm using the 'Unified Automation SDK .NET 2.5.0.378' with '.Net 4.6.1' as target system on a Windows 7 x64 machine with Visual Studio Professional 2013.

The following code snippet shows the working FindServers invocation where no authentication is needed and where the registered OPC UA server is showing up and the FindServersOnNetwork invocation where the described exception appears:

    Discovery discovery = new Discovery();
    string discoveryUrl = "opc.tcp://" + "localhost" + ":4840" +"/UADiscovery";

    List serversOnPc = discovery.FindServers(discoveryUrl);
    foreach (ApplicationDescription a in serversOnPc)
    {
        Console.WriteLine(a.ApplicationName.ToString(), Environment.NewLine);
    }
           
    List serversOnNetwork = discovery.FindServersOnNetwork(discoveryUrl);
    foreach (ServerOnNetwork a in serversOnNetwork)
    {
        Console.WriteLine(a.ServerName.ToString(), Environment.NewLine);
    }

Cheers 🙂

Avatar
Zbynek Zahradnik
Member
Members
Forum Posts: 62
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
2
10/31/2016 - 10:06
sp_Permalink sp_Print

Hello, it is possible that I have encountered the same issue and posted it here (https://opcfoundation.org/foru.....yrejected/ ), before finding your post.

May I ask, have you found some solution ?

 

Regards

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: David Puffer
Guest(s) 52
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855