Far too many times I have seen the mistake where a customer has installed one or many of the CLM applications and either failed to set the Public URI or set the Public URI to something that is not appropriate, such as a host name tied to the network infrastructure.
It is important to give thought beforehand about how you would like your clients to access your CLM links and applications. This means, that a scalable URI design needs to be created (to allow more applications to be added) even before the first CLM application is deployed.
Why is it important? Its important because the URI is the de-facto unique identifier that customers and integrations will use when linking to CLM data. Any change to this URI (due to a host name changing for example) can have implications to not only links embedded in emails and bookmarks but other application integrations (including the CLM integrations RM, CCM and QM).
You generally want a URI that reflects the static business meaning of the data that is being linked to. For example: https://jazzdev.ibm.com/ccm is good, https://aix61boxonmydesk.ibm.com:7255/ccm is not because it identifies both the hardware hosting the application and the port.
Some customers have asked why we cannot have the CLM application figure it out itself (like the 2.x products did). Yes, the 2.x era products allowed this and, yes, resulted in unpredictable link behaviour. (It is not allowed any more.)
Here is the problem : There is no reliable way of getting the host name of a machine because the machine itself may not know what it is (if its behind a proxy for example.)
If no public URI is set, an attempt is made by using something like:
What does this return? Well.. as Java is the CLM implementation technology. it seems that this is determined by the rules specified here
Reverse lookup behaviour is really determined how the network and DNS is configured. An example sequence to determine the URL could be:
- If Public URI is set then no reverse lookup needed the public URI setting is used. end.
- If public URI is not set, the host name must be determined through getting the IP address for the primary network device then name resolution will do.
- look in the host file
- DNS Reverse lookup
Some problems with this:
- If server IP address is not resolvable on the server itself (either in hosts file nor lookup) then an exception is thrown and IP address is used.
- If DNS is misconfigured, IP address can return as host name
- Some other network misconfiguration/bug is causing getLocalHost call to return 127.0.0.1/localhost
- Which host name? Which network device? There could be many combinations.
Even if this worked, it is still not good enough!
Why? Simple example exercise.. I want to host RTC on my work laptop, and i don't know what my public URI should be.
Let me try to find out.
Let me try to find out.
From hostname command:
[kuschel@tpborisk7 conf]$ hostname tpborisk7.ibm.com
Cool.. let's do an IP lookup on the host name:
[kuschel@tpborisk7 conf]$ nslookup tpborisk7.ibm.com Server: 18.104.22.168 Address: 22.214.171.124#53 ** server can't find tpborisk7.ibm.com: NXDOMAIN
No good. This is because i do not have a DNS entry for my laptop's host name.
Let's try my NIC IP Address?
[kuschel@tpborisk7 conf]$ ifconfig eth0 eth0 Link encap:Ethernet HWaddr F0:DE:F1:58:9B:7D inet addr:192.168.2.35 Bcast:192.168.2.255 Mask:255.255.255.0
Do a reverse lookup on the IP:
[kuschel@tpborisk7 conf]$ nslookup 192.168.2.35 Server: 126.96.36.199 Address: 188.8.131.52#53 ** server can't find 184.108.40.206.in-addr.arpa.: NXDOMAIN
Also not good.. DNS has no entry for this IP. Even if it did, it would be purely local to the subnet! (192.168.x.x).
My Wireless NIC? Resolves locally on my home network but not publically.
Ah! Thats right, I am using VPN:
Now what is my ip address (I am using a VPN tunnel)?
[kuschel@tpborisk7 conf]$ ifconfig tun0< tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:220.127.116.11 P-t-P:18.104.22.168 Mask:255.255.252.0
What is the hostname that corresponds to this IP?
[kuschel@tpborisk7 conf]$ nslookup 22.214.171.124 Server: 126.96.36.199 Address: 188.8.131.52#53 Non-authoritative answer: 184.108.40.206.in-addr.arpa name = tpborisk7.torolab.ibm.com. Authoritative answers can be found from: 5.in-addr.arpa nameserver = ns.ibm.com. 5.in-addr.arpa nameserver = ns2.ibm.com. 5.in-addr.arpa nameserver = ns3.ibm.com. ns.ibm.com. internet address = 220.127.116.11 ns2.ibm.com internet address = 18.104.22.168 ns3.ibm.com. internet address = 22.214.171.124
Bingo! So I should use tpborisk7.torolab.ibm.com as it seems to be publicly addressable but its simply a bad public URI (machine name plus location).
So how is CLM supposed to figure this out? My laptop has have 10 network devices, some with resolvable names, some not.
What is also key here is that neither my NIC nor my host name is the real public address!
One cannot expect the CLM applications to figure this out as there is simply not enough information. (It could even use something like an IP address if it cannot resolve a name.)
Hence the need for a Public URI!
Put the same thought behind the CLM public URI as you would for a URL you would host pages or application for the general public on the internet. It should be thought of,designed and owned by CLM!
Luckily, For people who are in the unfortunate predicament of having a bad public URI, there is hope in 4.0 with server rename.