Hi,
InAddition to the suggestions provided on the Github issue, please try the below initial troubleshooting steps!
The error message "Failed to create session 'session_id' due to One or more errors occurred. (Error establishing a connection: BadNotConnected)" indicates that there is a problem with the connection between the OPC UA server and the OPC UA client.
Here are some things you can try to resolve the issue:
- Check the network connectivity between the OPC UA server and the OPC UA client. Make sure that both the server and the client are on the same network and that there are no firewall or network restrictions that could be blocking the connection.
- Verify that the OPC UA server is running and is accessible. You can do this by using an OPC UA client tool such as UA Expert or UaGateway to connect to the server and browse its address space.
- Check the OPC UA client configuration in your Azure IoT Edge module. Make sure that the endpoint URL, security policy, and message security mode are all set correctly and match the configuration of the OPC UA server. You can also try specifying the session timeout and the keep-alive interval to see if it helps.
- Check the OPC UA server logs for any errors or warnings that could indicate the cause of the problem.
- Try restarting the OPC UA server and the Azure IoT Edge module to see if it resolves the issue.
Please comment in the below section if you are still facing the same issue and we are more than happy to help you!