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.

Before:

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

After:

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

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


-- Craig

33 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. 看看blog調整心情,又要來繼續工作,大家加油........................................

    ReplyDelete
  3. 不斷的砍伐用的雖是小斧,卻能砍倒最堅硬的橡樹。 ..................................................

    ReplyDelete
  4. 愛惜生命的人,不可浪費時間,因為時間是組成生命的元素. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    ReplyDelete
  5. 天可補,海可填,南山可移,日月既往,不可復追。......................................................

    ReplyDelete
  6. 一個人的價值,應該看他貢獻了什麼,而不是他取得了什麼....................................................................

    ReplyDelete
  7. 愛,拆開來是心和受兩個字。用心去接受對方的一切,用心去愛對方的所有。......................................................................

    ReplyDelete
  8. 世間事沒有一樣沒有困難,只要有信心去做,至少可以做出一些成績。..................................................

    ReplyDelete
  9. 在莫非定律中有項笨蛋定律:「一個組織中的笨蛋,恆大於等於三分之二。」..................................................

    ReplyDelete