Category: Server Administration

PIA needs JRockit!

The other day, I was trying to finish up an install for someone, and ran into a problem.  I couldn’t get psadmin to create a new PIA domain.  Finally, thanks to OTN, I found that I had to have JRockit JDK set as the Java environment for WebLogic.  Note that this was to create the domain not just start the domain.

Logs

If there was one thing I could change about this whole thing, it would the logs.  I spent so long on this issue just because I had no clues.  We have got to have more logs to look at for clues!  If am missing something, please comment below and point it out.  If not, Oracle, please add some logging — at least maybe print out what JVM it is using.

This is the first log file that I found: <PS_CFG_HOME>/webserv/piainstall_<domain name>.log

Install Action : CREATE_NEW_DOMAIN

Creating Domain...

Deploying Web Applications...

Deploying WebLogic Extension files...

Deploying PeopleSoft Site files...

Deploying PeopleSoft Site Doc files...

Completed.

PS_CFG_HOME: /psoft/pscfgs/fnprd

PIA_INSTALL_FAIL

This is the second log: /tmp/piaInatallLog_<timestamp>

Install Action : CREATE_NEW_DOMAIN

Creating Domain...

Deploying Web Applications...

Deploying WebLogic Extension files...

Deploying PeopleSoft Site files...

Deploying PeopleSoft Site Doc files...

Completed.

Also, in <PS_CFG_HOME>, I found the  wlspiainstall.properties which included all of the settings that it was using to create the domain.

Avoiding the Error

The best way to avoid this error is to make sure that you set the JAVA_HOME to your JRockit installation before installing WebLogic.  So, assuming that you have JRockit installed at /opt/jdk, you can run something like this:

export JAVA_HOME=/opt/jdk
export PATH=$JAVA_HOME/bin:$PATH
which java
java -version

Your output should look something like this:


$export JAVA_HOME=/opt/jdk
$export PATH=$JAVA_HOME/bin:$PATH
$which java
/opt/jdk/bin/java
$java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Oracle JRockit(R) (build R28.1.0-123-138454-1.6.0_20-20101014-1350-linux-x86_64, compiled mode)

If it looks like this, you have something wrong.  This is open source OpenJDK JVM:


$which java
/usr/bin/java
$java -version
java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)

Or, this is the Sun JDK, which caused me problems:


$java -version
java version "1.5.0_30"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_30-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_30-b03, mixed mode)

Now, once you have that correct, you should run the Weblogic install from that command-line session.

Fixing the Problem

Now, my problem was that Weblogic had already been installed.  Apparently, it was using the Sun JDK instead of the JRockit JDK.  Normally, I would look in the <PS_CFG_HOME>/webserv/<domain>/bin/setcmd…. file to change the setting.  But, I don’t even have the domain installed at this point.

I found that I could set the JAVA_HOME and JAVA_VENDOR variables in the <weblogic home>/wlserver_10.3/common/bin/commEnv.sh file.  Note that the JAVA_VENDOR was required.  If it is not set, some of the logic later on in the script overwrites the JAVA_HOME.

So, I added these two lines near the top between the comments:


#
#*****************************************************************************

JAVA_HOME=/opt/jdk
JAVA_VENDOR=Oracle

#*****************************************************************************
# sub functions
#*****************************************************************************

After that, my PIA built with no problem.

Resources

OTN: unable to create Web Server Domain

Sudo Plus X11 Forwarding

I had trouble the other day running the Oracle installer in GUI mode over SSH.  I had the -X option set, and I could run a GUI program as myself.  The problem was that I couldn’t run the GUI program after I used sudo to change to my oracle user.

I found the answer on the “Bag of Tricks” blog:

Bag of Tricks: x forwarding and sudo for oracle installs

To build upon that, I turned it into a script.  The script adds the x cookie, runs an interactive bash, and finally removes the cookie at the end.


#!/bin/sh

user=$1
if [ -z "$user" ]; then
 user=<default user>
fi

displayNum=`echo $DISPLAY | sed -e 's/^.*://' -e 's/\.[0123456789]*//'`
echo "Display # = $displayNum"
cookie=`xauth list | grep ":$displayNum"`
echo "Cookie = $cookie"
cookiename=`echo $cookie | sed 's/\s*MIT-MAGIC.*$//'`
echo "Cookie Name: $cookiename"
echo "user = $user"
sudo -u $user bash -c "xauth list; xauth add $cookie; bash; xauth remove $cookiename"

I put the script in my ~/bin directory and called it ms (my-sudo).  That way I could call it easily.

I hope someone finds that usedful.  Any comments are welcomed.

How to Change the SysAdm Password

Nicolas Gasparato wrote a rather thorough article on the subject of user password, and mostly, I just want to capture a bookmark to it on my blog:

On The Peoplesoft Road: PeopleSoft Passwords

The best way that I have found to change the SYSADM password (the database user that PeopleSoft uses to connect) is to use Data Mover and the change_access_password command.

You can read the official documentation on the command here:

PeopleBooks: change_access_password

The syntax looks something like this:


change_access_password SYSADM1 <new password>;

The first parameter is the Symbolic ID.  While it is probably SYSADM1, you can read it from the PSACCESSPRFL table:


select * from PSACCESSPRFL

The second parameter is the new password that you want to use.

The command will both change the password in the database and change the place where PeopleTools stores the password to use when connecting.  You will still probably still want to clear the cache and restart the servers including app, batch, and web.

Script for Finding PeopleSoft Processes

I accidentally deleted a PeopleSoft Home without shutting down the app server.  So, I had to find all of the processes and manually kill each one of them.  A normal “ps -ef | grep FN91TST” didn’t cut it.  The app server spins off some JSL and WSL processes that don’t have the environment name anywhere in the command.

Here’s the script that ended up doing the job:


#!/bin/bash

PS_USER=psoft
TARGET_PS_HOME=/psoft/FN91TST

for e in `ls /proc/*/environ`; do
  PID=`echo $e | sed -e 's#/proc/##' -e 's#/environ##' `
  if [ -e $e ]; then
    if [ `stat -c %U $e` == $PS_USER ]; then
      CURR_PS_HOME=`cat $e | tr '\0' '\n' | grep "^PS_CFG_HOME" | sed 's/^PS_CFG_HOME=//'`
      if [ "$CURR_PS_HOME" == "$TARGET_PS_HOME" ]; then
        echo "PID: $PID Home: $CURR_PS_HOME"
        ps $PID
      fi
    fi
  fi
done

Note: This script assumes that you are using PeopleTools 8.52 with the PS_CFG_HOME variable configured. If not, you’ll need to change it to either the PS_HOME or PS_APP_HOME variable.

Great Links: Oracle Database Administration Commands

This article is just to remember some links that I found while working on some database issues.  Maybe they will help someone else:

Viewing the Large Pool Size (from here):

SELECT name, SUM(bytes) FROM V$SGASTAT WHERE pool='large pool'
GROUP BY ROLLUP(name);

Here are the command to view the different memory related settings/parameters (from here):

show parameter sga_target

show sga

show parameter pool

Flushing cache, etc. (from here)

alter system flush buffer_cache;

alter system flush shared_pool;

alter system switch log_file;

Resources

How to Edit PTIBUpgrade.DMS

While upgrading PeopleTools, one of the steps you have to go through is running this PTIBUpgrade Data Mover script.  It took me a bit to figure out what the values are for the script.

This ITToolbox Thread helped a little bit.

There are 3 values that you have to change in this script.  These are the values that I used:

  • Specified Default User ID: PSEM
  • Specified Default Service Namespace: <your login URL or:> http://xmln.oracle.com/enterprise/tools/service
  • Default Permission List: PTPT1000

The namespace is the option that confused me the most.  According to PeopleBooks, “The namespace field on the Service pages provides qualification for attributes and elements within a WSDL document.  The value defined in the Service Namespace field in the Service Configuration page is used as the default service namespace on the Services page. The default value is http://xmln.oracle.com/enterprise/tools/service.”

If you have better suggestions for the values to use, please comment!

Resources

 

Finding TNSNames Path

Thanks to this post on StackOverflow, I learned a new trick with diagnosing TNS Names issues.  First, you need to download this tool called Process Monitor from SysInternals.

Installing the program is pretty easy.  Simply unzip the program and place it in a good location such as the Program Files directory:

Process Monitor Installed

I always like to create a shortcut in the Start Menu.  If you right click on the Programs menu in your Start Menu, you can choose the open option to open it.  Then, drag with your right mouse button, and you can drop a shortcut in your start menu:

Shortcut for Process Monitor

Once you have Process Monitor installed, you can use the filter to narrow it down to show where it is looking for tnsnames.  Here is what I found that works:

Process Monitor Filter

Add the process name for the process that you want to check.  Use psdmt for Data Mover.  pside for App Designer.  PrcsAppSrv for the App Server launched by psadmin.

Then, if you put tnsnames in for the Path it will show where it is looking for the tnsnames file.

This tool works great for all kinds of situations.  I have also used it to diagnose other connection issues.  I found it was loading the wrong Oracle client on one installation.  I found it was looking in the registry in the wrong place for Tuxedo settings because I had the wrong version.

So, this is a great tool that will help with troubleshooting.

Resources

SysDBA Connection Woes — Simple Fix

I needed SYSDBA privileges in order to extend a data file, and I could not make that happen for some reason.  I felt rather silly when I figured it out.  I’ve got to write it down in case I ever need to come back to it.

First, I opened SQLPlus without logging in:

sqlplus /nolog

Then, in SQLPlus, I tried to connect using OS authentication with SYSDBA access.  Here’s the command:

connect / as sysdba

The only response I could get was:

ERROR:
ORA-01031: insufficient privileges

I jumped through hoops trying to change the password for sys.  I regenerated the file password file.  Nothing helped.  Finally, I ran across this post that led me to check the OS group. All I had to do was put my Windows User into the Windows group for database administration.

I opened the start menu and right clicked on “My Computer”.  Then, I chose Manage from the menu.  In the Manage utility I went to “Local Users and Groups”, then I clicked on the Groups folder.  In the groups folder I double clicked on the “ORA_DBA” group to open the properties.  On the “Members” tab, I added my Windows username to the list.

From there, the connect worked fine.  To complete the story, here’s the resize SQL that I used:

ALTER DATABASE
TEMPFILE '<path to file>\pstemp01.dbf'
AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED

For me, the temp space was causing me trouble.  If you want to use a regular tablespace, the syntax is similar:

ALTER DATABASE
DATAFILE '<path to file>\<data file>'
 AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED

Quick Note: Invalid Version of PSORA

These days the 32-bit / 64-bit Windows situation is quite frustrating!  We need everything to be either 64-bit or 32-bit.  This half and half stuff makes things challenging.

This post is just a quick note to remind you (and me) that even though you are running 64-bit Windows and 64-bit Oracle database, the PeopleTools on Windows is still 32-bit.  Data mover and the App Server both require a 32-bit database client to talk to the database.

If you don’t install a 32-bit Oracle client, you may get an error that reads something like this:

PS General SQL Routines: Missing or invalid version of SQL library PSORA (200,0)<

Resources:

Troubleshooting Report Repository Error

I thought I had my environment built, but I keep finding little problems.  Well, this time it was the report repository.  I got the reports posting, and I thought I was home free.  The solution ended out being simpler than I thought.

Let me just walk you through some of the things I checked to see if it helps any of the problems you may be having.

My specific error was: “Site name is not valid“.

The cause was that my Report Repository path was not configured.  PeopleTools > Web Profile > Web Profile Configuration

Blank Report Repository Path

The catch was that somehow I got mixed up on which Profile I was using.  You can check your profile easily from the Web Profile History:

Determining Current Web Profile from Last Loaded

On the search page of the Web Profile History, you can see which profile was loaded last.  You can sort the list by clicking on the “Profile was Loaded” heading.  If you click a second time, it will sort it descending.  Notice that previously I was using the Dev profile on port 8000.  When I last installed PIA, I must have configured it for the Prod profile on Port 80.  So now, I need to configure things on the Prod profile.

Here’s some other things you can check.  Make sure your distribution node is connected to your server:

Report Node connecting to Server

Then, check the Report Node.  Make sure the URL matches the URL you are using to connect to the Portal.  The domain name and port should match.  If there is no port number like mine, you are using port number 80.  Then, check the portal domain name.  For me, I am using the default “ps”.

According to this post, you also need to check the local node.  In PeopleTools > Portal > Node Definitions, look for the node with Local Node set to “Y”:

Default Local Node Search

Now, make sure the node is set to password authentication.  I am not sure what else to check here.

Node Options

Finally, check your configuration.properties file for the path.  I am not sure what this setting controls because mine was wrong just now, yet it seemed to be working.

Look in <PS Home>\webserv\<domain>\applications\PORTAL.war\WEB-INF\psftdocs\<domain>\configuration.properties.

configuration properties location

The Repository path is in that file:

Repository Setting in Configuration.Properties

Resources