SMF restarting service whenever there's output?

Posted by Phillip Oldham on Server Fault See other posts from Server Fault or by Phillip Oldham
Published on 2010-03-31T12:24:24Z Indexed on 2012/09/02 9:40 UTC
Read the original article Hit count: 172

Filed under:
|
|

I'm trying to add a custom service to SMF's configuration, which seems successful in that the service starts and there is a log file, but therein lies the problem; the service, on start-up, prints some logging messages to the stderr. It seems that SMF is seeing those messages and, believing them to be errors, restarts the service, giving up after a number of tries and leaving the service off.

Here's part of the log output:

[ Mar 30 14:59:54 Enabled. ]
[ Mar 30 14:59:54 Executing start method ("java server.CustomServer"). ]
Starting server...
[ Mar 30 15:00:04 Method or service exit timed out.  Killing contract 107. ]

Running the server directly on the commandline is fine, and AFACS there are no errors being encountered during startup, other than the output.

What would be the best way to manage this service with SMF? The logging is needed for diagnosing problems, and would be problematic to disable. Is it possible to configure this service to only restart if the service exists?

© Server Fault or respective owner

Related posts about solaris

Related posts about opensolaris