bashcoldfusionsolariscoldfusion-2018

Issue Starting up ColdFusion 2018 on Solaris 11.3 on non-root account


I have a Solaris system with 3 users ( root, cfruntime , cfdev)

After a successful installation of ColdFusion 2018, the owner of the coldfusion2018 installation is cfruntime.

As cfdev I try starting ColdFusion using the following command

sudo /disktwo/coldfusion2018/cfusion/bin/coldfusion start

This however doesnt appear to start coldfusion normally, but also doesn't generate any abonormal error/log

Looking at the startup script /disktwo/coldfusion2018/cfusion/bin/coldfusion. The folllowing lines actually starts ColdFusion

CFSTART='su $RUNTIME_USER -c "LD_LIBRARY_PATH=$LD_LIBRARY_PATH; 
        export LD_LIBRARY_PATH; 
        cd $CF_DIR/bin; 
        $JAVA_EXECUTABLE -classpath $CLASSPATH $JVM_ARGS
        com.adobe.coldfusion.bootstrap.Bootstrap -start &"'

eval $CFSTART > /dev/null

An interesting observation I made was that if I removed the & at the end of the CFSTART, ColdFusion would start normally (although I need to put it in the background crtl-z , bg)

The ColdFusion process doesn't appear to be persistent after exiting the startup script if started as (cfdev/cfruntime) , but starts normally if the script is run as root.

Any thoughts?


Solution

  • Adding a nohup before the $JAVA_EXECUTABLE command and sending the output to >/dev/null 2>&1 did the trick for me

    CFSTART='su $RUNTIME_USER -c "LD_LIBRARY_PATH=$LD_LIBRARY_PATH; 
            export LD_LIBRARY_PATH; 
            cd $CF_DIR/bin; 
            nohup $JAVA_EXECUTABLE -classpath $CLASSPATH $JVM_ARGS
            com.adobe.coldfusion.bootstrap.Bootstrap -start > /dev/null 2>&1 &"'
    

    I found that it appears that switching to the runtime user su $RUNTIME_USER and starting the process in the background caused all jobs started by the shell to close once the startup script completed (sending a hangup signal (SIGHUP) to all jobs started by that terminal) .

    The nohup prevents the $JAVA_EXECUTABLE from closing when it recives the hangup signal (SIGHUP)