BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

I am getting below error while submit the job schedule.sh: - 

 

ERROR: Unrecognized SAS option name USERMODS_OPTIONS.
ERROR: (SASXKRIN): KERNEL RESOURCE INITIALIZATION FAILED.
ERROR: Unable to initialize the SAS kernel.

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Replace this

USERMODS_OPTIONS="-memsize 0 -cpucount ACTUAL "

with these two lines

-memsize 0
-cpucount ACTUAL

the USERMODS_OPTIONS= line was meant for a shell script, but not a SAS configuration file.

View solution in original post

12 REPLIES 12
Kurt_Bremser
Super User

USERMODS_OPTIONS is a UNIX environment variable set in the _usermods.sh extension to the shell script.

It should be called in the main shell script as $USERMODS_OPTIONS (inside double quotes).

This seems to have been modified in a faulty way, or setting it was removed from the _usermods.sh, or the _usermods.sh is no longer called from your shell script.

 

To verify this, post the schedule.sh shell script code.

sewa_bal_gmail_com
Quartz | Level 8

Thanks for reply.

 

I can see there is no value has been defined on /opt/sas/config/Lev1/SASApp/sas_usermods.sh

 

SAS_USERMODS_OPTIONS=

 

Please explain in very simple steps how to fis this issue.

sewa_bal_gmail_com
Quartz | Level 8

Please see below schedule.sh script

#!/bin/bash
#
# schedule.sh
#
# syslog Schedule AutoLoad.sas
#

RUNSAS_PATH="/opt/sas/config/Lev1/Applications/SASVisualAnalytics/VisualAnalyticsAdministrator/runsas.sh"
TIME_INTERVAL_MINUTES=15


#call to runsas.sh
cat <(fgrep -i -v $RUNSAS_PATH <(crontab -l)) <(echo "*/$TIME_INTERVAL_MINUTES * * * * $RUNSAS_PATH > /dev/null ") | crontab -

JuanS_OCS
Amethyst | Level 16

@sewa_bal_gmail_com,

 

I guess @Kurt_Bremser meant more scripts, this one cannot give us much information. So, runas.sh and its dependent scripts.

sewa_bal_gmail_com
Quartz | Level 8

Please see below runsas.sh script. 

 

#!/bin/bash
#
# runsas.sh
#
# syslog Run AutoLoad.sas
#

# Source level_env
. /opt/sas/config/Lev1/level_env.sh

SERVER_CONTEXT=SASApp
APPSERVER_ROOT=$LEVEL_ROOT/$SERVER_CONTEXT
AUTOLOAD_ROOT=/opt/sas/config/Lev1/Applications/SASVisualAnalytics/VisualAnalyticsAdministrator

FILENAME="$AUTOLOAD_ROOT/AutoLoad.sas"
LOG_FILE="$AUTOLOAD_ROOT/Logs/AutoLoad_#Y.#m.#d_#H.#M.#s.log"
LST_FILE="$AUTOLOAD_ROOT/Logs/AutoLoad.lst"
PID_FILE=$AUTOLOAD_ROOT/autoload.pid
CFG_FILE="$AUTOLOAD_ROOT/AutoLoad.cfg"
MOD_FILE="$AUTOLOAD_ROOT/AutoLoad_usermods.cfg"

# Set config file path
export SASCFGPATH="$APPSERVER_ROOT/sasv9.cfg, $APPSERVER_ROOT/sasv9_usermods.cfg, $CFG_FILE, $MOD_FILE"

# Function to run the autoload.sas program and save the pid
fnRunSAS()
{
cd $APPSERVER_ROOT
$SAS_COMMAND -sysin $FILENAME -log $LOG_FILE -print $LST_FILE -batch -noterminal -logparm "rollover=session" &

echo $! > $PID_FILE
}

# Ensure process listed in autoload.pid is not running
if [ -f $PID_FILE ]; then
kill -0 $(< $PID_FILE) > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "autoload still running (pid $(< $PID_FILE))"
exit 1
else
fnRunSAS
fi
else
fnRunSAS
fi

exit 0

Kurt_Bremser
Super User

I see no reference to USERMODS_OPTIONS or SAS_USERMODS_OPTIONS here.

Next inspect all the .cfg files named. Changes from the default should only be made in the _usermods.cfg files.

JuanS_OCS
Amethyst | Level 16

And their parents.

 

One example is  as on your code:

CFG_FILE="$AUTOLOAD_ROOT/AutoLoad.cfg"
MOD_FILE="$AUTOLOAD_ROOT/AutoLoad_usermods.cfg"

 

You might want to check your SASApp and SASApp/WorkspaceServer folder as well.

sewa_bal_gmail_com
Quartz | Level 8

Please see below AutoLoad_usermods.cfg file.

/*
* AutoLoad_usermods.cfg
*
* This config file extends options set in sasv9.cfg.
* Place your options specific to this AutoLoad in this file.
*
* Do NOT modify the AutoLoad.cfg file.
*
*/
USERMODS_OPTIONS="-memsize 0 -cpucount ACTUAL "

 

 

and autoload.cfg file

 

/*
* AutoLoad.cfg
*
* This config file should not be edited.
*
* Place SAS option customizations specific to this AutoLoad in
* AutoLoad_usermods.cfg
*
*/

 

 

 

Kurt_Bremser
Super User

Replace this

USERMODS_OPTIONS="-memsize 0 -cpucount ACTUAL "

with these two lines

-memsize 0
-cpucount ACTUAL

the USERMODS_OPTIONS= line was meant for a shell script, but not a SAS configuration file.

sewa_bal_gmail_com
Quartz | Level 8

Thanks....Now I am getting SAS error while loading data into LASR server . Please find sas log.

JuanS_OCS
Amethyst | Level 16

Hello @sewa_bal_gmail_com,

 

If this is a continuation of https://communities.sas.com/t5/SAS-Visual-Analytics/Unable-to-load-data-into-Lasr-server-via-autoloa... please close one of the two topics. It makes sense to open this one here if it is a more technical question, but then, please close the other one and mark the most suitable solution to the initial question.

 

Besides this, this message seems to me again a problem of permissions, your user cannot access the usermods file/s. Your Linux administrator should be able to help you properly.

 

Thank you!

Best

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 12 replies
  • 2629 views
  • 3 likes
  • 3 in conversation