In /var/VRTSvcs/log/SAPNW04_A.log
2011/06/17 10:27:20 VCS INFO V-16-55000-10194 Resource(pi_ABAP_1) - (hypiprda:online) Sys:RunWithEnvCmdWithOutputWithTimeOut:User [prdadm] has sh derived native shell [/usr/bin/ksh]
2011/06/17 10:27:20 VCS INFO V-16-55000-10199 Resource(pi_ABAP_1) - (hypiprda:online) Sys:RunWithEnvCmdWithOutputWithTimeOut:Going to run command line [USER=prdadm; HOME=/home/prdadm; export USER HOME ; . /home/prdadm/sapprd.env ;/usr/sap/PRD/SYS/exe/run/cleanipc 00 remove], as User [prdadm]
2011/06/17 10:27:20 VCS INFO V-16-55000-10209 Resource(pi_ABAP_1) - (hypiprda:online) Sys:RunWithEnvCmdWithOutputWithTimeOut:Command line [/bin/su prdadm -c 'USER=prdadm; HOME=/home/prdadm; export USER HOME ; . /home/prdadm/sapprd.env ;/usr/sap/PRD/SYS/exe/run/cleanipc 00 remove'] provided a non-zero exit code -- this does not necessarily indicate a problem... (Perl's OS error variable prior to the command-pipe close was [], and after the close was [] )
2011/06/17 10:27:20 VCS INFO V-16-55000-10289 Resource(pi_ABAP_1) - (hypiprda:online) VCSagentFW:messageEngineLog:[ksh: 0403-057 Syntax error at line 12 : `newline or ;' is not expected.
]
2011/06/17 10:27:20 VCS INFO V-16-55009-20195 Resource(pi_ABAP_1) - (hypiprda:online)
2011/06/17 10:27:20 VCS ERROR V-16-55009-20160 Resource(pi_ABAP_1) - (hypiprda:online)
2011/06/17 10:27:20 VCS INFO V-16-55009-20161 Resource(pi_ABAP_1) - (hypiprda:online)
2011/06/17 10:27:20 VCS ERROR V-16-55009-20028 Resource(pi_ABAP_1) - (hypiprda:online)
2011/06/17 10:27:20 VCS ERROR V-16-55009-20310 Resource(pi_ABAP_1) - (hypiprda:online)
2011/06/17 10:27:20 VCS INFO V-16-55000-10272 Resource(pi_ABAP_1) - (hypiprda:online) VCSagentFW:entryPointExit:Exiting entry point [online] with exit code [0]
This is a SAP profile issue.
1) Check VCS main.cf
SAPNW04 pi_ABAP_1 (
Enabled = 0
EnvFile = "/home/prdadm/sapprd.env"
InstName = DVEBMGS00
ProcMon = "dw ms"
SAPAdmin = prdadm
SAPMonHome = "/usr/sap/PRD/SYS/exe/run"
SAPSID = PRD
StartProfile = "/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_hypiprd"
)
2) Check SAP env file "/ home/prdadm/sapprd.env " on this system which should be invoked by VCS;
=====================
_=/usr/bin/env
MANPATH=/usr/share/man:/opt/VRTS/man
LANG=en_US
LOGIN=prdadm
PATH=/home/prdadm:/usr/sap/PRD/SYS/exe/uc/rs6000_64:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/prdadm/bin:/usr/bin/X11:/sbin:.:/db2/db2prd/sqllib/bin:/db2/db2prd/sqllib/adm:/db2/db2prd/sqllib/misc
LC__FASTMSG=true
CLASSPATH=:/db2/db2prd/sqllib/java/sqlj.zip:/db2/db2prd/sqllib/java/db2java.zip:/db2/db2prd/sqllib/java/runtime.zip:.
LOGNAME=prdadm
MAIL=/usr/spool/mail/prdadm
LOCPATH=/usr/lib/nls/loc
PS1=hypiprda:prdadm>
DIR_LIBRARY=/usr/sap/PRD/SYS/exe/uc/rs6000_64
USER=prdadm
AUTHSTATE=files
IBM_JAVA_OPTIONS=-Xmx256M -Xj9
SHELL=/usr/bin/ksh
ODMDIR=/etc/objrepos
dbs_db6_schema=sapprd
HOME=/home/prdadm
DB2INSTANCE=db2prd
TERM=vt100
MAILMSG=[YOU HAVE NEW MAIL]
DB2DBDFT=PRD
PWD=/home/prdadm
TZ=Asia/Shanghai
dbms_type=db6
SAPSYSTEMNAME=PRD
INSTHOME=/db2/db2prd
A__z=! LOGNAME
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
LIBPATH=/usr/lib:/lib:/usr/sap/PRD/SYS/exe/uc/rs6000_64
=====================
3) According to VCS Agent for SAP NetWeaver Installation & Configuration Guide as below:
================================
Generating environments file for SAP
Veritas recommends using a custom generated environments file to configure
the EnvFile attribute of the SAPNW04 agent. The steps to generate the
environments file for SAP applications are given as follows.
To generate the environments file for SAP applications
1 Login as SAPAdmin user.
su – erpadm
2 Capture the environment with the following command.
env > /home/erpadm/saperp.env
3 Adopt this file according to the SAPAdmin user shell environment.
For example, if the generated file contains environments for bash shell and
SAPAdmin user shell is C shell, convert the file to C shell environments with
the following steps:
■ Edit the saperp.env file to add string ‘setenv’ at the beginning of each line.
■ Replace the '=' with space " " in the file.
4 Copy the saperp.env file to shared directory and use it as the SAP instance’s
environments file in EnvFile attribute. Ensure that the permissions are set
properly for user SAPAdmin.
chmod 755 saperp.env
================================
We can see the env file shoule be adopted per user shell environment after get the enviroment variable setting using command "env".
4) The current user shell is k shell, but the above env file "/ home/prdadm/sapprd.env " is not edited, it causes VCS SAPNW04 resource online is failed with the syntax error.
5) After edit the above SAP env file as below, SAPNW04 resource is online successfully by VCS.
export MANPATH=/usr/share/man:/opt/VRTS/man
export LANG=en_US
export LOGIN=prdadm
export PATH=/home/prdadm:/usr/sap/PRD/SYS/exe/uc/rs6000_64:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/prdadm/bin:/usr/bin/X11:/sbin:.:/db2/db2prd/sqllib/bin:/db2/db2prd/sqllib/adm:/db2/db2prd/sqllib/misc
export LC__FASTMSG=true
export CLASSPATH=:/db2/db2prd/sqllib/java/sqlj.zip:/db2/db2prd/sqllib/java/db2java.zip:/db2/db2prd/sqllib/java/runtime.zip:.
export LOGNAME=prdadm
export MAIL=/usr/spool/mail/prdadm
export LOCPATH=/usr/lib/nls/loc
export PS1="hypiprda:prdadm>"
export DIR_LIBRARY=/usr/sap/PRD/SYS/exe/uc/rs6000_64
export USER=prdadm
export AUTHSTATE=files
export IBM_JAVA_OPTIONS="-Xmx256M -Xj9"
export SHELL=/usr/bin/ksh
export ODMDIR=/etc/objrepos
export dbs_db6_schema=sapprd
export HOME=/home/prdadm
export DB2INSTANCE=db2prd
export TERM=vt100
export DB2DBDFT=PRD
export PWD=/home/prdadm
export TZ=Asia/Shanghai
export dbms_type=db6
export SAPSYSTEMNAME=PRD
export INSTHOME=/db2/db2prd
export A__z=$LOGNAME
export NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
export LIBPATH=/usr/lib:/lib:/usr/sap/PRD/SYS/exe/uc/rs6000_64
Applies To
AIX 6100-04 + VCS5.1 for SAP
VRTSacclib 5.2.4.0 COMMITTED Veritas Cluster Server ACC
Library by Veritas
VRTSsapnw04.rte 5.0.12.0 COMMITTED Veritas High Availability
Agent for SAP NetWeaver by
Veritas
VRTSsapwebas71.rte 5.0.6.0 COMMITTED Veritas High Availability
Agent for SAP WebAS by
Veritas
VRTSvcs 5.1.101.0 APPLIED Veritas Cluster Server by
Veritas
5.1.101.0-5.1SP1RP1-2011-01-20
_18.30.00