Archive

Archive for the ‘Websphere’ Category

Blog move

January 1, 2019 Leave a comment

My blog has moved to http://blog.altostratus.me

Thank you

Detect/Report orhaned objects in Datapower

December 4, 2012 Leave a comment

A quick tip from HermannSW

Simple and not well-known facility in DataPower for detecting/reporting orphaned objects!

  • open a service, eg. a XML FW.
  • then click on “Conformance” link in “General” tab
  • deselect the “WS-I-*” validators
  • select the “DataPower Configuration Profiler”
  • select what you want to validate (by default the object you opened)
  • click on “Validate”

Reported messages for one of my XML FWs (with references to the objects):
“Configuration is defined, but not referenced!!”
or
“Document cache of xml-manager is disabled. Disabling the document cache might impact the performance.”

IBM Integration Designer Installation troubleshooting

July 18, 2012 2 comments

Just spent quite a few hours troubleshooting IID V8.0 installation. Troubles started when installing DB2 Express (which comes with IID). I got to the end of installation but none of the server profiles was configured. Errors in the logs pointed to a pretty common SQL error

“SQL1092N “USER” does not have the authority to perform the requested command “

And it reported my domain Windows user account instead of “bpmadmin” user that was configured in the wizard.

Had to dig all the DB2 forums to come up with fixes. Wish IBM would document it somehow.

1. Verify user Domain Account and “bpmadmin” is part of DB2ADMNS and Administrators group

2. Verify  in DB2 SYSADM, SYSCTRL, SYSMON groups are set to DB2ADMNS

   db2 get dbm cfg

3. If they are not update groups:

db2 update dbm cfg using SYSMAINT_GROUP DB2ADMNS

db2 update dbm cfg using SYSCTRL_GROUP DB2ADMNS

db2 update dbm cfg using SYSMON_GROUP DB2ADMNS

db2 update dbm cfg using SYSADM_GROUP DB2ADMNS

4. Check that DB2_GRP_LOOKUP=TOKEN to make sure it works with domain account:

  db2set -all

5. To update this setting run:

db2set DB2_GRP_LOOKUP=TOKEN

6. Restart DB2 instance

7. Reset WAS profile : Open IID, right click on Server -> Manage Profiles -> Reset Profile

8. If Reset did not work delete profile, and all files in profiles directory and re-create the profile with PMT

Custom authorization in Datapower

October 12, 2010 1 comment

We have an enterprise authorization web service integrated to our Datapower Appliance as a custom AAA step.Everything seemed to work fine but it was showing “authorization failed” all the time.

The simple trick was to  just to put the <approved/> node in the stylesheet and the resulting node tree in case of success..

Simple, but have to know …

From Datapower Authentication and Authorization Redbook :

– Custom template
Authorization might be managed through an XSL stylesheet. Two different outputs are also possible for this XSL:

• The <approved/> element, which means “authorization success” to the DataPowerAAA framework

• The <declined/> element, which means “authorization failure”

Renew certificate in Websphere keystore while retaining same alias

October 12, 2010 3 comments

Renewing expired SSL certificates in Websphere in some cases is problematic. There are not many functions available for manipulating aliases in keystores using Websphere admin console. And if certificate alias is used throughout your infrastructure mappings – for example in SSL Configurations and web chains fixing the entries with new alias could be cumbersome. Below are few easy steps to renew/replace ssl certificate in keystore while retaining same alias. General idea is to manipulate keystore and truststore using iKeyman utility instead of websphere admin console.

  1. Copy key.p12 and trust.p12 from Deployment Manager config (<DeploymentManager_profile\>config\cells\<cell_name>) to some separate backup directory
  2. Start iKeyman.bat uitlity from \bin directory in Deployment manager profile
  3. Open key.p12 from the backup directory and delete the certificate that you would like to replace in “Personal Certificates”
  4. Now import the new obtained from CA certificate to keystore “Personal Cerificates”
  5. When prompted to change label (it is GUID in case of Microsoft CA issuer), give it the same alias name as it was before. Click “Apply”, and “OK”
  6. You will see the new certificate with proper alias in the list of “Personal Certificates”
  7. Save the key.p12 file changes

Repeat same steps with trust.p12 file, but use .cer file instead of .pfx to import just public certificate part. And use “Signer Certificates”  folder instead of  “Personal Certificates”

Now that you have prepared both key.12 and trust.p12 files :

  1.  Stop Deployment Manager\
  2. Copy new key.p12 and trust.p12 files to Deployment Manager config (<DeploymentManager_profile\>config\cells\<cell_name>)
  3. Start Deployment manager

And if you have option “Synchronize nodes on startup”  you are done and could verify the new certificates in Websphere console. If not just synchronize the nodes and they will get the updated key and trust files.

Error Importing PKCS12/ PFX Certificate to Websphere 6.1 and Establishing Handshake

October 15, 2009 Leave a comment

Having spent few hours debugging handshake between WESB and WAS server in the backend, we found out that the problem was with the root CA certificate key size  -it was 4K, while WAS policy files restrict it to 1K.

One of the symptoms was that when trying to import certificate generated by our local Enterprise Microsoft CA Server to Websphere Server we’ve got errors described below. Both importing from WAS console and through ikeyman.bat gave errors: “Database is corrupted” and “Could not open keystore“.

Trying to see the content of this PFX file using keytool
\java\jre\bin>keytool -list -v -keystore test.pfx -storetype pkcs12 -storepass test

Also ended up in error “java.io.IOException: Error in loading the keystore: Private key decryption error: (java.security.InvalidKeyException: Illegal key size)

The issue appeared to boil down to a problem with the Java security policy files and thier ‘restricted’ and ‘unrestricted’ flavours and the size of the keys used by our local CA.

Downloading the unrestricted JCE policy files for IBM JVM 1.4.2+ (US_export_policy.jar and local_policy.jar) and replacing them in WAS JVM worked like a charm.

Resolution steps for WAS 6.1:

    • Go to the developerWorks Java Technology Security page at URL: Java Technology Security
    • Click on the “J2SE 5.0” link for WebSphere Application Server 6.1.xx
    • Scroll down on the resulting page and click on the “IBM SDK Policy files” link.
    • Select “Unrestricted JCE Policy files for SDK for all newer versions 1.4.2+” and download them
    • Extract the local_policy.jar and US_export_policy.jar files from the unrestricted.zip archive.
    • Stop the application server
    • Back up the local_policy.jar and US_export_policy.jar files located in the following directory: \java\jre\lib\security\
    • Place the new files, previously downloaded to \java\jre\lib\security\
    • Start the server

Now you will be able to open it with ikeyman and from admin console

Websphere wsadmin.bat utility running out of memory

January 16, 2009 Leave a comment

Recently we have encountered Memory problems running Websphere wsadmin based scripts.

We were trying to retrieve large amount of CBE events from WESB using eventquery.bat script and default 256K memory settings were easily exhausted.

Our first option was to find in wsadmin.bat the line shown below and increase it

set PERFJAVAOPTION=-Xms256m -Xmx256m -Xj9 -Xquickstart

 

 But of course we wanted somewhat more elegant solution and came by the following IBM Tech Note, with the ‘javaoption’ parameter described:

http://www-01.ibm.com/support/docview.wss?rs=180&context=SSEQTP&uid=swg1PQ73288

 

 Instead of modyfing wsadmin.bat file passing ‘javaoption’ parameters worked perfectly

wsadmin.bat   -javaoption –Xms256m -javaoption –Xmx768m .. rest of parameters…

or in event query case:

eventquery.bat   -javaoption –Xms256m -javaoption –Xmx768m .. rest of parameters…

Websphere Password Decoding

December 16, 2008 Leave a comment

Passwords stored in Websphere Server configuration files actually could be decoded
http://robertmaldon.blogspot.com/2006/07/recovering-passwords-from-websphere.html

for the Websphere ESB 6.1 that runs on top of WAS 6.1.17 the actual comand is:
\IBM\WebSphere\ESB\deploytool\itp\plugins\com.ibm.websphere.v61_6.1.200>\IBM\WebSphere\ESB\java\bin\java -cp ws_runtime.jar com.ibm.ws.security.util.PasswordDecoder {xor}booqL2sSOm0=encoded password == “{xor}bWcqL2sSOm0=”, decoded password == “hello”

And a very nice online password decoder
http://www.sysman.nl/wasdecoder/

Plugins integration with WID 6.1.2

November 18, 2008 8 comments

The new WID 6.1.2 hides plugin installation by default. I was looking for usual Eclipse menu Help->Software Updates->Find and Install to point to Site for installing the plugin, but it disappead. The trick was to switch from the default “Business Integration” perspective to “Resources” and then “Software Updates” are back and working.

Of course other ways of copying jars to features/plugins and links are still working, but the managed updates via Eclipse seems to be more elegant way. (http://www.venukb.com/2006/08/20/install-eclipse-plugins-the-easy-way/)

Collection of useful SOA and general plugins:

  1. Subclipse plugin installation instructions : Subversion integartion
    http://subclipse.tigris.org/install.htmlhttp://www-128.ibm.com/developerworks/opensource/library/os-ecl-subversion/
  2. SoapUI Plugin – Web Service Testing
    http://www.soapui.org/eclipse/index.html
  3. BIRT Plugin – useful for Tivoli Common Reporting on SOA infrastructure
    http://www.eclipse.org/birt/phoenix/
  4. WSRR Plugin – Webservice registry and repository plugin
    http://publib.boulder.ibm.com/infocenter/sr/v6r2/index.jsp?topic=/com.ibm.sr.doc/twsr_plugininstall.html

WAS 6.1 setup Windows NT Service

September 10, 2008 1 comment

There is a handy WASService command available in WAS_ROOT\bin allowing Websphere Application Server 6.1 integration with Windows Services.

Samples and documentation on IBM InforCenter – WASService Command

For WAS with security enabled first thing we encountered was a failure to stop WAS service from service console.

   RoleBasedAuth E   SECJ0306E: No received or invocation credential exist on the thread. … The stack trace  is java.lang.Exception: Invocation and received credentials are both null

To mitigate the problem add “stopArgs” parameters specifying username and password. In addition to make storing of passord more secure specify “-encodeParams” and password will be stored in registry in non readable format.

WASService.exe -add “DEV01N01” -serverName server1 -profilePath C:\IBM\pf\ESB\DEV01N01 -stopArgs “-username userA -password passwordXXX” -encodeParams