Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Connectivity with Discovery URL from Prosys Browser Client
February 5, 2021
12:03, EET
Avatar
Rakshan
Member
Members
Forum Posts: 19
Member Since:
June 2, 2019
sp_UserOfflineSmall Offline

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

February 5, 2021
13:23, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 642
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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).

February 5, 2021
15:51, EET
Avatar
Rakshan
Member
Members
Forum Posts: 19
Member Since:
June 2, 2019
sp_UserOfflineSmall Offline

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

February 8, 2021
10:48, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 642
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 267

Currently Online:
9 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 109

pramanj: 86

ibrahim: 71

kapsl: 57

gjevremovic: 49

TimK: 41

fred: 41

Fransua33: 39

Xavier: 34

rocket science: 33

Member Stats:

Guest Posters: 0

Members: 1302

Moderators: 15

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1106

Posts: 4680

Newest Members:

keremcoban, hypnos97, ekosunen40, janellbusby73, huey6201719746, hildanott654389, laurenemay, aman79, dawnpreciado138, daltondoughty96

Moderators: Jouni Aro: 877, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 642, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Teppo Uimonen: 21, Markus Johansson: 30, Matti Siponen: 100, Lusetti: 0

Administrators: admin: 1