Showing posts with label search. Show all posts
Showing posts with label search. Show all posts

Thursday, June 15, 2017

IBM Connections : how to fix search issue during a side by side migration

During a side by side migration from IBM Connections 4.5 to 5.5 I've noted search index wasn't updating anymore.
One of the steps I usually check during migrations is the list of the Indexing node with the following 2 commands from wsadmin prompt
  • execfile("searchAdmin.py")
  • SearchService.listIndexingNodes()

in this case the issue was clear because I saw the 3 new Indexing nodes but also the older nodes was present.


Indexing Node Id: icNode2:InfraCluster_server2, Last Crawl Version: 1,491,624,060,413, Indexer: true, Out of Date: false
Indexing Node Id: IcNode1:InfraCluster_server1, Last Crawl Version: 1,491,624,060,413, Indexer: true, Out of Date: false
Indexing Node Id: IcNode3:InfraCluster_server3, Last Crawl Version: 1,491,624,060,413, Indexer: true, Out of Date: false
Indexing Node Id: ic55Node02:InfraCluster_server2, Last Crawl Version: 1,490,272,261,004, Indexer: true, Out of Date: false
Indexing Node Id: ic55Node01:InfraCluster_server1, Last Crawl Version: 1,490,202,060,967, Indexer: true, Out of Date: false

Indexing Node Id: ic55Node03:InfraCluster_server3, Last Crawl Version: 1,490,202,060,967, Indexer: true, Out of Date: false

there is a wsadmin command for every needs  :-)   so I tried to fix my issue with the following commands
  • execfile("searchAdmin.py")
  • SearchService.removeIndexingNode("IcNode2:InfraCluster_server2")
but in this case the command was working only for 1 node of the 3 , and the other 2 was getting some generic errors.

At this steps the index wasn't still updating automatically and from wsadmin console I was able to see some search scheduled task in the past .

After this I opened a PMR and I've fixed the issue with following steps:
  • Build a new search index in background using the command
    SearchService.startBackgroundIndex("/opt/tmp/back-crawl", "/opt/tmp/back-extracted", "/opt/tmp/back-index","all_configured")
  • I've opened the HOMEPAGE database with a dbclient (I've used dbvisualizer ) and then I deleted the old server from  SR_INDEX_MANAGEMENT  table.
  • Clear scheduled task from wsadmin console    ( to be sure  I launched also the clearScheduler.sql like described in same page)
  • Restore of the new search index    made at first point.


Saturday, June 18, 2016

IBM Connections search, some wsadmin commands

Inside IBM Connections search is one of the most important task because is needed to maintain our environments healthy and easy to use for our users.

IBM has developed a lot of commands troug wsadmin console to maintain and administer this task

I like to share some useful command I've saved in my personal note.
All of this command (and many more) are available reading the official IBM wikis.

Wsadmin shell

All advanced administration task inside IBM Connections is available inside wsadmin shell.
We can open this shell using the following command on linux server

  • cd /opt/ibm/WebSphere/AppServer/profiles/Dmgr01/bin
  • ./wsadmin.sh -lang jython -user waslocal -password password
At this time there are no IBM alternative from wsadmin shell and during last IBM Connect in Orlando Luis Benitez during the Q&A has confirmed there are not any plan to have a GUI for this task.

If you are not confortable with shell commandt there are some products from   Time To Act , or  Infoware that will provide you most of this commands though a web application console
.
Some useful search command

The first thing to do after having start the wsadmin is start the search administration

execfile("searchAdmin.py")

Some wsadmin commands could be launched on specific target application providing a "string applicatioNnames" that could be one of the following:

  • activities
  • all_configured
  • blogs
  • calendar
  • communities
  • dogear
  • ecm_files
  • files
  • forums
  • people_finder
  • profiles
  • status_updates
  • wikis.
  • all_configured 
The last options all_configured means the search command will run on all application currently installed

eg

The following command will delete the specified index:

SearchService.deleteFeatureIndex("blogs")

the following command will start immediatly to buil the specified index

SearchService.indexNow("blogs") 

During the execution of this kind of commands i suggest you to tail the SystemOut.log to see if any errors is occurring,


Search index backup

When you have an up and running environment probably could be used to have a search index backup to make a fastest restore in case of issues.

To make a one shot backup use:

SearchService.backupIndexNow()

this will perform the backup inside the path specified in WebSphere environment variable named  SEARCH_INDEX_BACKUP_DIR

If you like to schedule the backup ,you can do it with the Connections internal scheduler with the following command

SearchService.addBackupIndexTask("WeeklyIndexBackup", "0 0 2 ? * SAT","0 10 2 ? * SAT")

the backup will be done inside  SEARCH_INDEX_BACKUP_DIR


If we need to remove backup task like one scheduled in previous example we can use this command.

SearchService.deleteTask("WeeklyIndexBackup")



Restore search index

Before execute a restore of search index we have to stop all search task and prepare the HOMEPAGE database to successfully load the restored index
  • SearchService.disableAllTasks()
  • SearchService.notifyRestore("false")
Now we have to stop search server, delete the index, restore the index from backup , reload the service and notify to homepage db the restore done

  • Stop sarch server 
  • delete actual index
  • restore index from path specified inside  SEARCH_INDEX_BACKUP_DIR
  • Start search server
  • SearchService.enableAllTasks()
  • SearchService.notifyRestore("true")

Reload search index

during some task could be useful to reload the index with one of following command:
  • SearchService.reloadIndex()
  • SearchService.reloadIndexAllNodes()
The first will perform the reload (without a restart ) on current now, the second on all search node




Search Status Page

The search application have also a status page , available for search admin at following address:

https://connections.domain.com/search/serverStatus