Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force change FindServers call reply #824

Open
PGajewski opened this issue Apr 18, 2019 · 5 comments
Open

Force change FindServers call reply #824

PGajewski opened this issue Apr 18, 2019 · 5 comments

Comments

@PGajewski
Copy link

Hi,
I'm running OPC-UA server on Docker container and I want use client from external device (PLC). This device knows only the docker host IP address.
It is possible to set DiscoveryURL and EndpointURL with docker host IP? I've try set different hostname for BinaryServer(0.0.0.0) nad InternalServer(docker host IP), but still FindServers call return endpoint with docker container IP, co my client on another machine cannot establish the new session (DiscoveryURL is set properly).

@oroulet
Copy link
Member

oroulet commented Apr 18, 2019

This is a docker issue/question. I have no idea

@PGajewski
Copy link
Author

It's not a docker issue, but conflict between endpoints system and NAT translation.
The problem was inside get_endpoints method in InternalServer. It's change response endpoint URL when it was used by UaProcessor with a non default socket argument. I've modify Server and InternalServer classes - add special flag inside InternalServer for disable changing endpoint (replace hostname by socketname) and inside Server - two different endpoints for internal and binary server. Topic closed.

@oroulet
Copy link
Member

oroulet commented Apr 19, 2019

Can you make PR. So we can look at it?

@oroulet
Copy link
Member

oroulet commented Apr 19, 2019

I thought we were dumbly returning the same string but maybe someone changed that. There is also a open PR to make that stuff really complicated but I never dared committing it

@brubbel
Copy link
Contributor

brubbel commented Apr 22, 2019

If you mean this one: #687
I've been using this modification since around september last year without issues.

@PGajewski You can test if it solves your problem using this branch.
https://github.com/brubbel/python-opcua/tree/testing

If I remember correctly, in my case a VPN caused freeopcua to announce an unreachable listening address. However, as the client (I don't know if this is always the case) includes the server address during discovery request, I've modified the server code so that this address is also included in the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants