File not Found on Linux-System

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
dreimannrouven
Jr. Member
Jr. Member
Posts: 3
Joined: 30 Oct 2020, 14:28

File not Found on Linux-System

Post by dreimannrouven »

Hello,

I'm trying to run our OpcUa-Server (with written in dotnet-core) on an Ubuntu 18.04. Following message appeared:

Code: Select all

devrjttadmin@devldevrjttp01:~/hermeneut$ ./Hermeneut
[10:53:05 INF] ServerManager started
[10:53:05 INF] OpcUaServer instantiated
[10:53:05 INF] Starting server.
[10:53:05 ERR] Cannot execute server
System.UnauthorizedAccessException: Access to the path '/usr/share/\unifiedautomation\UaSdkNet\pki\trusted' is denied.
 ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at System.IO.FileSystem.CreateDirectory(String fullPath)
   at UnifiedAutomation.UaBase.DirectoryCertificateStore..ctor(ISecurityProvider provider, CertificateStoreSettings settings)
   at UnifiedAutomation.UaBase.DefaultSecurityProvider.CreateCertificateStore(CertificateStoreSettings settings)
   at UnifiedAutomation.UaBase.ApplicationInstanceBase.CheckConfiguration(Boolean silent)
   at UnifiedAutomation.UaBase.ApplicationInstanceBase.Start(ServerBase server, WaitCallback callback, Object userData, Boolean silent)
   at Hermeneut.Endpoints.Servers.OpcUa.OpcUaServer.ConfigureAndStartServer()
[10:53:05 INF] ClientManager started
[10:53:05 INF] OpcUaClient instantiated
Press <enter> to exit the program.
It seems like a certificate is missing (and this path seems to be windows specific)

I also can not connect to this server via uaexpert.
When I start it on Windows, everything works like a charm.

Does anyone has an idea?

Thanks
Rouven

dreimannrouven
Jr. Member
Jr. Member
Posts: 3
Joined: 30 Oct 2020, 14:28

Re: File not Found on Linux-System

Post by dreimannrouven »

The Solution is to use Path.Combine() and copy all files to a specified location.
The variable %commonapplicationdata% points to C:\ProgramData in an windows 10 enviroment

dreimannrouven
Jr. Member
Jr. Member
Posts: 3
Joined: 30 Oct 2020, 14:28

Re: File not Found on Linux-System

Post by dreimannrouven »

*double* post

ricmoa
Jr. Member
Jr. Member
Posts: 1
Joined: 02 Dec 2020, 12:04

Re: File not Found on Linux-System

Post by ricmoa »

Great that you were able to fix this. This seems somewhat similar to a stopper that I'm currently getting. In Windows, the client works seamlessly. In Linux, it can't find the "application certificate".

May I ask, when you say the solution in your case was to change the path and copy all files to a specified location, what files did you mean (and did these include the certificate)? I'm able to change the path from %CommonApplicationData% to something else in Linux, but I don't know what to put in there, namely what certificate file.

Ricardo

Post Reply