Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

It fails because your java program isn't started in the background. ‘smf(5)‘ expects the start method to return, and since yours doesn't it will hit the timeout.

You need to update the script to use

java -jar server.jar &
share|improve this answer

In checking the svc.startd man page, I'm not seeing stderr logging as a reason for failure. Check the SERVICE FAILURE section of the man page to help diagnose.

Based on the message you added, it looks like the start method is timing out. Is the service's start script putting that program ("java server.CustomServer") in the background so that it can exit?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.