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
                    Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
                    Set objSWbemServices = objSWbemLocator.ConnectServer(sComputer, "root\cimv2")   'this line hangs
                    Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
                    Set objSWbemServices = objSWbemLocator.ConnectServer(sComputer, "root\cimv2", sUser, sPass)   'this line hangs
                    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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

plqAuthor Commented:
I tried starting the service "Remote Procedure Call (RPC) Locator" on the client. Then rebooted and tried again - same problem
Hi plq,
What about Com+ Event System? You shouldn't need to manually start the Locator service as long as the one above it Remote Procedure Call (RPC) is running.

plqAuthor Commented:
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 ?

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

plqAuthor Commented:
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
plqAuthor Commented:
And it also took 20 minutes before coming back with that error
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.
plqAuthor Commented:
Yes, thats what we have, both machines were logged in as "administrator" with the same password and both have the same workgroup name.
plqAuthor Commented:
I can dcom using two vb6 programs in a client server setup. thats working fine.
plqAuthor Commented:
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.
plqAuthor Commented:
But I can dcom using components written in vb6 (activex dll on server and createobject on client)
Asta CuTechnical consultant & graphic designCommented:
Since you experience this problem with SP1 and SP2 .... and since SP2 still has FREE MS support, I'd highly recommend using that option to escalate the issue and get some Microsoft help, while still free.  I've had very good results using their TechChat interface for SP2 related issues and feel it's worth a shot given the time you've spent here and the persistence of the problem.  Further feel that as we escalate such issues to the owner of the applications, we can help for a fix in the next release, so a win/win scenario.  Here's the XP SP2 free support link, free phone service included, but I've preferred the chat interface since the response is immediate.

Best wishes for a good solution, and look forward to hearing further.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Brendt HessSenior DBACommented:
One thing to look at is Q242022 on the MS Knowledgebase.  This can actually lead to your issue if you have none of the connection-oriented protocols defined in your DCOM setup.


You might also want to look at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndcom/html/msdn_dcomfirewall.asp for some additional info, but this is getting out of date.
plqAuthor Commented:
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
plqAuthor Commented:
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
Asta CuTechnical consultant & graphic designCommented:
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

Best wishes to you,
":0) Asta
plqAuthor Commented:
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.

Asta CuTechnical consultant & graphic designCommented:
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
plqAuthor Commented:
The problem has since recurred, but in this case, stopping cisco vpn service and then restarting the machine fixed it.
Asta CuTechnical consultant & graphic designCommented:
The additional information is valuied, plq, thanks.  ":0) Asta
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.