thanksd thanksd - 2 years ago 151
Python Question

Django-Haystack elasticsearch config in cloud 9

I'm trying to install

in my django project which I'm working on in the Cloud 9 online IDE. The documentation for
says to add this configuration to

'default': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': '',
'INDEX_NAME': 'haystack',

But trying to run
./ rebuild_index
results in an error: "Connection Refused".

If I try changing the URL value to
I also get an error: "ConnectTimeoutError".

Does anyone know what the correct configuration would be, or if I'm missing a step?

Answer Source

Cloud9 requires you to run apps on port 8080, 8081, or 8082.

If you use 8080, you can access your app from If you use the other two ports then you'll access it from or

Find your elasticsearch.yml configuration file, and in the Network section uncomment http.port and set the value to one of the allowed ports (probably 8081 or 8082 if your main app is running on 8080).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download