VMware Cloud Community
stevenbattaille
Contributor
Contributor

CIM not working properly,failed to connect

Hi all,

Is there someone who can help me?

Our monitoring system N-Central gives an error when i tries to get the status from the HP Management agents.  The appropiate offline bundle has been installed but according to the N-Central support the error is as follows:

Failed to connect to CIM interface at ports: 5988 5989   as user :root

Also the health status in the vshpere client is not showing anything

Thanks

Steven Battaille

Reply
0 Kudos
10 Replies
JimKnopf99
Commander
Commander

Hi,

what about the Firewall, security profile? Is the CIM Server running and the port for connection open?

Frank

If you find this information useful, please award points for "correct" or "helpful".
Reply
0 Kudos
stevenbattaille
Contributor
Contributor

Frank,

According to the firewall and security profile everything is fine. (see attachment)

Steven

Reply
0 Kudos
aaronwsmith
Enthusiast
Enthusiast

Are you running ESXi 5.0 or ESXi 5.1?

Which specific HP package did you install on your host?  hp-smx-provider?

Finally, which namespace is being used/assumed?  HP WBEM provider's namespace is root/hpq.

Reply
0 Kudos
stevenbattaille
Contributor
Contributor

Aaron,

ESXi 5.1 with the hp-esxi5.0uX-bundle-1.3.5-3

Vriendelijke groeten | Sincères salutations | Kind regards

Steven Battaille

System Engineer

e-mail: steven@intercare.be<mailto:steven@intercare.be>

BEDRIJFSFILM INTERCARE<http://www.youtube.com/watch?v=A6Y2iLSoFDM

Reply
0 Kudos
aaronwsmith
Enthusiast
Enthusiast

Not sure if you spotted my last question from the post above:

Which namespace is being used/assumed?  HP WBEM provider's namespace is root/hpq.

Reply
0 Kudos
aaronwsmith
Enthusiast
Enthusiast

Looking back at your earlier post ... when you said the health status is not showing anything, do you mean the "Hardware Status" tab as seen from the vSphere Client?

Any chance you also installed the Emulex CIM providers?  I've heard of problems having both HP's and Emulex CIM providers on the same host.

Also, make sure wsman is running on the host:

# /etc/init.d/wsman status
openwsmand is running

Finally, check what port(s) wsman is listening:

~ # esxcli network ip connection list | grep ws

tcp         0       0  127.0.0.1:8889      0.0.0.0:0             LISTEN           9715  openwsmand

Reply
0 Kudos
aaronwsmith
Enthusiast
Enthusiast

Been digging around as I've been wanting a suitable CIM client to test connections to our ESXi 5.1 hosts to enumerate WBEM data.  Came across this info from VMware that might also help with troubleshooting CIM server issues:

http://pubs.vmware.com/vsphere-51/topic/com.vmware.cimsdk.smashpg.doc/04_CIM_SMASH_PG_Troubleshootin...

For instance, the above doc notes that if your host is in lockdown mode, you can only connect to the CIM server using an authentication ticket obtained from vCenter.  You cannot directly authenticate via ID/password.

This doc shows default ports/protcols open for CIM server:

http://pubs.vmware.com/vsphere-51/topic/com.vmware.cimsdk.smashpg.doc/02_CIM_SMASH_PG_Basic_Client.4...

Reply
0 Kudos
aaronwsmith
Enthusiast
Enthusiast

I've found the following blog that shows how you can use PowerShell 3.0 to test the CIM Server on ESXi hosts.  I tried it and found it works.  I'm still trying to figure out how to query from the root/hpq namespace, as that's not working as I would expect yet.  But hopefully this helps you at least confirm that ESXi is responding to CIM requests on port 5989:

http://www.virtu-al.net/2012/10/29/using-powershell-v3-0-cim-cmdlets-with-vmware-esxi-hosts/

Reply
0 Kudos
aaronwsmith
Enthusiast
Enthusiast

Okay finally got it to where I want to be.

1. Install .NET 4.0 on a Windows 7 SP1 device or any device that supports PowerShell 3.0.  May have to follow the solution in this thread because it seems Microsoft signed the .NET 4.0 installed package with an outdated certificate: http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/thread/0e8ffe96-4c8a-426f-bde5-959c03d05daf...)

2. Install PowerShell 3.0, which includes the new CIM cmdlets.

3. Follow the steps in this artcle to connect to your host and query for CIM objects.  I'll lay out my code to take it one step further to pull objects from root/hpq:

http://www.virtu-al.net/2012/10/29/using-powershell-v3-0-cim-cmdlets-with-vmware-esxi-hosts/

Import-Module CimCmdlets

$cimOptions = New-CimSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck -Encoding Utf8 -UseSsl

$cimSession = New-CimSession -Authentication Basic -Credential root -ComputerName <esx-hostname> -Port 443 -SessionOption $cimOptions

Get-CimInstance -CimSession $cimSession -ClassName CIM_FAN -Namespace 'root/hpq'

If you get an object back from Get-CimInstance, then the hp-smx package is installed on your ESXi host and the CIM Server is working on port 443 (not 5989 I guess?  Maybe it internally redirects from 443 -> 5989?)

You'll notice the CIM_FAN object that comes back has some properties that show the object was derived from HP's WBEM class objects:

CreationClassName        : SMX_Fan

SystemCreationClassName  : SMX_ComputerSystem

The SMX_ namespace is from HP, which you can verify by refering to guides similar to the following:

http://bizsupport2.austin.hp.com/bc/docs/support/SupportManual/c03537617/c03537617.pdf

If you run the same Get-CimInstance query without the -Namespace parameter, you'll get a similar, but not identical object returned.  For example:

Get-CimInstance -CimSession $cimSession -ClassName CIM_FAN

Looking at the same 2 properties I mentioned above:

CreationClassName        : OMC_Fan

SystemCreationClassName  : OMC_UnitaryComputerSystem

This object came from root/cimv2.

Hope this helps troubleshoot your issue.  Maybe based on what I found, try connecting to your host on port 443 instead of 5989?

Reply
0 Kudos
aaronwsmith
Enthusiast
Enthusiast

Reply
0 Kudos