Best Practices from Oracle Development's A‑Team

Error message "Can not resolve hostname for interface any" from opmnctl

I ran into a problem with opmnctl on one of the many virtual machines and I know that someone else out there will have the same problem. This was a machine with the Identity Management bits (OID, OVD and OIF) that I had just patched up to When I went to start the servers after applying the patch I got an error:

[oracle@dwrc4 ~]$ opmnctl status Can not resolve five.oracleateam.com for interface any opmnctl status: opmn is not running.

I dug into the issue and it turned out that the cause of the problem is that the machine was configured to use DHCP and the hosts file had the associated with both the hostname and localhost. So something like this:      five.oracleateam.com five localhost.localdomain localhost ::1            localhost6.localdomain6 localhost6

I was able to resolve the issue by changing /etc/hosts to the following:      localhost.localdomain localhost    five five.oracleateam.com

Of course this means that each time the IP address changes you'll need to update the hosts file.


You know me - "Never do anything manually if you can automate it" so I wrote an init script to update the hosts file automatically each time the VM boots. If you want that script let me know in the comments.
I also opened a bug (number 12530765) to track the issue. You can follow up with support on that bug to see when it will be patched.


Note: this issue will probably apply to any of the related patches with opmn including OHS.


If you want a copy of the script you can get it at GitHub

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha