Installation Guide (Java 6.X)
Introduction
This document details the installation instructions for the SAP PowerConnect Java monitoring agent v6.x. This installation must be performed using an account that has administrator privileges, preferably the administrator user is used. Please check the known issues KB before you begin.
Known Issues
Below is a list of known issues and their associated KB articles.
Issue | KB Article |
PowerConnect agent fails to start java.lang.ClassNotFoundException: org.osoa.sca.sdo.ComponentType appears in defaultTrace.log | This is a known SAP issue with NW 7.5 SP. Fix is in SAP note 2186799 - Receiving a Deployment Exception That the SCA Application Cannot Be Started and is fixed by applying FRAMEWRK SP2 or higher. This is an SAP defect and needs to be resolved by applying this note. |
Prerequisites
· SAP NetWeaver 7.4 and above with valid license
· 100 MB free disk space in the database
· Administrator credentials to the SAP NetWeaver system
· Latest version of SUM and access to run SUM on the SAP NetWeaver application server (alternatively telnet can be used to deploy/undeploy java code into SAP NetWeaver Java systems, this is for expert users only)
· Splunk Enterprise v7.1 or higher
· HEC endpoint setup on indexer or heavy forwarder (use link for setup instructions)
· Access from the SAP app server (any port) to the Splunk HEC port (default 8088)
Java agent installation steps
Installation of the software using SUM or telnet
a. SAP PowerConnect Java monitoring agent
b. SAP PowerConnect configuration GUI
Initialization of database table to store configuration
Create PowerConnect user in java UME
Granting security permissions
Apply permissions to SAP PowerConnect Agent
Install license key
Configuration of SAP PowerConnect Agent
Using SUM
To install the SAP PowerConnect Java monitoring agent perform the following steps.
Acquire the PowerConnect agent from file sap-powerconnect-java-X.X.sca. If you don’t have access to this file, connect with your reseller or us directly support@powerconnect.io.
Download the latest SUM and unpack it using SAPCAR to a directory on the SAP application server, in this example we have unpacked SUM to c:\temp\SUM.
Run STARTUP.BAT.
Open a browser and connect to the Java SUM control page https://<host>:1129/lmsl/sumjava/<SID>/index.html. In case you’re not using SSL, open http://<host>:1128/lmsl/sumjava/<SID>/index.html.
Enter <sid>adm credentials
Locate the PowerConnect SCA file
Provide the directory of the installation file
Enter J2EE administrator credentials
The PowerConnect Java agent is successfully installed. If it fails for any reason send the SUM logs to your PowerConnect reseller.
Using telnet (alternative install option)
You can optionally use telnet to deploy the SCA file instead of using SUM, this is supported by SAP for advanced / expert users and has the following advantages.
· No need to setup or configure SUM
· Can also un-deploy an SCA or individual component
· Can upgrade non-sequential version
· Can upgrade / deploy / remove a component that can not be maintained using SUM for any reason
The steps to perform a telnet based deployment of the PowerConnect SCA are below:
First log in to the J2EE telnet port (5XX08) where XX is the J2EE instance number, in this example it is port 50008, as the SAP instance number is 00.
To deploy a the PowerConnect SCA in to the environment use the following command
deploy C:\temp\powerconnect\sap-powerconnect-java-6.0XX.sca (XX = SP version number)
Once deployment is successful
Run the list_app command again to confirm the PowerConnect agent is installed and running
list_app|grep -i power
You can also confirm this in the NetWeaver administrator:
Creating security user and role
Once the agent is installed, there are some basic security objects that need to be created, these include:
Create PowerConnect role
Open a browser and navigate to the User Administrator page http://<sap host>:<sap port>/useradmin/index.jsp
Select Criteria=Role
Click Create Role
Search for JmxManageAll in available actions & highlight both roles
The roles should appear on right in Assigned Actions
Search for SystemInfo_Support_Role
Highlight it and click ADD
Ensure these 3 roles are on the right
· SystemInfo_Support_Role
· JmxManageAll x2
And click SAVE
Create powerconnect technical user
Open a browser and navigate to the User Administrator page http://<serverhost>:<port>/useradmin/index.jsp
Click Create User
Create user powerconnect (all lowercase), enter password, and set it as a Technical User
Add the following 5 roles to the user
NAME | DESCRIPTION | MANDATORY | RELATED MONITORING PLUGIN |
JmxManageAll | Required for PowerConnect to be able to query JMX | Yes | JMX |
SAP_XI_API_DEVELOP_J2EE | Required for PowerConnect to be able to retrieve PI Channel status | No | PI |
SAP_XI_API_DISPLAY_J2EE | Required for PowerConnect to be able to retrieve PI Channel status | No | PI |
NWA_READONLY | Required for PowerConnect to be able to retrieve PI message meta data | No | PI |
SAP_XI_MONITOR_J2EE | Required for PowerConnect to be able to retrieve PI message meta data | No | PI |
XiMdt.ExtendedMonitor | Required for PowerConnect to be able to retrieve PI message payload | No | PI |
Applying permissions to the SAP PowerConnect Agent
Before a license can be applied the SAP PowerConnect Agent must be granted permissions to read the installation number of the SAP system.
Open a browser and navigate to the PowerConnect general page http://<serverhost>:<port>/webdynpro/resources/com.powerconnect5/spcj_wd/SapPowerConnectJava
Enter the PowerConnect User and PowerConnect Password in the Authentication section and click Save
Now restart the SAP PowerConnect Agent using the steps below Starting / Stopping Agent.
Adding License Key
After the PowerConnect agent has the correct credentials and has been restarted a license must be installed. Obtain your license from your reseller and use the below steps to install the license.
Open a browser and navigate to the PowerConnect admin page http://<serverhost>:<port>/webdynpro/resources/com.powerconnect5/spcj_wd/SapPowerConnectJava#
Enter the license key in to the License Key field, and click SAVE
If the license key validates then a message will be displayed confirming the license key is valid. If you receive an error that your license key is not vaild, then restart the agent using the steps below Starting / Stopping Agent and re-enter your license. If you continue to receive a message that your license key is not valid then collect the agent logs using the instructions in section Troubleshooting → Collecting Logs and send them to your reseller.
After you install the new license restart the agent using the steps below Starting / Stopping Agent.
Dual Stack
The PowerConnect license is generated against the installation number in the SAP license key that is installed in to the system. In Dual-Stack systems like PI, SolMan there is no license installed in the JAVA side of the dual stack installation, instead Java relies on the ABAP license. In this case there is no functionality for PowerConnect agent to check the license key in the ABAP side of the dual stack installation and therefor the Java license key can not be validated. In order to allow the PowerConnect agent to validate the license, you need to install an SAP license in to the Java stack. In the /nwa application a valid license must be shown otherwise the PowerConnect agent will not startup. You can safely run a Java license in the Java side of a dual stack solution, even when there is a license in the ABAP solution.
The /nwa must have a valid license installed, and there must be a valid installation # and SID shown.
Starting / Stopping Agent
When ever a new license is installed, or if you need to restart the agent it can be stopped using /nwa or via Telnet.
NetWeaver Administrator
Open a browser and navigate to the NetWeaver Administrator page http://<serverhost>:<port>/nwa
Open the Start & Stop Java Applications View
Search for application vendor powerconnect
Stop applications in this order
spcj_wd
spcj_app
1-2 mins later it will say stopped.
Start the applications in this order
spcj_app
spcj_wd
Telnet
Log in to the J2EE via telnet.
Check the node list
jump <ID of problematic server node>
Using following command to display the applications
To get the status of a PowerConnect application
list_app|grep -i power
To get all references for this application
app_refs_graph <app_name>
Then you may start or stop instance with following command, stop and start in the order shown below.
stop_app com.powerconnect5/spcj_wd
stop_app com.powerconnect5/spcj_app
Start is again with start_app command
start_app com.powerconnect5/spcj_wd
start_app com.powerconnect5/spcj_app
Configure PowerConnect Agent
Now that PowerConnect agent is installed, security is setup and license is installed, we need to configure the agent. There are 8 tabs to configure the agent, there are only 3 (three) that need to be configured to ensure agent is operational:
· User credentials in the General tab
· Splunk URL and HEC token in the Splunk tab
· License key License tab (which should already be installed)
For a full reference of each field refer to the full configuration reference.
General
In this tab you need to configure the PowerConnect user and credentials that you created above in Creating security user and role
Enter the user powerconnect and the password you set. Keep the case the same as the user/password created in previous steps.
user: powerconnect password: as set when you created the user (above). Both these parameters are case sensitive. |
Splunk
Splunk HEC Key: This is the HEC token that can be found in Splunk Enterprise → Settings → Data Input → HTTP Event Collector - Enter the HEC token for the HEC endpoint you want to use. Splunk HEC URL: This is the URL of the Splunk · indexer · heavyforwarder That you are sending the data to. It must include http:// or https:// at the start and be a correct URL (example http://server.domainname.com:8088 It also needs to include the HEC ports (default: 8088) and can be found in the HEC settings Splunk Enterprise → Settings → Data Input → HTTP Event Collector → Global Settings → HTTP Port Number. If you are using SSL to connect from SAP → Splunk, you must ensure that: · The URL you enter here matches the CN in the certificate loaded in to the HEC endpoint, by default this is not true, Splunk comes delivered with a self signed certificate with CN=SplunkDefaultCert. This will not pass validation inside SAP. · This URL must be contactable from the SAP application server. You can test this using curl (unix/linux), or Invoke-WebRequest (Windows/PowerShell) to ensure SAP and connect successfully to the HEC endpoint and ensure there are no port blocks in place. · Ensure the HEC endpoint certificate (if it is self-signed) or the intermediate & root signed certificates in the HEC endpoint chain are loaded in to SAP using tcode STRUSTSSO2. If you want to send the data to multiple Splunk HEC endpoints, you can specify them comma delimited, however: · there must be the same number of HEC endpoints configured as HEC tokens · They must all use the same index name, and sourcetype Example config for multiple HEC endpoints HEC Url: http://server1.example.com:8088,http://server2.example.com:8088,http://server3.example.com:8088; HEC Token:HEC-TOKEN1,HEC-TOKEN2,HECTOKEN3 This configuration will load balance the data across all 3 servers Splunk Index This is the index in which the agent will store the data. You can specify only 1 (one) index, even if you have multiple HEC endpoints. Splunk sourcetype This is the sourcetype the data is tagged with when sent to Splunk, do not change this value. |
Troubleshooting
Undeploying Java agent using Telnet.
If you wish to uninstall the PowerConnect java agent for any reason you can use the following instructions. KB099 Uninstalling SAP PowerConnect Java application v6.X
Collecting Logs.
Java collect following 3 logs from SAP java application server, export the following logs from all instances, and all server node directories (server0..X) https://wiki.scn.sap.com/wiki/display/EP/Trace+files#:~:text=Navigate%20to%20NWA%20%2D%3E%20Monitoring%2D,log%20on%20the%20J2EE%20Server.
From
\usr\sap\<SID>\JC<##>\j2ee\cluster\server<n>\log
Where:
SID = the SAP system SID
## = instance number of the SAP system
n = the java server node directory
▪ defaultTrace.X.log
▪ ApplicationTrace.X.log
▪ Powerconnect.X.log
All logs, from all serverX directories from all SAP instances need to be provided.
Also the powerconnect.log can be obtained from inside SAP in the PowerConnect control panel.