Failed to create session OPCPublisher

Radouane Garoiaz 1 Reputation point
2022-12-19T14:41:41.647+00:00

Hello,
I am trying to pull data from OPC Ua server and i have this issue.
[11:08:18 WRN Microsoft.Azure.IIoT.OpcUa.Protocol.Services.DefaultSessionManager] Failed to create session '9a6ad8d9c7b442dbc3a003391bde73457dbaa95d' due to One or more errors occurred. (Error establishing a connection: BadNotConnected).

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
575 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,195 questions
{count} votes

1 answer

Sort by: Most helpful
  1. QuantumCache 20,271 Reputation points
    2023-03-10T05:58:01.88+00:00

    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:

    1. 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.
    2. 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.
    3. 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.
    4. Check the OPC UA server logs for any errors or warnings that could indicate the cause of the problem.
    5. 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!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.