Error creating OPC server

Ubuntu 18.04
Ignition version: 8.0.0 (b2019040718)
Java version: Azul Systems, Inc. 11.0.2

java.lang.Exception: Error creating OPC server “Ignition OPC UA Server” of type “com.inductiveautomation.OpcUaServerType”
at com.inductiveautomation.ignition.gateway.opc.OpcConnectionManagerImpl.newOpcConnection(OpcConnectionManagerImpl.java:166)
at com.inductiveautomation.ignition.gateway.opc.OpcConnectionManagerImpl.registerConnectionType(OpcConnectionManagerImpl.java:243)
at com.inductiveautomation.ignition.gateway.opcua.OpcUaModule.startup(OpcUaModule.kt:295)
at com.inductiveautomation.ignition.gateway.opcua.OpcUaModuleHook.startup(OpcUaModuleHook.kt)
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$LoadedModule.startup(ModuleManagerImpl.java:2349)
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.startup(ModuleManagerImpl.java:396)
at com.inductiveautomation.ignition.gateway.IgnitionGateway.startupInternal(IgnitionGateway.java:1116)
at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl.startup(RedundancyManagerImpl.java:275)
at com.inductiveautomation.ignition.gateway.IgnitionGateway.initRedundancy(IgnitionGateway.java:664)
at com.inductiveautomation.ignition.gateway.IgnitionGateway.lambda$initInternal$0(IgnitionGateway.java:602)
at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:518)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.security.UnrecoverableKeyException: Get Key failed: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
at java.base/sun.security.pkcs12.PKCS12KeyStore.engineGetKey(Unknown Source)
at java.base/sun.security.util.KeyStoreDelegator.engineGetKey(Unknown Source)
at java.base/java.security.KeyStore.getKey(Unknown Source)
at com.inductiveautomation.ignition.gateway.opcua.KeyStoreManager.getKeyPair(KeyStoreManager.kt:57)
at com.inductiveautomation.ignition.gateway.opcua.client.connection.OpcUaConnectionType.createNewOpcConnection(OpcUaConnectionType.kt:48)
at com.inductiveautomation.ignition.gateway.opc.OpcConnectionManagerImpl.newOpcConnection(OpcConnectionManagerImpl.java:161)
… 16 more
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
at java.base/com.sun.crypto.provider.CipherCore.unpad(Unknown Source)
at java.base/com.sun.crypto.provider.CipherCore.fillOutputBuffer(Unknown Source)
at java.base/com.sun.crypto.provider.CipherCore.doFinal(Unknown Source)
at java.base/com.sun.crypto.provider.PKCS12PBECipherCore.implDoFinal(Unknown Source)
at java.base/com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndDESede.engineDoFinal(Unknown Source)
at java.base/javax.crypto.Cipher.doFinal(Unknown Source)
at java.base/sun.security.pkcs12.PKCS12KeyStore.lambda$engineGetKey$0(Unknown Source)
at java.base/sun.security.pkcs12.PKCS12KeyStore$RetryWithZero.run(Unknown Source)
… 22 more

8.0.0 (b2019040718)
Azul Systems, Inc. 11.0.2

Huh, never seen that one before. If you stop the service and delete the data/opcua/client/security/certificates.pfx and data/opcua/server/security/certificates.pfx files does it work?

Also might be worth upgrading to the latest version.

Stop, deletes, and Start, did not fix this issue. I will try the upgrade from Stable 8.0.0 to 8.0.1.

Ignition version: 8.0.2-rc1 (b2019052016)
Java version: Azul Systems, Inc. 11.0.3
Upgrade didn’t work. I deleted the connection and recreated and all seems to work now. Sorry. Thanks for taking the time to help.

Upgrade to latest version and this error is back.

Ignition version: 8.0.2 (b2019060511)
Java version: Azul Systems, Inc. 11.0.3

Caused by: java.security.UnrecoverableKeyException: Get Key failed: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.

Caused by: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.

Can you try the previously mentioned fix of stopping, deleting the PFX files, and starting again?

If that doesn’t work please upload your entire wrapper.log file.

It did not. Please tell me where I can find the wrapper.log file.

They are in $IGNITION_INSTALL_DIR/logs.

After seeing that last time you “fixed” this by deleting/creating the UA connection, another possibility here is that you have (inadvertently, perhaps) changed one of Keystore Alias or Keystore Alias Password advanced settings on one of your OPC UA connections and this error is a result of that.

They should be “client” and “password” by default.

4 posts were split to a new topic: Error connecting to 3rd party UA server: Exception: session inactive

Hey, I’m experiencing the same/similar issue. I get the original error message if I leave the password blank.
If I use default credentials (client/password) I get the following message:

UaServiceFaultException: status=Bad_UserAccessDenied, message=User does not have permission to perform the requested operation.
at org.eclipse.milo.opcua.stack.client.UaStackClient.lambda$deliverResponse$5(UaStackClient.java:272)
at org.eclipse.milo.opcua.stack.core.util.ExecutionQueue$Task.run(ExecutionQueue.java:119)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

8.0.2 (b2019060511)
Azul Systems, Inc. 11.0.3

@curtis.hargreaves your situation is different. You likely get the original error when you leave the username/password blank because the server is not offering an endpoint where anonymous access is allowed. You’ll need to know the correct username and password to connect to this server or modify its configuration to allow anonymous connections.

A post was split to a new topic: OPC UA Connection Faulted After Upgrade