The WebServices are running, but the ustat does not show it as running
search cancel

The WebServices are running, but the ustat does not show it as running

book

Article ID: 427649

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

Attempted to start the WebServices by issuing the following command:

unisrvcntr start waae_webserver.<instance name>

NOTE: Replace <instance name> with the 3-letter instance name of AutoSys

The results of running unisrvcntr status waae_webserver.<instance name> returns the following:

               CA Services Status Report

 

           Component Name               Pid        Status    

------------------------------------  -------  --------------

WAAE Web Server (<instance name>)                       -  not active

 

When issuing a ustat, receiving the same results for the WAAE Web Server (instance name>

Environment

AutoSys 24.0.x, 24.1.x

Cause

This issue is caused by the owner of the $AUTOUSER/webserver folder being owned by a username with more than 8 characters? 

If the username is 8 characters or less than the default script works fine

Resolution

This issue is resolved in the AutoSys 24.2 release.

Workaround for Versions 24.0.x and 24.1.x

If you are using an earlier version, follow these steps to resolve the issue manually:

  1. Terminate existing processes: Identify and stop the running web server processes.

    Bash
     
    ps -ef | grep webserver
    kill -9 <PID>
    

    (Note: Replace <PID> with the process IDs returned from the grep command.)

  2. Navigate to the scripts directory:

    Bash
     
    cd $AUTOSYS/csutils/scripts
    
  3. Back up the configuration file: Create a backup of the waae_webserver script before editing. Replace <instance> with your specific 3-letter AutoSys instance name.

    Bash
     
    cp -rp waae_webserver.<instance> waae_webserver.<instance>_bkp
    
  4. Update the websvr_pid() function: Open waae_webserver.<instance> in a text editor and update the websvr_pid() function logic to match the following block:

# Print the web server's pid. Ignore threads with PPID != 1.
# Return a code suitable for rc_status: 0=running 1=dead.
websvr_pid() {
    # Web server status file
    if [ ! -f $WEBSVRDIR/bin/waae_webserver.${AUTOSERV}.pid ]; then
        return 1
    fi

    tpid=`cat $WEBSVRDIR/bin/waae_webserver.${AUTOSERV}.pid`
    run_as_user=`grep '^RUN_AS_USER=' $WEBSVRDIR/bin/waae_webserver.${AUTOSERV} | cut -d"=" -f2`
    PID_EXIST=false

    if [ -f /etc/rc.d/init.d/functions ]; then
        if ps axo "user:30,pid,ppid,stime,tty,start,time,cmd" | grep $tpid | grep $run_as_user > /dev/null 2>&1; then
            PID_EXIST=true
        fi
    else
        if ps -ef | grep $tpid | grep $run_as_user > /dev/null 2>&1; then
            PID_EXIST=true
        fi
    fi

    if $PID_EXIST ; then
        cat $WEBSVRDIR/bin/waae_webserver.${AUTOSERV}.pid
    else
        # kill -9 leaves the webserver pid in webserver directory. Remove it.
        rm -f $WEBSVRDIR/bin/waae_webserver.${AUTOSERV}.pid
        rm -f $WEBSVRDIR/bin/waae_webserver.${AUTOSERV}.java.status
        rm -f $WEBSVRDIR/bin/waae_webserver.${AUTOSERV}.status
        test -d /var/lock/subsys && rm -f /var/lock/subsys/waae_webserver.$AUTOSERV 2>/dev/null
        return 1
    fi
}