Skip to main content
10-Marble
July 2, 2025
Solved

Kepware OPCUA Server is Failed to Connect to Azuer IoT

Issue: KepwareServerEx 6 failed to connect to Azure IoT Hub and device.

Environment:

  KepwareServerEx 6

  Channel: Simulator

  Added a new Device : SimDevice1

  OPCUA Tags : 

        1. Temperature / R1001 / Float

        2. Counter / R1010 / Dword

  I have enabled OPCUA Setting by right-clicking "KepwareServerEx" --> "OPC UA Configuration". 

 Then I have right Click on IoT Gateway and added new agnet with the below configuration.

 

Name : AzureIoTHubAgent
Broker URL: Enter ssl://[IoTHubName].azure-devices.net:8883.
Username:  [IoTHubName].azure-devices.net/[DeviceID].
Password:  Primary connection string Ex: HostName=iothubXXXXXXX.azure-devices.net;DeviceId=iothub-XXXX-device;SharedAccessKey=XXXXXXXX=.
Client ID: My Device ID (e.g., KepwareDevice).
Topic:  devices/[DeviceID]/messages/events/ for publishing telemetry to IoT Hub.
QoS: Set to 1
Keep Alive: Default is 60 seconds.

 

I also open Windows firewall port "49320" and also verified OPCUA output in Prosys OPCUA browser "opc.tcp://vm-XXX-XXX:49320"

 

Still, kepware failed to connect Azure IoT Hub with the following error :

" Error IoT Gateway Failed to connect to server: '255.255.255.255:65535'. Please verify this connection information is correct and that the host can be reached."

 

Any suggestions why it failed to connect to Azure IoT Hub and Device?

 

 

10-Marble
July 4, 2025

Below configration solution work for me.

 

URL :
    URL: ssl://[iot edge device FQDN]:8883
 
Topic:
     devices/[device id]/messages/events/
 
Client ID:
      [device id]
Username:
       [iothub long name]/[device id]/
Password: [SAS Token]
     Use MS Visual Code extension Azure IoT Hub to generate SAS Token.
   SharedAccessSignature sr=XXXXXXXXXXXXXXXXXXXXXX
 
Open windows Inward firewall port 8883. I hope this will help someone.
 

 

4 replies

16-Pearl
July 2, 2025

Greetings @SW_10703260,

 

I hope you're doing well.

To help resolve the issue, I would suggest following the steps outlined below:

 

  • Check the accuracy of the server's IP address and port number.
  • Verify network connectivity by ensuring that the host can be reached from the machine hosting the PTC IoT Gateway
  • If the server is running on a different machine, ensure that it is up and running and accessible from the network
  • Ensure that any firewalls, security software, or network settings do not block the communication between the PTC IoT Gateway and the specified server
  • Retry the connection after confirming the above steps

Note:- Please verify the Network Adapter is set correctly, The path is Agent -> Properties -> Server -> Network Adapter

 

ntripathi_0-1751462119341.png

 

 

If you have any questions or need further assistance, please feel free to contact us.

Translate
10-Marble
July 3, 2025

Thanks for the help.

My KEPServerEX 6.17 Non-Licence Copy.

I cannot find the below path in the properties of the IoT Gateway agent.

In the agent properties, "Server -> Network Adapter" is missing.

    Agent -> Properties -> Server -> Network Adapter

Please refer to the attached screenshot of my agent's properties.

Translate
16-Pearl
July 3, 2025

Greetings @SW_10703260, 

 

I hope you're doing well.

 

The "Network Adapter" setting is only available when the agent type is configured as a REST Server. If your agent is not set to REST Server, this section will not appear.

Translate