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

Hi All,

I am getting below error while executing the mid tier services script while starting.

Starting SAS Web App Server: SASServer11_1
(this can take a while)
/sas/config/mid/Lev1/sas.servers.mid: line 192: [: users: integer expression expected
waiting 30 ...
/sas/config/mid/Lev1/sas.servers.mid: line 192: [: users: integer expression expected
waiting 30 ...
/sas/config/mid/Lev1/sas.servers.mid: line 192: [: users: integer expression expected
waiting 30 ...
/sas/config/mid/Lev1/sas.servers.mid: line 192: [: users: integer expression expected
waiting 30 ...
/sas/config/mid/Lev1/sas.servers.mid: line 192: [: users: integer expression expected
waiting 60 ...
/sas/config/mid/Lev1/sas.servers.mid: line 192: [: users: integer expression expected

 

I opened the script and checked in the line 192 ,there is only a if then statement which is a valid one i believe.

 

ROLLCHK=`ls -l $SASWEBAPPSRV_DIR/$SASWEBAPPINSTANCE/logs/server.log`
# clear leading blanks, then strip trailing filename
ROLLCHK=`echo $ROLLCHK | tr -s ' ' | cut -d ' ' -f 5`

if [ $ROLLCHK -lt $ROLLMARK ];
then
{
echo "Note: $SASWEBAPPINSTANCE server.log rolled over during startup."
MYMARK=1
}
fi

 

Please can someone help me on this please. Though the services status is howing as UP but no mid tier application is opening.

 

Thanks & Regards,

Sandeep

1 ACCEPTED SOLUTION

Accepted Solutions
alexal
SAS Employee

@sandeep_reddy,

 

Please modify lines 152 and 188 of sas.servers.mid to use "ls -n" instead of "ls -l" when querying the server.log file to get around this problem:

 

From
ROLLMARK=`ls -l $SASWEBAPPSRV_DIR/$SASWEBAPPINSTANCE/logs/server.log`
ROLLCHK=`ls -l $SASWEBAPPSRV_DIR/$SASWEBAPPINSTANCE/logs/server.log`


To
ROLLMARK=`ls -n $SASWEBAPPSRV_DIR/$SASWEBAPPINSTANCE/logs/server.log`
ROLLCHK=`ls -n $SASWEBAPPSRV_DIR/$SASWEBAPPINSTANCE/logs/server.log`


It appears that either user or group names contain spaces.

View solution in original post

8 REPLIES 8
vbkm
Fluorite | Level 6

Without going through the entire script its hard to say what happened but there's an alternative way on starting your mid-tier services if that's what you want to do right now:

You can use scripting tool to start the services:

config/Lev2/Web/Scripts/AppServer/appsrvconfig.sh start

 

Or can start individual instances if you wish to go that route!

sandeep_reddy
Quartz | Level 8

Hi Vbkm,

 

Thanks for the help. I have executed the script from below mentioned location .

 

I have seen port connection error as 

11 Oct 2017 11:30:56,840 INFO com.sas.appserver.utils.PortUtils - isPortAvailable(sasfraud server,8080) >>>
11 Oct 2017 11:30:56,842 INFO com.sas.appserver.utils.PortUtils - Connection refused
11 Oct 2017 11:30:56,842 INFO com.sas.appserver.utils.PortUtils - isAvailable=true

 

Like the above port many other ports which are related to Mid Tier. I have requested network team to resolve this issue. Hopefully this works i guess.

 

Thanks & Regards,

Sandeep

vbkm
Fluorite | Level 6
You can check if that port number is accepting any connections or may be some orphan process is running on that port which generally creates trouble when starting new instance using netstat or lsof commands (linux)
sandeep_reddy
Quartz | Level 8

Hi Vbkm,

 

I have attached the sas.servers.mid script which i using to start mid tier services. 

 

if [ $ROLLCHK -lt $ROLLMARK ];/* this is the line at 192 and both the comparison values are same */
then

 

Still when i start the services ,i am getting as [: users: integer expression expected . 

 

Thanks & Regards,

Sandeep

JuanS_OCS
Amethyst | Level 16

Hello @sandeep_reddy,

 

I agree with @vbkm, to start the servers independently might actually help. In other hand, I can see other route of actions:

 

- If it is true that the if then statement is on line 192 of the script, it can match with the error, because the error means a integer was expected and a character was received. I do not think you need to go deeper into this exact error message, but if you really want to, you can always make a backup copy of the script and modify it to see the contents of the variables that does not seem to match.

 

- what I would do, is to check the server.log file of the failing SASServer11_1. And if you cannot see this log, perhaps there is something wrong in the config (have you modified its config recently?) or permissions on the filesystem.

 

- and, of course, if everything else fails or it takes too much time, you can always rely on the excellent knowledge by SAS Technical Support.

 

Kind regards,

Juan

alexal
SAS Employee

@sandeep_reddy,

 

Please modify lines 152 and 188 of sas.servers.mid to use "ls -n" instead of "ls -l" when querying the server.log file to get around this problem:

 

From
ROLLMARK=`ls -l $SASWEBAPPSRV_DIR/$SASWEBAPPINSTANCE/logs/server.log`
ROLLCHK=`ls -l $SASWEBAPPSRV_DIR/$SASWEBAPPINSTANCE/logs/server.log`


To
ROLLMARK=`ls -n $SASWEBAPPSRV_DIR/$SASWEBAPPINSTANCE/logs/server.log`
ROLLCHK=`ls -n $SASWEBAPPSRV_DIR/$SASWEBAPPINSTANCE/logs/server.log`


It appears that either user or group names contain spaces.

JuanS_OCS
Amethyst | Level 16

Thanks a lot @alexal.

 

Any chance you could refer the re to the SAS note?

alexal
SAS Employee

@JuanS_OCS,

 

There is no SAS note. The POSIX/IEEE standard (IEEE Std 1003.1-2001) for Unix prohibits white spaces in usernames and group names.

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 

Discussion stats
  • 8 replies
  • 3724 views
  • 2 likes
  • 4 in conversation