Link to home
Start Free TrialLog in
Avatar of plq
plqFlag for United Kingdom of Great Britain and Northern Ireland

asked on

WMI hanging and then raising Eventlog: DCOM was unable to communicate with the computer <computername> using any of the configured protocols.

This error (10009) is raised into the event log of a server when I try to call WMI methods from the server to an XP client.

The client machine was recently upgraded to xpsp2 and the problem was the same on sp1 and sp2

The server is 2003 but this also happens when I run the WMI calls from other XP machines. I have not tried from win2000 server yet.

I tried removing IPX (or was it SPX cant remember) from the Component Services properties box, so all thats left is tcpip (and then reboot), that made no difference.

The error is raised no matter what kind of call I try, for example:

                    Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!" & _
                            "\\" & sComputer & "\root\cimv2:Win32_Process")          ' this line hangs
or
                    Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
                    Set objSWbemServices = objSWbemLocator.ConnectServer(sComputer, "root\cimv2")   'this line hangs
or
                    Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
                    Set objSWbemServices = objSWbemLocator.ConnectServer(sComputer, "root\cimv2", sUser, sPass)   'this line hangs
or
                    Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
                    Set objSWbemServices = objSWbemLocator.ConnectServer(sComputer, "root\cimv2", sDomain & "\" & sUser, sPass)   'this line hangs

The hang is for 20 minutes, then...
The error to the script is -2147023174 The RPC Server is unavailable.
The error in the event log is:
DCOM was unable to communicate with the computer <computername> using any of the configured protocols.

I can authenticate from server to client (e.g. \\computer\c$) no problem, and if I authenticate first and retry, same problem

The server is logged in as administrator, there is no domain
Avatar of plq
plq
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

I tried starting the service "Remote Procedure Call (RPC) Locator" on the client. Then rebooted and tried again - same problem
SOLUTION
Avatar of NetworkArchitek
NetworkArchitek

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of plq

ASKER

Hi NetworkArchitek

Yes, RPC is running OK and always was. WMI is also started and the system can wmi into itself no problem (ie the scripts work locally ok).

I'm not sure what you mean by com+ event system ? Is that another event log ? If so how do I get to the log files ?

thanks
Avatar of plq

ASKER

I also tried connecting using windows as follows:

- Computer Management on windows 2003 box
- Connect to network computer
- Successfully connects
- Open WMI Control and right click - properties

Same error as my script comes back -

Failed to connect to \\computer
because Win32: The RPC Server is unavailable

I can do other stuff in computer management like add users
Avatar of plq

ASKER

And it also took 20 minutes before coming back with that error
Avatar of jimwasson
jimwasson

I haven't tried this using server. When we were connecting using DCOM without a domain we found that using identical accounts on both machines was the easiest setup -- that is, both machines had accounts with the exact same username and exact same password.
Avatar of plq

ASKER

Yes, thats what we have, both machines were logged in as "administrator" with the same password and both have the same workgroup name.
Avatar of plq

ASKER

I can dcom using two vb6 programs in a client server setup. thats working fine.
Avatar of plq

ASKER

I still need help on this. Here's a summary:

Connecting to WMI from another machine hangs for 20 minutes whether I connect through Control Panel WMI COntrol or through VB Script code.

The event log message is : 10009 DCOM was unable to communicate with the computer <computername> using any of the configured protocols.
The message to the program is : The RPC Server is unavailable

- Both machines on same workgroup logged in as administrator (administrator has same pwd on both)
- Have two xp clients that cause the same problem, one sp1 and one sp2.
- server can be xp or 2003, the same problem occurs
- when client is 2003, problem does not occur
I assume this is firewall related. I think XP Firewall blocks port 445 (RPC).

Try disabling your firewall if it's on.
Avatar of plq

ASKER

But I can dcom using components written in vb6 (activex dll on server and createobject on client)
ASKER CERTIFIED SOLUTION
Avatar of Asta Cu
Asta Cu
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of plq

ASKER

Microsoft told me to use msconfig to reboot in restricted mode and then gradually restore options until we find out whats causing it

Sadly the first time I put it in restricted mode it solved the problem, and then when I put it back in normal mode the problem would not appear again.



I am still researching and trying to reproduce the problem cos it does affect some of my customers, so will post any updates in here asap
Avatar of plq

ASKER

OK I have decided to split the points because the problem is not coming back now.

I think if I can reproduce the problem again in the future I now have the right tool to analyse it (msconfig), by selectively stopping services.

thanks for helping
Thank you, appreciate your response and the fine grade you've given us.

I find this also a very informative resource link about System Services...
System Services
Updated: February 2, 2004
http://www.microsoft.com/technet/security/topics/threatsandcountermeasures/secmod54.mspx

Best wishes to you,
":0) Asta
Avatar of plq

ASKER

In the last few days I had to reinstall CISCO VPN CLIENT 4.0.3. Then when I tried a remote WMI access this morning the same problem happened consistently

So I stopped the service

      Cisco Systems, Inc. VPN Service

And then the problem went away. When I restart Cisco Systems, Inc. VPN Service and the problem still does not happen, which is the same behaviour I experienced before.

So it would seem that the first time Cisco VPN client is installed it messes up something to do with WMI and DCOM and stopping and restarting the service while the machine is running permanently fixes it, whereas rebooting does not fix it.

Thank you for taking the time to give us the details and processes which resolved the issue for you.  This is excellent information and can help others who experience this roadblock as they search our previously asked questions database.  Best wishes,  ":0) Asta
Avatar of plq

ASKER

The problem has since recurred, but in this case, stopping cisco vpn service and then restarting the machine fixed it.
The additional information is valuied, plq, thanks.  ":0) Asta