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 11.1.1.5. 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 127.0.0.1 associated with both the hostname and localhost. So something like this:
127.0.0.1      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:
127.0.0.1      localhost.localdomain localhost
10.99.2.112    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 11.1.1.5 related patches with opmn including OHS.

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

12 comments:

  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

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

    ReplyDelete
  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]wetfret.net.

    Tanks for the post.

    Steve

    ReplyDelete
  4. Hii,

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

    Regards,

    ReplyDelete
  5. Hii,

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

    Regards,

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

    Thanks for your support.


    Babs

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

    Thanks!

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

    ReplyDelete
  9. hi,

    I require the init script for my vm.. arddoy@gmail.com

    Thanks,

    Ard

    ReplyDelete

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