The Java Agent (SAP, SQL, RA, etc.) is configured to use the CA trust certificates provided by the system.
So, in the Agent's ini-file trustedCertFolder=<empty>, and thus the Agent needs access to the file <java>/lib/security/cacerts
While the Agent was running the local Java was updated in the background.
Then the Agent was disconnected from the JCP by an event (network, JCP shutdown, ...) and the Agent can't reconnect with the error below:
20240722/114619.736 - U02000383 Web Socket connection closed with status code '1001 (Shutdown)'.
20240722/114619.739 - U02000379 Initiating connection to server '<JCP01>:8443' using WebSocket URI: 'wss://<JCP01>:8443/agent'.
20240722/114619.817 - U02000385 Web socket error: '0 null'.
20240722/114619.817 - U02000311 An unexpected error occurred: UpgradeException: 'Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty'
20240722/114619.819 - java.util.concurrent.ExecutionException: org.eclipse.jetty.websocket.api.UpgradeException: 0 null
20240722/114619.819 - Caused by org.eclipse.jetty.websocket.api.UpgradeException: 0 null
20240722/114619.820 - Caused by java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
20240722/114619.820 - Caused by java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
20240722/114619.821 - U02000380 Could not connect to server '<JCP01>:8443'.
20240722/114619.825 - U02000074 Connecting to system 'AUTOMIC' is not possible.
20240722/114619.825 - com.uc4.ex.cp.InitialConnectionException: Initial connection with endpoint not possible. Please check your configuration.
20240722/114619.825 - U02000379 Initiating connection to server '<JCP02>:8443' using WebSocket URI: 'wss://<JCP02>:8443/agent'.
20240722/114619.837 - U02000385 Web socket error: 'Connection refused'.
20240722/114619.837 - java.net.ConnectException: Connection refused
20240722/114619.846 - U02000074 Connecting to system 'AUTOMIC' is not possible.
20240722/114619.846 - com.uc4.ex.cp.InitialConnectionException: Initial connection with endpoint not possible. Please check your configuration.
20240722/114619.847 - U02000379 Initiating connection to server '<JCP02>:8443' using WebSocket URI: 'wss://<JCP02>:8443/agent'.
20240722/114619.860 - U02000385 Web socket error: 'Connection refused'.
20240722/114619.860 - java.net.ConnectException: Connection refused
20240722/114619.864 - U02000074 Connecting to system 'AUTOMIC' is not possible.
20240722/114619.864 - com.uc4.ex.cp.InitialConnectionException: Initial connection with endpoint not possible. Please check your configuration.
20240722/114619.864 - U02000196 Next attempt to create a CP connection in '300' seconds.
...after restarting the Agent there is no problem
Java Agent
During the Java upgrade, the needed runtime libs get removed and new libs are placed in the OS.
If the runtime is changed any Java component must be ended before and started once the update/upgrade is done.
Restarting the Agent resolves the issue.