CheckFTSConfig and Elasticsearch upgrade fail

Hi everyone,

I have a Sugar 7.9.4 and am upgrading to 8.0. It is specifically failing at the CheckFTSConfig phase in the pre-checks. The meesages are:

[Upgrader] - ERROR: Unable to get server status: Unknown error:52
[Upgrader] - ERROR: Connection test for Elastic Full Text Search engine failed. Check your FTS configuration.

I have pointed the following variables to an externally hosted ES 5.6:

$sugar_config['full_text_engine']['Elastic']['host'] = 'ip.add.re.ss';
$sugar_config['full_text_engine']['Elastic']['port'] = '9200';

I can curl ala "curl -X GET 'http://ip.add.re.ss:9200'" from the Sugar server and get the appropriate response - so there are no firewall or other issues - and I can do the same from a simple PHP curl test, so phpCurl is fine too. 

Looking around though, "Unknown error:52" seems to be "Curl gives this error when there is no reply from a server". The only thing I can think of is that it is checking https://ip.add.re.ss:9200 which does not return the expected value (but it still returns something). 

Does anyone have any ideas? I could just install 5.6 on the machine local to Sugar, but that isn't what our set up is, we have ES on a different machine. 

  • Isn't this always the way. You spend hours debugging, reading and searching and don't find anything, then you post something to a forum (see prior) and then 10 minutes later find the answer. 

    Okay, juggling three instances of dev and different versions of ES, I thought I had checked the ES 5.6 logs but I guess I checked the wrong ones. In the 5.6 ES there was this line: 

    caught exception while handling client http traffic, closing connection [id: 0x56bfdc59, L:/es.ip.add.ress:9200 - R:/sugar.ip.add.ress] java.lang.IllegalArgumentException: only one Content-Type header should be provided

     

    Then I remembered there were, for whatever reason, 3 entries in config_override.php like this:

     

    $sugar_config['full_text_engine']['Elastic']['curl'][10023][1] = 'Content-Type: application/json';

     

    I had [1], [3] and [4] versions, all the same, and I guess those are getting passed thru to curl as an array and sending the same header 3 times. So I commented out [3] and [4] and have moved on to post-errors now