AnsweredAssumed Answered

Elastic search indexing generates an error

Question asked by Ken McCartney on Apr 17, 2014
Latest reply on Jan 7, 2015 by Uwe Degenhardt
Hey, I've been getting a fatal error every minute in my sugarcrm log related to elasticsearch.  It seems to happen after some sort of network failure where my SugarCRM instance cannot effectively connect to it's Elasticsearch Engine, which is hosted on another server.  In the past, I have only been able to stop the messages by deleting the index altogether on the FTS server, and then re-indexing.  That's a pain, and I'd rather not have to do that.

Here are some pertinent logs from sugarcrm.log
First I get this:

Thu Apr 17 12:14:02 2014 [4084][1][INFO] Query:UPDATE job_queue
      SET assigned_user_id='1',name='FTSSyncConsumer',date_modified='2014-04-17 16:14:01',scheduler_id='',execute_time='2014-04-17 16:13:00',status='running',resolution='partial',message='FTS indexing not completed\nFTS indexing not completed\n

...a few hundred of these...

FTS indexing not completed\nFTS indexing not completed\nFTS in',
target='class::SugarSearchEngineSyncIndexer',
data=NULL,requeue=1,
retry_count=NULL,
failure_count=NULL,
job_delay=0,
client='CRON(my unique system id):4084',
percent_complete=NULL 
WHERE  job_queue.id = 'c8a404e8-b822-2bd4-0aca-534a44e471f3' AND deleted=0

Then I get these:
Thu Apr 17 12:14:02 2014 [4084][1][DEBUG] Going to check and update FTS Server status.
Thu Apr 17 12:14:02 2014 [4084][1][INFO] Query:SELECT count(*) AS the_count FROM config WHERE category = 'info' AND name = 'fts_down'
Thu Apr 17 12:14:02 2014 [4084][1][INFO] Query Execution Time:0.00023484230041504
Thu Apr 17 12:14:02 2014 [4084][1][INFO] Query:UPDATE config SET value = '0' WHERE category = 'info' AND name = 'fts_down'
Thu Apr 17 12:14:02 2014 [4084][1][INFO] Query Execution Time:0.0089240074157715
Thu Apr 17 12:14:02 2014 [4084][1][DEBUG] FTS Server status set to Success.
Thu Apr 17 12:14:02 2014 [4084][1][INFO] Going to sync records in fts queue...
Thu Apr 17 12:14:02 2014 [4084][1][INFO] Query:SELECT category, name, value FROM config
Thu Apr 17 12:14:02 2014 [4084][1][INFO] Query Execution Time:0.00027203559875488
Thu Apr 17 12:14:02 2014 [4084][1][INFO] Query:SELECT id FROM outbound_email WHERE type = 'system'
Thu Apr 17 12:14:02 2014 [4084][1][INFO] Query Execution Time:0.00013899803161621
Thu Apr 17 12:14:02 2014 [4084][1][INFO] Query:SELECT * FROM outbound_email WHERE id = '3ec056a0-18f1-abd8-fc36-5174510f13e0'
Thu Apr 17 12:14:02 2014 [4084][1][INFO] Query Execution Time:0.00016093254089355
Thu Apr 17 12:14:02 2014 [4084][1][FATAL] Unable to create index: Elastica_Exception_Response
Thu Apr 17 12:14:02 2014 [4084][1][ERROR] IndexAlreadyExistsException[[my unique system id] already exists]

I'm sure there's something here about the scheduler that I'm doing wrong, just don't know what it is.  Any help would be awesome, thanks!

Outcomes