Solaris SMF Services – Method “start” exited with status 96

smfsolaris

Hi I'm trying to start a new service on server reboot and I got this error on start: "Method "start" exited with status 96".
Also my service in on "Maintenance" state.

My service is working when I disable/enable it, but not when I restart (wich is the goal).

I've googled the following errors and couldn't figure out what the problem is:

The error log:

svc.startd could not set context for method: chdir: Ce fichier ou ce répertoire n'existe pas

Method "start" exited with status 96 

My .xml:

<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">

<service_bundle type='manifest' name='broker2'>

<service
    name="application/broker2"
    type="service"
    version="1">
<instance name='default' enabled='true'>

    <exec_method
          type='method'
          name='start'
          exec='/lib/svc/method/svc-broker start'
          timeout_seconds='30' >

        <method_context working_directory='/users/adm0ardp'>
            <method_credential user='adm0ardp' group='gpm0ardp' />
        </method_context>
    </exec_method>

    <exec_method
           type='method'
           name='stop'
           exec='/lib/svc/method/svc-broker stop'
           timeout_seconds='3' >

        <method_context working_directory='/users/adm0ardp'>
            <method_credential user='adm0ardp' group='gpm0ardp' />
        </method_context>
     </exec_method>

</instance>             

</service>
</service_bundle>

and my script:

#!/usr/bin/sh

. /lib/svc/share/smf_include.sh

case "$1" in
  start) script_path.ksh 
;;
  stop) script_path.ksh   
;;

esac 
exit 0

Any help could be great.

Best Answer

The error shows that cd/chdir failed. Is user adm0ardp correctly specified (and spelled) and able to cd into /users/adm0ardp?

Related Topic