Friday, September 26, 2014

Script PIA and psadmin

Depending of how you are coding your script to start/stop your webserver, it might not work.

Small example:
[root@vv-cephei-b ~]# cat
su - hcm92 <<EOF
psadmin -w start -d peoplesoft
[root@vv-cephei-b ~]# sh ./
Last login: Fri Sep 26 10:33:57 CEST 2014

Starting the domain [peoplesoft].
General Exception: null

[root@vv-cephei-b ~]#

It seems to be a known bug prior Peopletools 8.54:
Trying to Start or Stop WebLogic using psadmin while using Cron Results in Error - General Exception: null - java.lang.NullPointerException (Doc ID 1908227.1)
According to the note, it should be solved in Peopletools 8.54, and obviously it is not for me... even though I'm on the newest one, 8.54.03.

Now, rewording the script:
[root@vv-cephei-b ~]# cat
su - hcm92 -c "psadmin -w start -d peoplesoft"
[root@vv-cephei-b ~]# sh ./

Starting the domain [peoplesoft].......
Server state changed to STARTING.........
Server state changed to STANDBY..
Server state changed to STARTING..............
Server state changed to ADMIN..
Server state changed to RESUMING....
Server state changed to RUNNING..
Verifying domain status.
The domain has started.

[root@vv-cephei-b ~]#

Much better ! Bug solved.


1 comment:

Rich Langer said...

Just as a followup, the bug report has been closed as 92 - Closed, Not a Bug
The problem is that the psadmin command requires a terminal to display the .... when starting and stopping the appserver (as far as I can tell.)
However, I prefer to have peoplesoft start upon boot instead of having to manually login and start them.
I did find a workaround for my init scripts
There is a linux command called script that emulates a terminal and redirects the output.
nohup psadmin -w start -d peoplesoft
nohup script -q -c "psadmin -w start -d peoplesoft"

The other option is to use the and deployed in $PS_CFG_HOME/webserv/peoplesoft/bin/

Using Oracle Enterprise Linux 6.7

I prefer the blocking when I start/stop the webserver so I know when it is actually complete when I manually execute them.