Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not send an Open Secure Channel request on Windows server 2019 #455

Closed
alonsors-809 opened this issue May 13, 2020 · 2 comments
Closed
Assignees
Labels
bug Something isn't working need more information Needs more information

Comments

@alonsors-809
Copy link

alonsors-809 commented May 13, 2020

Hi,

I am trying to connect the opc publisher with the opc server using certificates, but I am unable to. Both the server and the publisher are on the same Windows server 2019 machine. The folder pki/own contains the certificate that is auto created when the module runs and then I add the certificate of the server-client on the trusted folder. I set the Security Mode: true on the publishednodes_opcplc.json. I don’t know if I am missing a step installing certificates on the machine or something like that.

This is the Create Container Options of the module:

"Cmd": [
"publisher",
"--pf=/appdata/publishednodes_opcplc.json",
"--to",
"--aa",
"--at=Directory",
"--ih=Amqp_Tcp_Only",
"--tp=/appdata/pki/trusted",
"--rp=/appdata/pki/rejected",
"--ap=/appdata/pki/own",
"--ip=/appdata/pki/issuer"
],

This are the security policies enabled:

image

Error log:
Session creation to endpoint 'opc.tcp://xxx.xxx.xx.xx:xxxx' failed 1 time(s). Please verify if server is up and Publisher configuration is correct. System.AggregateException: One or more errors occurred. (Error establishing a connection: Could not send an Open Secure Channel request.) ---> Opc.Ua.ServiceResultException: Error establishing a connection: Could not send an Open Secure Channel request. at Opc.Ua.Client.Session.Create(ApplicationConfiguration configuration, ConfiguredEndpoint endpoint, Boolean updateBeforeConnect, Boolean checkDomain, String sessionName, UInt32 sessionTimeout, IUserIdentity identity, IList1 preferredLocales) --- End of inner exception stack trace --- at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at OpcPublisher.OpcSession.ConnectSessionAsync(CancellationToken ct) in D:\a\1\s\modules\opc-publisher\opcpublisher\OpcSession.cs:line 444 ---> (Inner Exception #0) Opc.Ua.ServiceResultException: Error establishing a connection: Could not send an Open Secure Channel request. at Opc.Ua.Client.Session.Create(ApplicationConfiguration configuration, ConfiguredEndpoint endpoint, Boolean updateBeforeConnect, Boolean checkDomain, String sessionName, UInt32 sessionTimeout, IUserIdentity identity, IList`1 preferredLocales)<---

@marcschier marcschier added the bug Something isn't working label May 14, 2020
@cristipogacean
Copy link
Contributor

We recently fixed the certificates recreation issue (#451). can you give it a try with the :preview tag container?
Please be aware though that also the publisher's certificate must be trusted by the server.
Nevertheless, looking at the exception I cannot tell if this is a security issue or a connectivity issue. Can you please provide a bit more insight?

@cristipogacean cristipogacean added the need more information Needs more information label May 14, 2020
@marcschier
Copy link
Collaborator

Closing - please could you try current master branch and re-open if the issue still exists.

@marcschier marcschier added this to the 2.7 milestone May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need more information Needs more information
Projects
None yet
Development

No branches or pull requests

3 participants