Connecting to OPC-UA Server inside docker container

Hi,

I’m wondering if anyone can share his/her experience on connecting to Ignition OPC-UA server running in a docker container.
I’m using a dockerized Ignition 8.1.11 and trying to connect from the host (tested with Ignition or an OPC client) with no success so far.
This is the string with which I start my docker

docker run -e TZ=Europe/Paris -p 8115:8088 -p 62543:62541 --expose 62543 --name IGN4 -e GATEWAY_ADMIN_PASSWORD=password -e IGNITION_EDITION=edge -d kcollins/ignition:8.1.11

As you can see I’m exposing port 62543

this is my OPC server configuration

Is there something I’m not configuring correctly?

Due to the way the discovery works, you’ll probably need to actually bind to the same port within the container as you’re publishing to the host. Try this (you don’t need the --expose and I also added a named volume for you):

docker run -e TZ=Europe/Paris -p 8115:8088 -p 62543:62543 --name IGN4 -v ign4-data:/var/lib/ignition/data -e GATEWAY_ADMIN_PASSWORD=password -e IGNITION_EDITION=edge -d kcollins/ignition:8.1.11

From here, in your Edge gateway:

  • Adjust both Bind Addresses to 0.0.0.0 and Bind Port to 62543.

    This way the discovery URL will match the published port at 62543.

  • Restart the OPC-UA module under Config → System → Modules

    The changes to OPC-UA Server configuration won’t take effect until you’ve restarted the module).

  • Adjust your internal Ignition OPC UA Server under Config → System → OPC Client → OPC Connections (via More → endpoint) to point to opc.tcp://localhost:62543/discovery and then Save changes.

At this point your Edge gateway should be healthy and ready for external connections.

1 Like

Works like a charm now! Thanks a lot Kevin !!!