Monday, May 23, 2011

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


  1. Awesome that you posted this - I was just starting to grapple with this problem myself. I'm using the pre-built developer VM for WebCenter Spaces from OTN, and it has the same issue you describe. Wish I'd found this before I uninstalled and reinstalled OHS a few times :-S

  2. Большое спасибо! (Very big thnks) :)

  3. I am having this exact problem. I would be interested in your script as the patch that was issued is only for Linux x86_64 or Solaris 64.

    I can be reached at vortsg[at]

    Tanks for the post.


  4. Hii,

    Thanks for the great job. Pls i will have to have the script. I can be reached at


  5. Hii,

    Thanks for the great job. Pls i will have to have the script. I can be reached at


  6. Hii, Thanks for the wonderful post. Pls i will love to have script as i am facing the same problem. Can be at

    Thanks for your support.


  7. Appreciate it, this also happens with Cloud Control 12c during installation. Same fix applies.


  8. This worked great. Your explanation was very clear. Thanks!

  9. hi,

    I require the init script for my vm..




Note: Only a member of this blog may post a comment.