Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] Unable to connect OPC server inside DOCKER

Yes, thank you Jens.

I think you are both describing the general problem addressed here: https://stackoverflow.com/a/40555243/85927

You can work around this in the client by replacing the endpoint URL or you can configure the server so that it knows about its external host/IP address and returns additional endpoints during discovery.

On Fri, Jun 3, 2022 at 6:01 AM Jens Reimann <jreimann@xxxxxxxxxx> wrote:
Hi,

yes, inside docker that can be tricky. The IP inside docker is different than the IP outside of docker. however, the OPC server inside the container take the internal IP and sends that back to the client.


Cheers

Jens

On Fri, Jun 3, 2022 at 2:52 PM Pankaj Mishra <pankaj.mishraa06@xxxxxxxxx> wrote:
Hello,
My name is Pankaj and I am a developer at Siemens.
I am facing this issue described below.

My Client:

Container name:  opcmockmiddleware-opcserver-1 (This is opcserver container name)

I am trying to connect OPC server from client using the code:
List<EndpointDescription> endpoints = DiscoveryClient.getEndpoints(url).get();
The URL which I have configured is like
opc.server.url=opc.tcp://opcmockmiddleware-opcserver-1:4850/siemens
on my client so that it can discover the server.
But for some reason it is creating a wrong url while calling the opc server .
Please find the below screenshot.
image.png

I have also tried by hardcoding the IP to connect to server but its shows 
connection refused:  /172.31.0.2:4850

It is malfunctioning the URL , when both client and server is running inside docker .
Eclipse milo version:
Client: 0.6.4
server: 0.4.3

Please help!. I am stuck here.
I will be waiting for your reply.

Thanks,
Pankaj.
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev


--
Jens Reimann
Principal Software Engineer / R&D Product Middleware
Werner-von-Siemens-Ring 14
85630 Grasbrunn
Germany
phone: +49 89 2050 71286
_____________________________________________________________________________

Red Hat GmbH, Registered seat: Werner von Siemens Ring 14, D-85630 Grasbrunn, Germany
Commercial register: Amtsgericht Muenchen/Munich, HRB 153243,
Managing Directors: Ryan Barnhart, Charles Cachera, Michael O'Neill, Amy Ross
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev

Back to the top