This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygrunsrv: error while starting PRNGD service


On Tue, 13 Jun 2006, Rich Chase wrote:

> I compiled PRNGD against cygwin and installed it as a cygrunsrv service.
>
> When I try to start the service, I get the infamous:
>
> "Could not start the PRNGD service on Local Computer. The service did
> not return an error.  This could be an internal Windows error or an
> internal service error. If the problem persists, contact your system
> administrator."

This message is usually an indication that you are trying to run a
daemon-type program (one that forks off the actual daemon and returns)
with cygrunsrv.  The whole intent of cygrunsrv is to take a program that
needs to run continuously in the foreground, and turn it into a daemon.

> However, I am running sshd as a service, and vnc as well -- both using
> cygrunsrv.

Notice that you needed to give the -D option to sshd to prevent it from
going into the daemon mode.

> I also am able to run prngd.exe manually without any errors or log
> output. It successfully generates random numbers, as verified by the egd
> testing perl script, and it does not terminate prematurely.

Ah, but does it run from the SYSTEM account?

> PRNGD does start an "entropy gatherer" program, which returns and
> terminates. Could this child process's termination and return value be
> causing cygrunsrv to 'think' that prngd.exe runs and then terminates? If
> it did, would prngd.exe still be running (it isn't)?

Not likely.

> Everything seems to run fine, but doesn't start as a service.
> Suggestions Please?

You have two options here: find out if there is a way to run PRNGD in
non-daemon mode (via a command-line option, for example), or read about
the --pidfile option to cygrunsrv.

Dave may also be correct that this is a permission issue -- try starting a
"SYSTEM-owned bash shell" (Google for it), and see if the program works
from there.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]