Magento 2 Installation, "Host Unreachable" Error

Hi, We wanted to use Algolia Search for our Magento 2 Project.

On the Configuration, I placed the API Keys and the Application ID and saved it. But its showing an error:

“Something went wrong while saving this configuration: Hosts unreachable:”

Im not sure why? Any help is appreciated

Hi Alfred. Can you try once more and report back on whether the problem still exists?

Hi Jason,

Yes, the error still persists. I also tried reindexing, and this happens:

Algolia Search Products indexer process unknown error:
Hosts unreachable:
Algolia Search Categories indexer process unknown error:
Hosts unreachable:
Algolia Search Pages indexer process unknown error:
Hosts unreachable:
Algolia Search Suggestions indexer process unknown error:
Hosts unreachable:

Any idea why?

Hi Alfred,

Can you try this from your server to see what happens:

Then we’ll be able to know if it’s because Magento/extension or a network issue.

Hi Julien,

This is what happened when we used:

curl -X GET \

 -H "X-Algolia-API-Key: ${API_KEY}" \
 -H "X-Algolia-Application-Id: 67MXR5N9TQ" \
 "https://67MXR5N9TQ-dsn.algolia.net/1/indexes"

The output is:

{“items”:[{“name”:“getstarted_actors”,“createdAt”:“2017-04-07T11:01:20.847Z”,“updatedAt”:“2017-04-07T11:02:43.557Z”,“entries”:500,“dataSize”:56632,“fileSize”:106933,“lastBuildTimeS”:0,“numberOfPendingTasks”:0,“pendingTask”:false}],“nbPages”:1}

This message is typically appears when the wrong app ID is used. Can you make sure the correct one is set in Magento configuration page. Please check for each context (stores and website). Sometime the value is overridden in another context.

If you would check what is the host used for the request, it would help a lot.

You can find it in the file vendor/algolia/algoliasearch-client-php/src/AlgoliaSearch/Client.php and the code is in the request method.
https://github.com/algolia/algoliasearch-client-php/blob/master/src/AlgoliaSearch/Client.php#L815-L821

Thanks