Sunday, August 30, 2015

WebSphere Portal 8 Cumulative Fix fails with "Status returned 302: Authentication failed for user: wpsadmin" message

On one of our clients I was running CF 16 upgrade for WebSphere Portal 8.0.0.1, when during a post-install/profile update phase, I encountered the following exception:



BUILD FAILED /opt/IBM/WebSphere/PortalServer/wcm/prereq.wcm/config/includes/prereq.wcm_cfg.xml:3841: An exception occurred while executing the task: Status returned 302: Authentication failed for user: uid=wpsadmin,cn=users,dc=ibm,dc=gov,dc=com
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
        at com.ibm.wps.config.tasks.AntCallTask.execute(AntCallTask.java:13)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)


Examining the ConfigTrace.log I noticed that the cause for this was the following

run-wcm-admin-task:     [echo] VirtualPortalContext =  , VirtualPortalHost =     [echo] Initialized: host localhost  vpContext     [echo] To call ConfigModuleClient: localhost  vpContext[ConfigModuleClient] Connecting to login address: http://localhost:10039/wps/wcm/login[ConfigModuleClient] Connecting to task address: http://localhost:10039/wps/wcm/myconnect?MOD=data&processLibraries=false&taskType=import&importLibrary=%24%7Bimport.library%7D&skipScheduleActions=false with user name: uid=wpsadmin,cn=users,dc=ibm,dc=gov,dc=com[ConfigModuleClient] No output will be shown while this task is running. Check the SystemOut.log for progress information.--- Exception Thrown ---/opt/IBM/WebSphere/PortalServer/wcm/prereq.wcm/config/includes/prereq.wcm_cfg.xml:3841: An exception occurred while executing the task: Status returned 302: Authentication failed for user: uid=wpsadmin,cn=users,dc=ibm,dc=gov,dc=com        at com.ibm.workplace.wcm.maintenance.module.ConfigModuleClient.execute(ConfigModuleClient.java:103)        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)        at org.apache.tools.ant.Task.perform(Task.java:364)

As you can see, the issue occurred while trying to import a library, specifying that the user can't authenticate. Before moving forward I rechecked the following:

  1. Passwords in the ConfigEngine command -DPortalAdminPwd
  2. Availability of LDAP
  3. Passwords entered in wkplc.properties
All seem to be in order. Next step was to try and run the separate import-wcm-data task with some dummy library and it failed for the same reason.
My last check was to run the import task using a Portal myconnect interface, which was successful and didn't have authentication issue.
URL used:

http://localhost:10039/wps/wcm/myconnect?MOD=data&processLibraries=false&taskType=import&importLibrary=DummyLibrary
It was then clear that authentication works and that it is an issue with how ConfigModuleClient handles requests over SSL.
More precisely in my case due to the security settings on the application server(HTTPS), the cookies that are fetched and set to the connection are not parsed correctly under some circumstances.

I opened a PMR and asked for the fix (ifix PI37735). A seperate fix cannot be found on IBM Support Portal

Reference - https://www-304.ibm.com/support/docview.wss?uid=swg1PI37735
The fix for this issue was later included in CF 17