Wednesday, 5 October 2011

Deleting a WCM Library issues.

Decided to delete a large library in WCM today not knowing that this would almost kill the server, cpu spiked to over 90%, users could no longer see content and you could not login to the server admin console.

So I started to look into how I could kill the delete process and restart it over night when no one was using the server. What I found was that you can use the EJBTimer scripts and an unlock library url.
/usr/websphere6/wasga61v62/AppServer/logs/WebSphere_Portal/bin> findEJBTimers.sh WebSphere_Portal -all Output:

ADMU0116I: Tool information is being logged in file
/usr/websphere6/wasga61v62/AppServer/logs/WebSphere_Portal/EJBTimers.log ADMU0128I: Starting tool with the wasga61v62 profile ADMU3100I: Reading configuration for server: WebSphere_Portal EJB Timer : 571551 Expiration: 10/5/11 11:10 AM Repeating
EJB : wcm, WCM_EJBs.jar, EJBScheduler
Info : com.ibm.workplace.wcm.util.scheduler.Schedulable|com.ibm.workplace.wcm.services.task.GlobalTaskMonitor|GlobalTaskMonitor|-

1 EJB Timer tasks found

Next use the timer id from the output (EJB Timer : 571551) and issue this command to cancel the timer. /usr/websphere6/wasga61v62/AppServer/bin $ ./cancelEJBTimers.sh WebSphere_Portal -timer 571551
ADMU0116I: Tool information is being logged in file
/usr/websphere6/wasga61v62/AppServer/logs/WebSphere_Portal/EJBTimers.log ADMU0128I: Starting tool with the wasga61v62 profile ADMU3100I: Reading configuration for server: WebSphere_Portal EJB Timer : 571552 Expiration: 10/5/11 11:12 AM Repeating
EJB : wcm, WCM_EJBs.jar, EJBScheduler
Info : com.ibm.workplace.wcm.util.scheduler.Schedulable|com.aptrix.deployment.itemgatherer.ItemChangedTask|com.aptrix.deployment.itemgatherer.ItemChangedTask|- 1 EJB Timer tasks cancelled Once all the EJBTimers are cancelled use the unlock library url before you restart the server otherwise the EJBTimers will restart.

http://hostname.yourco.com:port_number/wps/wcm/connect?MOD=UnlockLibrary&library=libraryname