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

OPC UA application is not avaliable by hostname #317

Closed
atimin opened this issue Nov 29, 2019 · 4 comments · Fixed by #328
Closed

OPC UA application is not avaliable by hostname #317

atimin opened this issue Nov 29, 2019 · 4 comments · Fixed by #328
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@atimin
Copy link
Member

atimin commented Nov 29, 2019

Describe the bug

If I use @HOSTNAME@ for EndpointUrl the application starts ok, but it isn't available by this endpoint. I steel forced to use IP address.

To Reproduce
Steps to reproduce the behavior:

  1. Generate an application with OpcUaProjectBuilder3
  2. Replace 0.0.0.0 by @HOSTNAME@
  3. Run the app
  4. Try to connect with UAExpert

Expected behavior

The client must connect to the application by URL opc.tcp://hostname:port/

Logs
OpcUaServer.log
hostnametcp.pcapng.zip

Environment (please complete the following information):

  • OS: Ubuntu-19.10
  • Version 3.8.0

Additional context

In the logs one can see that the server binds a socket with IP 127.0.1.1 but UAExpert is looking for IP 127.0.0.1.

In docker-compose network the application binds the external IP:

2019-Nov-29 06:05:37.548068 INF [7f1c3d908700] secure channel endpoint open : Address=<172.30.1.3>, Port=<8889>
2019-Nov-29 06:05:37.548291 INF [7f1c3d908700] open opc ua endpoint : EndpointUrl=<opc.tcp://opcuaserver:8889>, ChannelCount=<0>, SessionCount=<0>
@atimin atimin added the bug Something isn't working label Nov 29, 2019
@atimin atimin added this to todo in Release3-Bugs via automation Nov 29, 2019
@atimin
Copy link
Member Author

atimin commented Nov 29, 2019

@huebl, why don't we bind IP 0.0.0.0 for the hostname?

@atimin atimin added the invalid This doesn't seem right label Nov 29, 2019
@huebl
Copy link
Contributor

huebl commented Nov 30, 2019

The endpoint url must be a valid address (IP address or domain name), because it is used in certificate checking. The address 0.0.0.0 is not a valid address. In version 3 there is no certificate check.

The client use this address during the discovery process to established a connection to the opc ua server. This is not possible with the adress 0.0.0.0.

In version 4, the following behavior was implemented:

#115

That would also be a solution for version 3.

@atimin
Copy link
Member Author

atimin commented Nov 30, 2019

@huebl, I agree with you that 0.0.0.0 is not a valid IP for the endpoint. I mean not to use it for endpoint, but to bind the listening socket with 0.0.0.0 when the application has @hostname@ in EndpointURL. Actually, it is what you do in #115.

I can try to copy this solution into Release 3. Ok?

@huebl
Copy link
Contributor

huebl commented Nov 30, 2019

Yes, you can do that.

@huebl huebl closed this as completed in #328 Dec 5, 2019
Release3-Bugs automation moved this from todo to done Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
Release3-Bugs
  
done
Development

Successfully merging a pull request may close this issue.

2 participants