umati/Sample-Server

Configuration

Closed this issue · 5 comments

I pulled the docker image and it runs just perfectly. I can monitor the Server on the same computer with UAExpert.
I now want to monitor the server from another computer in the same network with UAExpert. I tried the following when running the docker image:

docker run -d -p 147.87.39.101:4840:4840 ghcr.io/umati/sample-server:main

This didn't work though. I've read in the Readme that the server by default looks for a file configuration.json. I just don't know where to find it on my computer or whether I have to create on. And if I have to in which path.

Hi @herculesp17,

You just need to add the port mapping without the IP that the server listens to any interface of your computer.

e.g., docker run -d -p 4840:4840 ghcr.io/umati/sample-server:main

In the log you should see something like:

2023-05-11 16:40:03 [2023-05-11 14:40:03.367 (UTC+0000)] info/network   TCP     | Listening on all interfaces
2023-05-11 16:40:03 [2023-05-11 14:40:03.367 (UTC+0000)] info/network   TCP 4   | Creating server socket for "0.0.0.0" on port 4840
2023-05-11 16:40:03 [2023-05-11 14:40:03.367 (UTC+0000)] info/network   TCP 5   | Creating server socket for "::" on port 4840
2023-05-11 16:40:03 [2023-05-11 14:40:03.367 (UTC+0000)] info/network   TCP     | Listening on all interfaces
2023-05-11 16:40:03 [2023-05-11 14:40:03.367 (UTC+0000)] info/network   TCP 6   | Creating server socket for "0.0.0.0" on port 4840
2023-05-11 16:40:03 [2023-05-11 14:40:03.367 (UTC+0000)] info/network   TCP 7   | Creating server socket for "::" on port 4840

@GoetzGoerisch,

The log looks exactly as you posted. Problem still remains that I can't monitor the server from a different computer in the same network with UAExpert. It just can't establish a connection.
In UAExpert I type the following to try to connect to the server:

opc.tcp://opcua.umati.app:4840

I have a python opcua server which I can access with the ip address of the computer where the server is running on. That works perfectly fine. I'm not able to access the umami server from a different computer though.

opc.tcp://opcua.umati.app:4840 is a public instance by us on the internet. You might not be able to connect due to corporate firewalls.

Sorry I overlooked that you want to connect from the LAN to docker. Which might need the container be exposed to the LAN.
The IP 147.87.39.101 cannot be your LAN IP, therefore the server is not reachable on the LAN.

Try using the host option for docker networking e.g., add --network host to the arguments instead of the portmapping.

@herculesp17 did you find a solution?

Unfortunately I haven't, but I found a workaround.