473,395 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

OpenSCManager FAILED 1722 RPC server is unavailable; windows services

TJ
I created a windows service using VS2005.
I created/adjusted the install class using the designer controls.
I set the user to be 'local system'.
I installed the service using the VS2005 cmd console (installutil.exe).
The service shows up fine in my services snap-in.
I can start and stop it just fine and it works great when I start it.
I can open a command window and type: net start "My Service" and net stop
"My Service" and it works great.

I have a program that must start the service like this:
c:\windows\system32\sc.exe \\mymachinename start "My Service"

Now is when my problem arises. Using the sc.exe (like in the line above) to
start/stop the service throws the following error:
[SC] OpenSCManager FAILED 1722:
The RPC server is unavailable.

This is on Win2003SvrSP1
Using some rpc tools in the Windows Resource Kit didn't reveal anything -
though I don't have much experience w/ those tools and could have not
testing something correctly.
The RPC server service is started. Again, my custom windows service works
just fine if I start/stop in the mmc or use 'net start/stop' from a command
line. I just can't for the life of me get sc.exe to start/stop it w/o
throwing that 'RPC server is unavailable' error.

I mean everything was done clean and out of the box. It's practically a
HelloWorld windows service created in VS2005 C# and immediately installed
using installutil.exe all self contained on a single Win2003Svr machine.
This should be a textbook helloworld windows service. Does anyone know how
I can use sc.exe to start/stop w/o throwing that awful error?
Oct 12 '07 #1
1 15011
TJ
Because the service I'll be calling is installed on the same machine as the
bat file that is calling it, I don't necessarily have to use sc.exe and it's
remote capabilities. But I also can't use net start/stop either. But I
found netsvc.exe in one of the old nt resource toolkits - and it does
exactly what I need it to do.
"TJ" <te****@newsgroups.nospamwrote in message
news:OG**************@TK2MSFTNGP02.phx.gbl...
>I created a windows service using VS2005.
I created/adjusted the install class using the designer controls.
I set the user to be 'local system'.
I installed the service using the VS2005 cmd console (installutil.exe).
The service shows up fine in my services snap-in.
I can start and stop it just fine and it works great when I start it.
I can open a command window and type: net start "My Service" and net stop
"My Service" and it works great.

I have a program that must start the service like this:
c:\windows\system32\sc.exe \\mymachinename start "My Service"

Now is when my problem arises. Using the sc.exe (like in the line above)
to start/stop the service throws the following error:
[SC] OpenSCManager FAILED 1722:
The RPC server is unavailable.

This is on Win2003SvrSP1
Using some rpc tools in the Windows Resource Kit didn't reveal anything -
though I don't have much experience w/ those tools and could have not
testing something correctly.
The RPC server service is started. Again, my custom windows service works
just fine if I start/stop in the mmc or use 'net start/stop' from a
command line. I just can't for the life of me get sc.exe to start/stop
it w/o throwing that 'RPC server is unavailable' error.

I mean everything was done clean and out of the box. It's practically a
HelloWorld windows service created in VS2005 C# and immediately installed
using installutil.exe all self contained on a single Win2003Svr machine.
This should be a textbook helloworld windows service. Does anyone know
how I can use sc.exe to start/stop w/o throwing that awful error?

Oct 15 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Francis Lavoie | last post by:
Is it possible to restart windows services? (remotely and locally) Because I have a little script that retreive the LastWaitTimeout key of the automatic update, delete that key if it out schedule...
8
by: Bill Sonia | last post by:
I've written a Windows Service to send e-mails on events like OnStart, OnStop, OnShutDown using System.Web.Mail. It works for everything but OnShutdown. My guess is that for OnShutDown, once my...
1
by: Al | last post by:
I have a single project that contains 8 different windows services. There is a seperate installation project in the solution for the Windows Services. Both projects build fine with no errors. The...
1
by: jzink | last post by:
I need to create a asp.net page that will have the ability to start and stop and windows service that we have created. Is there an api or something that I can use to interact with windows services ?
1
by: robby valles | last post by:
My company has a large windows form app with the datalayer being webservices. pretty randomly the webservice calls will either be very slow or i'll get the server unavailable. there are times when...
3
by: Reza | last post by:
Hello I tried this friday, but didn't get anywhere so trying again Basically, I have a fixed list of people that can access the application in the Intranet, and with the policy of the company the...
17
by: Jon B | last post by:
Hi All! I have a ASP.NET 2.0 site that works on the Windows 2000 Server. However, when I tried to view this site on my local Windows XP machine, I get "Server Unavailable". If I switch the...
1
by: Lonewolf | last post by:
Hi, could someone please enlighten me on how I could turn on the above mentioned two windows services programmatically? Reason is i am writing a program which needs to turn on these two services...
6
by: =?Utf-8?B?RGlvZ28gQWx2ZXM=?= | last post by:
Greetings everyone, I am trying to access my SQL Server 2005 database with a windows service, the problem is that I can't access it! It says ERROR Login failed for user 'ONEWORLD\N5DALVES$'....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.