Zammad Elasticsearch Configuration


  • Used Zammad version: 4.0.x
  • Used Zammad installation type: (source, package, docker-compose, …)
  • Operating system:
    Ubuntu 18.04.5 LTS
  • Browser + version:

Expected behavior:

Able to add new user. Able to see elasticsearch diagram from tickets. Able to search tickets.

Actual behavior:

{“error”:“Unable to process GET request to elasticsearch URL ‘’. Elasticsearch is not reachable, probably because it’s not running or even installed.\n\nResponse:\n#\u003cUserAgent::Result:0x0000564c3188b6d8 @success=false, @body=nil, @data=nil, @code=0, @content_type=nil, @error=”#\u003cErrno::ECONNREFUSED: Failed to open TCP connection to (Connection refused - connect(2) for \“\” port 9200)\u003e"\u003e\n\nPayload:\n{“query”:{“bool”:{“must”:[{“range”:{“created_at”:{“from”:“2020-12-31T23:00:00Z”,“to”:“2021-12-31T22:59:59Z”}}}],“must_not”:[{“term”:{“”:“merged”}}]}},“size”:0,“aggs”:{“time_buckets”:{“date_histogram”:{“field”:“created_at”,“interval”:“month”,“time_zone”:“Europe/Berlin”}}},“sort”:[{“updated_at”:{“order”:“desc”}},"_score"]}\n\nPayload size: 0M"}

Steps to reproduce the behavior:

Fresh install Zammad on fresh installed ubuntu. Run the command from Zammad:

Set the Elasticsearch server address

$ zammad run rails r “Setting.set(‘es_url’, ‘http://localhost:9200’)”

Build the search index

$ zammad run rake searchindex:rebuild


Since i ran the commands from Zammad elasticsearch isnt able to work. I had everything configured (Users(347), tickets etc.
Nothing is displayed anymore.

Thanks for your help!
Greetings Clay

I don’t think that this is the command you really fired on your server, because:
[...] ECONNREFUSED: Failed to open TCP connection to (Connection refused - connect(2) [...]

Any specific reason why you’d want Elasticsearch to be available from the outside?
By default ES is not listening on any and that’s crucial, important and correct. By default it listens on localhost.

If that’s not good enough for you I advise you to read Elasticsearch documentation regarding security and security hardening.

Hey, thanks for your answer. When i fresh installed Zammad and clicked on the reporting button there was the following text: x Elasticsearch needs to be configured.

So i went to the Zammad site and executed the following code:
zammad run rails r “Setting.set(‘es_url’, ‘http://localhost:9200’)”

I tought this will fix this. Since this command i cant change anything.

Can you help me get back to the begining that i at least can create users?

Thank you!

oh my bad, yes i changed localhost after it didnt work, to (the name of my ticketing system)

If you want to use the local Elasticsearch installation on the Zammad host using localhost is correct!
If you want to access Elasticsearch from other machines you’ll have to configure it that way.

However, keep in mind that Elasticsearch by default does not use any user authentication.
This leads to having sensitive user information accessible on the internet.
Please consult the elasticsearch documentation if you want to open it up:

Helping you here for that is out of my scope and I don’t want to be at fault if it’s open to the wild.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.