Architecting, installing and maintaining your SAS environment

SAS MID Tier Services script error

Accepted Solution Solved
Reply
Contributor
Posts: 61
Accepted Solution

SAS MID Tier Services script error

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


Accepted Solutions
Solution
‎10-15-2017 08:32 PM
SAS Employee
Posts: 319

Re: SAS MID Tier Services script error

[ Edited ]
Posted in reply to sandeep_reddy

@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


All Replies
Occasional Contributor
Posts: 5

Re: SAS MID Tier Services script error

Posted in reply to sandeep_reddy

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!

Contributor
Posts: 61

Re: SAS MID Tier Services script error

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

Occasional Contributor
Posts: 5

Re: SAS MID Tier Services script error

Posted in reply to sandeep_reddy
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)
Contributor
Posts: 61

Re: SAS MID Tier Services script error

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

Trusted Advisor
Posts: 1,429

Re: SAS MID Tier Services script error

Posted in reply to sandeep_reddy

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

Solution
‎10-15-2017 08:32 PM
SAS Employee
Posts: 319

Re: SAS MID Tier Services script error

[ Edited ]
Posted in reply to sandeep_reddy

@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.

Trusted Advisor
Posts: 1,429

Re: SAS MID Tier Services script error

Thanks a lot @alexal.

 

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

SAS Employee
Posts: 319

Re: SAS MID Tier Services script error

Posted in reply to JuanS_OCS

@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.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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