Troubleshooting BadSecureChannelClosed

If BadSecureChannelClosed error occurs, check that the OPC UA server is running and the OPC UA client adapter certificate is available in the server trusted list, because one of the potential causes might be that the OPC UA server is not running or it rejected the connection for security reasons.

If the problem persists, this might depend on the expiration of the timeout of the communication between OPC UA server and OPC UA client adapter. For more details, see OPC UA Adapter Settings XML Files.

<!-- Communication Timeout -->

<!-- Default and minimum values are: -->

<!-- SessionTimeout = 60000 - StatusCheckInterval = 1000 - ReconnectPeriod = 10000 -->

<!-- These values are expressed in milliseconds (ms) -->

<!-- These values must be increased in case of communication issues (e.g., in the case of control units or gateways) -->

<SessionTimeout>60000</SessionTimeout>

<StatusCheckInterval>1000</StatusCheckInterval>

<ReconnectPeriod>10000</ReconnectPeriod>

To solve this issue, do the following:

  1. Stop the OpcUaAdapter service.
  2. Do one of the following:
    • If the OPC UA adapter settings XML file is already available (C:\Program Files (x86)\Siemens\SORIS OPC UA Adapter\OpcUaAdapter.Settings.xml or [adapter service name].Settings.xml), open this file, modify the timeout parameters appropriately, and save the changes.
      NOTE: In particular, it is suggested to increase the StatusCheckInterval value. For example, 5000.
    • If the OPC UA adapter settings XML file is not available in C:\Program Files (x86)\Siemens\SORIS OPC UA Adapter, create an XML file with the same name and content (see above). Then modify the timeout parameters appropriately and save the changes.
  3. Restart the OpcUaAdapter service.