Wazuh agent Solaris 11 SMF manifest points to deleted script

69 views
Skip to first unread message

dan g

unread,
Aug 16, 2023, 10:16:41 PM8/16/23
to Wazuh mailing list
I found after installing the Solaris 11 agent on Sparc system the smf service fails after reboot or a smf restart

[ 2023 May 22 13:47:07 Executing start method ("var/ossec/installation_scripts/postinstall.sh"). ]
/usr/sbin/sh: var/ossec/installation_scripts/postinstall.sh: not found
[ 2023 May 22 13:47:07 Method "start" exited with status 127. ]
[ 2023 May 22 13:47:07 Executing start method ("var/ossec/installation_scripts/postinstall.sh"). ]
/usr/sbin/sh: var/ossec/installation_scripts/postinstall.sh: not found
[ 2023 May 22 13:47:07 Method "start" exited with status 127. ]

I have resolved it with new SMF file

Wonder if this can be included in your build 


new File 
<?xml version="1.0" ?>
<!DOCTYPE service_bundle
  SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type="manifest" name="site/wazuh-install">
    <service version="1" type="service" name="site/wazuh-install">
        <dependency restart_on="none" type="service"
            name="multi_user_dependency" grouping="require_all">
            <service_fmri value="svc:/milestone/multi-user"/>
        </dependency>
        <dependent restart_on="none"
            name="wazuh-install_multi-user-server" grouping="optional_all">
            <service_fmri value="svc:/milestone/multi-user-server" />
        </dependent>
        <exec_method timeout_seconds="60" type="method" name="refresh"
                     exec="var/ossec/bin/wazuh-control restart"/>
        <exec_method timeout_seconds="60" type="method" name="start"
                     exec="var/ossec/bin/wazuh-control start"/>
        <exec_method timeout_seconds="60" type="method" name="stop"
                     exec="var/ossec/bin/wazuh-control stop"/>
         <property_group type="framework" name="startd">
                     <propval type="astring" name="duration" value="transient"/>
        </property_group>
        <instance enabled="true" name="default"> </instance>
    </service>
</service_bundle>





Original File


/lib/svc/manifest/site/post-install.xml

<?xml version="1.0" ?>

<!DOCTYPE service_bundle

  SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>

<service_bundle type="manifest" name="site/wazuh-install">

    <service version="1" type="service" name="site/wazuh-install">

        <dependency restart_on="none" type="service"

            name="multi_user_dependency" grouping="require_all">

            <service_fmri value="svc:/milestone/multi-user"/>

        </dependency>

        <dependent restart_on="none"

            name="wazuh-install_multi-user-server" grouping="optional_all">

            <service_fmri value="svc:/milestone/multi-user-server" />

        </dependent>

        <exec_method timeout_seconds="60" type="method" name="refresh"

                     exec="var/ossec/installation_scripts/postinstall.sh"/>

        <exec_method timeout_seconds="60" type="method" name="start"

                     exec="var/ossec/installation_scripts/postinstall.sh"/>

        <property_group type="framework" name="startd">

                     <propval type="astring" name="duration" value="transient"/>

        </property_group>

        <instance enabled="true" name="default"> </instance>

    </service>

</service_bundle>

thanks All 

Dan G


Stuti Gupta

unread,
Aug 17, 2023, 12:32:49 AM8/17/23
to Wazuh mailing list
Hi Dan,
Hope you are doing well today and thank you for using wazuh.


Thanks for reporting this bug. This behavior was currently reported in #2238 and treated there. You need to disable the SMF service that launches the post-installation tasks in Solaris 11, to avoid errors in the service log, /var/svc/log/site-wazuh-install:default.log For more information, you refer to  #2238.
Hope this will be helpful. Please feel free to contact us for any information/issues.

Regards,
Stuti Gupta
Reply all
Reply to author
Forward
0 new messages