Showing posts with label App Server. Show all posts
Showing posts with label App Server. Show all posts

Friday, December 30, 2016

DIY - PeopleSoft on the Cloud - Part 2

Now that we have the PeopleSoft PUM Image (DEMO environment) up and running on the Oracle Compute Cloud, we can move on and dive deeper into more interesting topics! This post will detail how we can set up SSH access and connect to the PUM Image via PuTTY and WinSCP to perform PSADMIN activities such as configuring, bouncing and clearing cache on the app/web/process scheduler servers.

Step 1: Create Security List for SSH access and add to the instance

Create Security List:

Oracle Compute Cloud Service console > Network tab > Security Lists > Create Security List



Create Security Rule:

Oracle Compute Cloud Service console > Network tab > Security Rules > Create Security Rules


Add Security List to Instance:

Oracle Compute Cloud Service console > Instances tab > Instances > View > Under "Security Lists" > Add to Security List

In my example, the security list that I added is called 'allow_admin_clients'.



Step 2: Configuring PuTTY and logging in to the instance using SSH

After creating the Security List and adding the instance it (step 1), we are now ready to proceed with the steps detailed in the tutorial:
- Logging in to your instance using SSH

The steps detailed in this section of the tutorial are straight forward. I was able to use the "Logging in from a Windows System" instructions and connect to my PUM image (running on OPC - Oracle Public Cloud) via SSH using PuTTY running on my on premise workstation.


Note: The first time we successfully login via PuTTY as opc user, we will be prompted to change the default password (OracleCloud). Make sure that you change and notate the new password!

Refer: Changing the default password for opc user

Step 3: Configuring WinSCP and logging in to the instance using SCP

Before I proceed with demonstrating how to access PSADMIN using PuTTY, I want to detail how to similarly configure WinSCP to connect to the instance running on OPC. I use WinSCP heavily for various activities such as navigating to and deleting web server cache folder, viewing db/app/web server log files, loading custom javascript libraries to the web server, loading custom jar files to the app/web servers and so on.

Open WinSCP > New Site
- File protocol: SCP
- Host name: Enter the public IP of your instance
- Port number: 22
- User name: opc
 Advanced Site Settings > SSH > Authentication:
- Private key file: Point to the location where you stored your SSH private key (.ppk)



Save the configuration and login. You will be prompted to enter your SSH Key passphrase.



Step 4: Accessing PSADMIN via PuTTY

We already saw in step 2, how we could connect to the instance via PuTTY. This involves using the opc user provided to us as part of the tutorial instructions.


In order to access, PSADMIN it is best if we use psadm2 (one of the default users created in PUM images). Here are the commands that allow us to switch from opc user to psadm2 user and invoke PSADMIN.

Command: sudo -s
Description: Switch to root

Command: su psadm2
Description: Switch to psadm2

Command: cd $PS_HOME/appserv
Description: Change directory to appserv folder under $PS_HOME

Command: ./psadmin
Description: Invoke PSADMIN


Once we are in PSADMIN as psadm2 user, the steps to bounce and purge cache on the app/web/process scheduler servers are the same as detailed in one of my older posts.
Refer: PeopleSoft PUM Image - Virtual Machine - How to access PSADMIN

We are now able to access PSADMIN of our demo instance (PUM image running on OPC) via PuTTY (SSH) from an on premise workstation!

Friday, May 1, 2015

DTD (Document Type Definition) Validations During Message Transformations

While testing cXML Invoice service operations in a FSCM 9.2 application, I found some interesting information regarding DTD (Document Type Definition) validation of messages particularly when there are transformations.

CXML_INVOICE is a delivered service that allows third party systems to send invoice data using cXML protocol.



When I was testing the CXML_INVOICE.v1 (synchronous service operation) in a FSCM 9.2 environment (PeopleTools 8.54.07), the service operation was returning an error although there was no issues with XML message. If the same xml message was used to invoke the CXML_INVOICE.v1 service operation in a FSCM 9.1 (PeopleTools 8.50.10), the invoice was processed without any errors.

I enabled tracing at the integration gateway and also at the message transformation level to further troubleshoot this issue. This service operation CXML_INVOICE.v1 has a transformation on the inbound request:



I found that the xml message was getting wrapped in a CDATA section as follows:

Original Request:
<?xml version="1.0"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.011/InvoiceDetail.dtd">
<cXML payloadID="TEST_INVOICE_123" timestamp="2015-03-27T06:19:25-05:00" xml:lang="en-US">
</cXML>

Request with CDATA wrapper:

<?xml version="1.0"?>
<data>
 <![CDATA[
<?xml version="1.0"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.011/InvoiceDetail.dtd">
<cXML payloadID="TEST_INVOICE_123" timestamp="2015-03-27T06:19:25-05:00" xml:lang="en-US">
</cXML>
]]>
</data>


Due to this mysterious CDATA wrapping, the message transformation failed because the CDATA section changed the entire structure of the xml causing the xsl to fail while transforming the data to the appropriate fields in the destination format.

After some research on My Oracle Support, it was interesting to find the reason for the CDATA wrapping behavior. It turns out that the CDATA wrapper was caused by DTD validation issues on the Application Server.

Notice, <!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.011/InvoiceDetail.dtd"> in the original xml? This represents the Document Type Definition for the XML document. The application server would validate any inbound XML against the DTD if the DOCTYPE information is provided. The issue here is that the application server is unable to reach the location (possibly due to firewall issues) of the DTD for validation and therefore wrapped the inbound XML in a CDATA section.

On My Oracle Support there are a couple of documents which detail similar (not same) issues and provide some workaround options.

Refer:
E-IB: Asynchronous Inbound Message With DTD Reference Was Wrapped As PsNonXML, Causing a Transformation Failure (Doc ID 1941030.1)
E-IB: DTD Validation Causes Time-Outs or Significant Delays During XML Processing (Doc ID 850271.1)

I used the workaround option to suppress DTD validation at the application server level using an Integration Broker property on the configuration file (psappsrv.cfg):

[Integration Broker]
;=========================================================================
; General settings for the Integration Broker
;=========================================================================
DTD Lookup=0

Once I made this change, the DTD validation was bypassed and subsequently the CDATA wrapper was also suppressed resulting in the transformation app engine to work as expected.

Note: This DTD Lookup IB configuration on the app server configuration file should not be confused with the ig.dtdLookup property on the IB gateway properties file.

I thought this was worth a blog post because I could not find much information on the DTD Lookup Integration Broker application server configuration in PeopleBooks (other than on My Oracle Support). Hope you find this useful!

The other workarounds that were suggested were:
  1. Remove the DTD URL from the XML documents. I don't think this is a viable option particularly in integrations that deal with third party systems where we cannot dictate the syntax and semantics.
  2. Place the DTD document that cannot be reached at its native location onto the same path on another HTTP server that is accessible to the app server (could be even the PIA web server). I found this to be a very interesting solution if we run into this issue and suppressing DTD validations is not an option. Please refer Doc ID 850271.1 for more details.

Tuesday, October 14, 2014

PeopleSoft - Mining Linux based Web/App Server Logs Using find, egrep, awk commands

This post is based on information provided to me by an ex-colleague, friend and the best PS Admin I have worked with Danny Kile. I use this regularly and find it very effective when we need to quickly investigate issues particularly in a Production Environment (with several instances of the web/app server domains).

# Change Directory to where the logs reside
# Note: I changed the directory to the appserv folder so the search would go through
# multiple domain folders (if they exist)
cd /%PS_CFG_HOME%/appserv/

# If you want all the output printed
find . -name 'APPSRV_1014.LOG' | xargs egrep '*Search Text*'

# If you just want the number of times the 'Search Text' was found
find . -name 'APPSRV_1014.LOG' | xargs egrep '*Search Text*' | wc -l

# If you want multiple days worth
find . -name 'APPSRV_101*.LOG' | xargs egrep '*Search Text*' | wc -l

#If you want to aggregate based on day or hour, etc.
find . -name 'APPSRV_101*.LOG' | xargs awk '/*Search Text*/{freq[$3]++} END {printf "\n";for(day in freq){printf "%s\t%d\n",day,freq[day];}printf "\n";printf "\n";}'

Hope this is useful. Please share any other commands/scripts that might come in handy for PeopleSoft Developers.