UCMDB and UD Practitioners Forum (Previously CMS)
cancel

Host connections by wmi discovery error invalid user name and password

SOLVED
Go to solution
Highlighted
PYALCARI
Respected Contributor.

Host connections by wmi discovery error invalid user name and password

Hello Experts,

 

i am trying to run host connections by wmi job. have provided wmi credentials and I can able to take RDP with the same credentials but when I run the job, it is getting failed and showing invalid user name and password. below is the communication log. can any one suggest me on this.

 


<execution jobId="Host Connection by WMI" destinationid="d7ef0a959683f7ddbecf350ee17fda62" max_store_sent_results="2147483647">
    <destination>
        <destinationData name="id">d7ef0a959683f7ddbecf350ee17fda62</destinationData>
        <destinationData name="ip_address">10.6.108.71</destinationData>
        <destinationData name="host_key">NA</destinationData>
        <destinationData name="ip_domain">DefaultDomain</destinationData>
        <destinationData name="mac_addrs">${NA}</destinationData>
        <destinationData name="host_cmdbid">NA</destinationData>
        <destinationData name="ip_mac_address">NA</destinationData>
        <destinationData name="hostId"></destinationData>
    </destination>
    <protocol name="wmi" cm_credential_id="2_1_CMS">
        <object id="be22d8f4343a410c9968f97a945e85f5" id_type="CmdbObjectID" class="wmiprotocol" isReference="false" is_anchor="false">
            <attribute name="protocol_username" type="String">hpovo.admin</attribute>
            <attribute name="protocol_netaddress" type="String">DEFAULT</attribute>
            <attribute name="protocol_type" type="String">wmiprotocol</attribute>
            <attribute name="cm_credential_id" type="String">2_1_CMS</attribute>
            <attribute name="protocol_timeout" type="String">5000</attribute>
            <attribute name="user_label" type="String">WMI Protocol Credential 1</attribute>
            <attribute name="protocol_in_use" type="Boolean">false</attribute>
            <attribute name="protocol_index" type="Integer">1</attribute>
            <attribute name="wmiprotocol_wmidomain" type="Unknown" />
        </object>
    </protocol>
    <params>
        <param param_name="maxThreadRuntime" param_value="900000" />
        <param param_name="taskType" param_value="regular" />
        <param param_name="JOB_ID" param_value="Host Connection by WMI" />
    </params>
    <log start="16:14:04" severity="info">Execution current time:2015/05/21 16:14:04</log>
    <log start="16:14:04" severity="debug">try to get wmi agent for: DefaultDomain\10.6.108.71</log>
    <CONNECT start="16:14:11" duration="6834" CMD="client_connect" RESULT="" IS_NULL="Y" type="wmi" credentialsId="2_1_CMS">
        <ERROR class="java.lang.Exception">
            <message>[CDATA&colon; Failed to connect to Wmi:Access Denied, check credentials.]</message>
            <stacktrace>
                <frame class="com.hp.ucmdb.discovery.library.util.wmi.WMIDllUtil" method="checkConnection" file="WMIDllUtil.java" line="157" />
                <frame class="com.hp.ucmdb.discovery.library.util.wmi.WMIDllUtil" method="tryConnection" file="WMIDllUtil.java" line="149" />
                <frame class="com.hp.ucmdb.discovery.library.util.wmi.WMIDllUtil" method="&lt;init&gt;" file="WMIDllUtil.java" line="91" />
                <frame class="com.hp.ucmdb.discovery.library.util.wmi.WMIDllUtil" method="&lt;init&gt;" file="WMIDllUtil.java" line="72" />
                <frame class="com.hp.ucmdb.discovery.library.clients.agents.WmiAgent" method="&lt;init&gt;" file="WmiAgent.java" line="82" />
                <frame class="com.hp.ucmdb.discovery.library.clients.query.WMIClient" method="createWrapper" file="WMIClient.java" line="57" />
                <frame class="com.hp.ucmdb.discovery.library.clients.BaseClient" method="initPrivate" file="BaseClient.java" line="220" />
                <frame class="com.hp.ucmdb.discovery.library.clients.BaseClient" method="init" file="BaseClient.java" line="134" />
                <frame class="com.hp.ucmdb.discovery.library.clients.BaseClient" method="&lt;init&gt;" file="BaseClient.java" line="108" />
                <frame class="com.hp.ucmdb.discovery.library.clients.query.QueryClient" method="&lt;init&gt;" file="QueryClient.java" line="34" />
                <frame class="com.hp.ucmdb.discovery.library.clients.query.WMIClient" method="&lt;init&gt;" file="WMIClient.java" line="53" />
                <frame class="sun.reflect.NativeConstructorAccessorImpl" method="newInstance0" file="NativeConstructorAccessorImpl.java" line="-2" />
                <frame class="sun.reflect.NativeConstructorAccessorImpl" method="newInstance" file="NativeConstructorAccessorImpl.java" line="57" />
                <frame class="sun.reflect.DelegatingConstructorAccessorImpl" method="newInstance" file="DelegatingConstructorAccessorImpl.java" line="45" />
                <frame class="java.lang.reflect.Constructor" method="newInstance" file="Constructor.java" line="525" />
                <frame class="com.hp.ucmdb.discovery.library.clients.ClientFactory" method="createClient" file="ClientFactory.java" line="154" />
                <frame class="com.hp.ucmdb.discovery.library.clients.ClientsFrameworkImpl" method="createClient" file="ClientsFrameworkImpl.java" line="116" />
                <frame class="sun.reflect.NativeMethodAccessorImpl" method="invoke0" file="NativeMethodAccessorImpl.java" line="-2" />
                <frame class="sun.reflect.NativeMethodAccessorImpl" method="invoke" file="NativeMethodAccessorImpl.java" line="57" />
                <frame class="sun.reflect.DelegatingMethodAccessorImpl" method="invoke" file="DelegatingMethodAccessorImpl.java" line="43" />
                <frame class="java.lang.reflect.Method" method="invoke" file="Method.java" line="601" />
                <frame class="org.python.core.PyReflectedFunction" method="__call__" file="PyReflectedFunction.java" line="186" />
                <frame class="org.python.core.PyReflectedFunction" method="__call__" file="PyReflectedFunction.java" line="204" />
                <frame class="org.python.core.PyObject" method="__call__" file="PyObject.java" line="422" />
                <frame class="org.python.core.PyObject" method="__call__" file="PyObject.java" line="426" />
                <frame class="org.python.core.PyMethod" method="__call__" file="PyMethod.java" line="139" />
                <frame class="org.python.pycode._pyx111" method="mainFunction$16" file="WMI_Connection_Utils" line="524" />
                <frame class="org.python.pycode._pyx111" method="call_function" file="WMI_Connection_Utils" line="-1" />
                <frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
                <frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="134" />
                <frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="317" />
                <frame class="org.python.pycode._pyx119" method="DiscoveryMain$1" file="WMI_Connection" line="24" />
                <frame class="org.python.pycode._pyx119" method="call_function" file="WMI_Connection" line="-1" />
                <frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
                <frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="134" />
                <frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="317" />
                <frame class="org.python.pycode._pyx120" method="f$0" file="&lt;string&gt;" line="2" />
                <frame class="org.python.pycode._pyx120" method="call_function" file="&lt;string&gt;" line="-1" />
                <frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
                <frame class="org.python.core.PyCode" method="call" file="PyCode.java" line="18" />
                <frame class="org.python.core.Py" method="runCode" file="Py.java" line="1275" />
                <frame class="org.python.core.Py" method="exec" file="Py.java" line="1319" />
                <frame class="org.python.util.PythonInterpreter" method="exec" file="PythonInterpreter.java" line="206" />
                <frame class="com.hp.ucmdb.discovery.library.execution.impl.ExecutionEngineImpl" method="executeScript" file="ExecutionEngineImpl.java" line="255" />
                <frame class="com.hp.ucmdb.discovery.library.execution.impl.ExecutionEngineImpl" method="executeScript" file="ExecutionEngineImpl.java" line="229" />
                <frame class="com.hp.ucmdb.discovery.library.execution.impl.ExecutionEngineImpl" method="executeScript" file="ExecutionEngineImpl.java" line="225" />
                <frame class="com.hp.ucmdb.discovery.library.execution.impl.ExecutionEngineImpl" method="executeScripts" file="ExecutionEngineImpl.java" line="142" />
                <frame class="com.hp.ucmdb.discovery.library.execution.impl.ExecutionEngineImpl" method="execute" file="ExecutionEngineImpl.java" line="92" />
                <frame class="com.hp.ucmdb.discovery.probe.services.dynamic.core.TablesProcessorUtil" method="processDestinationTables" file="TablesProcessorUtil.java" line="140" />
                <frame class="com.hp.ucmdb.discovery.probe.services.dynamic.core.DynamicService" method="discover" file="DynamicService.java" line="76" />
                <frame class="com.hp.ucmdb.discovery.probe.agents.probemgr.taskexecuter.JobExecuter" method="launchTask" file="JobExecuter.java" line="1192" />
                <frame class="com.hp.ucmdb.discovery.probe.agents.probemgr.taskexecuter.JobExecuter$JobExecuterWorker" method="launch" file="JobExecuter.java" line="946" />
                <frame class="com.hp.ucmdb.discovery.probe.agents.probemgr.taskexecuter.JobExecuter$JobExecuterWorker" method="executeTask" file="JobExecuter.java" line="868" />
                <frame class="com.hp.ucmdb.discovery.probe.agents.probemgr.taskexecuter.JobExecuter$JobExecuterWorker" method="run" file="JobExecuter.java" line="728" />
            </stacktrace>
        </ERROR>
        <ClientProperties>
            <prop name="protocol_timeout" value="5000" />
            <prop name="protocol_netaddress" value="DEFAULT" />
            <prop name="credentialsId" value="2_1_CMS" />
            <prop name="protocol_type" value="wmiprotocol" />
            <prop name="wmiprotocol_wmidomain" value="10.6.108.71" />
            <prop name="ip_address" value="10.6.108.71" />
            <prop name="user_label" value="WMI Protocol Credential 1" />
            <prop name="protocol_username" value="hpovo.admin" />
            <prop name="protocol_in_use" value="false" />
            <prop name="cm_credential_id" value="2_1_CMS" />
            <prop name="protocol_index" value="1" />
        </ClientProperties>
    </CONNECT>
    <log start="16:14:11" severity="debug">WMI: Invalid user name or password</log>
    <log start="16:14:11" severity="debug">OSHVector contains 0 objects.</log>
    <log start="16:14:11" severity="debug">Reporting error code 302 to framework.</log>
    <log start="16:14:11" severity="debug">Error message is: WMI: Invalid user name or password</log>
    <log start="16:14:11" severity="info">Execution current time:2015/05/21 16:14:11</log>
</execution>

 

 

Thanks in advance.

 

Thanks & Regards,

Prasad

3 REPLIES
RonaldB
Respected Contributor.

Re: Host connections by wmi discovery error invalid user name and password

Hi,

 

I have some tips for you.

Check if date/time on probeserver and to discover node are equal.

Try a shorter username for wmi connection (max 10 char) also remove the dot for test from the name.

always use domain\user notation, not user@domain

 

If it keeps failing verify that wmi is actually working via wbemtest

 

1. Run wbemtest on the probeserver
2. Click on Connect.
3. Type in \\IP_ADDRESS\root\cimv2 in the first text box where <IP_ADDRESS> is the address of the Windows host you are trying to run the WMI discovery on.
4. Type in the Username and the password in the Credentials section and click connect.

5. If it connects successfully then hostconnby wmi discover alsways runs in my site.


6. For extra tests you can run a query.

For example:
select DeviceId,MaxClockSpeed,Manufacturer,LoadPercentage from Win32_Processor

and click Apply.
8. When the query result shows up, double-click on the result, and in the window that opens up, look at the Properties returned. Do you see - DeviceID, LoadPercentage, manufacturer, MaxClockSpeed all the way down and if you do, what are the values? Are the values correct? Those are the values that MAM will retrieve.

 

Gr,

Ronald

PYALCARI
Respected Contributor.
Solution

Re: Host connections by wmi discovery error invalid user name and password

issue got resolved.

 

issue is with domain name. if we left it blank in wmi credentials it will not take. in earlier version, if we left it blank by default it will take as local domain but in 10.20 we have to provide domain name. else it will give the error.

 

Thanks

santosh27
Contributor.

Re: Host connections by wmi discovery error invalid user name and password

Issue resolved !!

In the wmi credetials window, in user name just enter the "username" and not the domain\username or username.domain.com

In the domain name box: enter proper domain name

Click next, next and finish. 

Now test the wmi credentials it will be successfull.

Regards,

Santosh Deshpande