Hello.
Does anybody know how to make proper DNS resolution for Orchestrator appliance so it would resolve its own hostname (FQDN) and IP address according to DNS records?
The problem is with "System.resolveIpAddress()" and "System.resolveHostName()" methods.
The method "resolveIpAddress()" returns same IP if called with static IP address assigned to this appliance. And returns FQDN of host when called with 127.0.0.1.
So when I call "System.resolveIpAddress('192.168.1.50')" it returns '192.168.1.50' instead of FQDN.
When I call "System.resolveIpAddress('127.0.0.1')" it returns 'vco.local.lan'.
The method "resolveHostName()" returns 127.0.0.1 when called with either hostname or FQDN.
So when I call "System.resolveHostName('vco.local.lan')" or "System.resolveHostName('vco')" it returns 127.0.0.1 in both cases.
"nslookup" utility launched from the same appliance console works properly returning FQDN when entering IP, and returning proper IP (192.168.1.50) when entering FQDN.
Thank you.
SSH to your appliance or access the console and login as root...
Next, edit your /etc/hosts file
- Remove all reference to your FQDN and hostname in there, the only things you'll want is along the lines of:
127.0.0.1 localhost
Optionally restart the network service (may not be required, I did on mine)
After doing this, my appliance started showing the fqdn when I selected the proper IP in the configuration.
I seem to get the same behavior you are describing on a vCO appliance.
Have you checked that the result you are getting are matching what is displayed in the configuration / network page ? It does for me.
It seems that the appliance DNS configuration has something wrong. Check the appliance configuration page (not the vCO one).
Christophe.
Yes, orchestrator network configuration reflects the same situation. When I select 192.168.1.50 as IP address it shows me 192.168.1.50 as DNS name. And if I select 127.0.0.1, then DNS name is vco.local.lan.
And I don't see what could be wrong with appliance configuration. Hostname is "vco", IP address/subnet mask is specified correctly. Gateway and DNS server addresses are also checked.
And as I mentioned, doing "nslookup" from appliance's command line provides correct results for resolving both - IP address and FQDN.
SSH to your appliance or access the console and login as root...
Next, edit your /etc/hosts file
- Remove all reference to your FQDN and hostname in there, the only things you'll want is along the lines of:
127.0.0.1 localhost
Optionally restart the network service (may not be required, I did on mine)
After doing this, my appliance started showing the fqdn when I selected the proper IP in the configuration.
oh, and System.resolveIpAddress and System.resolveHostname are now showing expected results as well
Of course it is "/etc/hosts". I wonder how I could forget about it.
Obviously, I need a vacation
Thank you, Burke!