I am using Milo demo server for some testing of our OPC-UA client.
I have Java 11 installed on my linux box, and when I run the Milo server there, i have no issues.
I also have Java 11 installed on my windows machine, but when I run the Milo server there, and my client connects, I get this error message in the Milo output:
org.eclipse.milo.opcua.stack.core.channel.MessageDecodeException: UaException: status=Bad_InternalError, message=java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/ECB/OAEPWithSHA256AndMGF1Padding
at org.eclipse.milo.opcua.stack.core.channel.ChunkDecoder.decode(ChunkDecoder.java:97)
at org.eclipse.milo.opcua.stack.core.channel.ChunkDecoder.decodeAsymmetric(ChunkDecoder.java:62)
at org.eclipse.milo.opcua.stack.server.transport.uasc.UascServerAsymmetricHandler.lambda$onOpenSecureChannel$0(UascServerAsymmetricHandler.java:247)
I'm using this version of milo: milo-demo-server-0.6.10-SNAPSHOT-all.jar
The demo server isn't versioned this way, so it's not entirely clear to me what artifact or release you are actually running.
The tag I have checked out in the milo git repository I have is v0.6.10.
I'm interested in what would cause the "Cannot find any provider" error when I run this jar file on my Windows machine, but not when I run the same jar file on Linux.
Linux java version info:
kenw@kenw-ThinkPad-P51:~/workspace/milo$ java --version
openjdk 11.0.20.1 2023-08-24
OpenJDK Runtime Environment (build 11.0.20.1+1-post-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.20.1+1-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)
Window Java version (not exactly the same):
java 11.0.19 2023-04-18 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.19+9-LTS-224)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.19+9-LTS-224, mixed mode)
Oh, I see, you mean the example server that is part the Milo repository...
There is an actual demo server available here: GitHub - digitalpetri/opc-ua-demo-server: OPC UA Demo Server for Eclipse Milo. The release artifacts include a bundled runtime.
It's the same one that is running publicly at opc.tcp://milo.digitalpetri.com:62541/milo
.
I'm not sure what is causing that error exactly. Maybe you're not running the version of Java you think you are, or maybe you have some crippled version that doesn't include the necessary JCA bits.
Thanks Kevin.
I found and OpenSDK 17 from https://adoptium.net/download/ that fixed the problem.
Thanks again.