01 July 2009

Status 96 error on svc.startd

I've been working with SMF on and off for a few weeks now and still get stung by this error. If you see something like this in the SVC log after enabling a service (i.e., svcadm enable mysql):

bash-3.00# cat /var/svc/log/application-database-mysql:v51.log
[ Jul 1 07:36:37 Enabled. ]
[ Jul 1 07:36:37 Executing start method ("/lib/svc/method/mysql start") ]
svc.startd could not set context for method: chdir: No such file or directory
[ Jul 1 07:36:37 Method "start" exited with status 96 ]

head over to the manifest file for the service and check the method_context section. In my case, I had no working_directory element set so adding this element solves the problem.


<method_credential user='mysql' group='mysql' />


<method_context working_directory='/usr/local/mysql'>
<method_credential user='mysql' group='mysql' />

After making this change, don't forget to import the manifest:
svccfg import /var/svc/manifest/application/database/mysql.xml

-- Craig