12:03, EET
June 2, 2019
Hi there,
I am working on discovery mechanisms and using the prosys browser client for my test cases.
I have a scenario where I have a 2 hosts(HOSTA and HOSTB), with discovery servers running on them. HOSTB is a client ( I run findServersOnNetwork from this side). I get servers running on the other host( Discovery URLs). However, when I make use of the discovery URL’s (eg: opc.tcp://hostname:port) mentioned to connect to the servers on the other host, I type the URL as given, the error comes to be (BAD conection rejected,(0x80AC0000) “Could not connect to a remote server”). but when i use the IP of the host and try to connect, it manages to get connected.
Why am I witnessing this? Is it not possible for me to connect to the server on the other Host using hostname?
Please let me know.
PS: Using Linux OS.
Regards,
Rakshan
13:23, EET
April 3, 2012
Hi,
The DNS configured on your machine must be able to make conversion of the hostname to an IP address which can be reached (and well, the server must also be online).
Usually (but not always) this can be tested with the “ping” on command line.
There is a somewhat known … I guess you could call that an issue, that you could also check. Nowadays machines usually have both IPv4 and IPv6 address. At least Win10 prefers to always give the IPv6 address, thus if the server is not listening to that, you would get that error. It is possible that your Linux distro does the same.
You can try flags “-4” and “-6” for the ping command to force it to use equivalent IPvX. If the output of the “-6” is the same as without any flag, that is somewhat good indication that IPv6 addresses are preferred. After that check that does your server bind to IPv6 addreses.
By default + the samples of our SDK server side does bind to all IP addresses (except if Java 6 is detected, since there it didn’t work).
P.S.
In general, in an unrelated case, we might be able to receive both addresses (IPv4+IPv6), so some (somewhat distant) future version might be able to try both. Though personally speaking it is a bit of a question is this something we should do, or is it just a misconfiguration of the server or OS if we get e.g. IPv6 as the first result if it could not be used. Most applications _should_ be able to bind to IPv6 in my opinion. Though, then it is a separate question should IPv6 be used at all unless you need it (since e.g. in theory it could bypass a NAT, since there would be no need to, thus in a misconfigured network it could be that e.g. some internal servers would get a public IPv6 address that way, which could be bad for security, though that would be a firewall configuration mistake in turn then).
15:51, EET
June 2, 2019
Hi,
Thanks so much for the detailed answer.
I tried to ping from one Host to the other using ping hostname.local, it was succesful.
However, ping hostname gave an error saying failure in name resolution.
Is it the case that we need to manually map our hostnames to IP in the configuration files? I am encountering this for the first time,with little to no idea as to how to tackle this.
Please let me know.
EDIT: I added the Ip manually in the /etc/hosts/ file and it works. Thanks! 🙂
Is it a dirty workaround or a solution exactly?
Regards,
Rakshan
10:48, EET
April 3, 2012
The hostname has a domain (albeit being the “local” domain), since it has a dot. That may affect things.
Hmm.. for your EDIT, I guess that works. Like typically I would sort of assume some company-internal-DNS to take care of that. But in the absence of that, your solution is probably what is generally used.
In general, I would maybe expect the LDS not being that much being used in practice in real productions, though my view of the whole world is limited. So there might be issues of some sorts.
Most Users Ever Online: 1919
Currently Online:
19 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 726
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_galleryModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1