ElasticSearch mit 500er und 400er Fehler

Infos:

  • Used Zammad version: 2.2
  • Used Zammad installation source: Debian Source
  • Operating system: Debian

Ich halte mich gerade an die Beschreibung unter docs.zammad.org/en/latest/install-debian. html sowie docs.zammad.org/en/latest/install-elasticsearch. html und installiere auch das Generic install Elasticsearch 5.6 (ingest-attachment):

Nach der anpassung der zammad.conf im NGNIX und einen Neustart steht beim reindex das mit den 400er

Wenn ich dann Zammad per Webinterface neu installiert habe und was unter Statistik suche, bekomme im Modal diesen Fehler

Blockquote
{“error”:“Unable to process POST at hxxp://127.0.0.1:9200/zammad_production/Ticket/_search\n#\u003cUserAgent::Result:0x007f59f815a258 @success=false, @body=nil, @data=nil, @code=“400”, @content_type=nil, @error=“Client Error: #\u003cNet::HTTPBadRequest 400 Bad Request readbody=true\u003e!”\u003e”}
Blockquote

Try
zammad run rake searchindex:rebuild

Hi,

can you provide some log output from your ES - startup and when you try to search.
The solution @gemini666 provided could be correct.
Also please check if you set the ES url correct.
zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"
without a trailing “/” sometimes this is an issue to.

regards

I’m about to install it again.
Then I can send logs again.

What should the server have to RAM, etc? I just use internally to test a VirtualBox with 2GB of RAM, it may be s.der 500 for the purpose?

I don’t think that the RAM is an issue here. But Zammad and Elasticsearch need a lot of RAM because both apps are heavily utilising cacheing mechanism. Which are stored in the RAM.
We have several installations running using exactly these setup. So the logs will help to finde the point we or you missed.

regards

Hi There is error when i open elastic search but it show proper in this link http://127.0.0.1:9200/zammad_production
when i open http://127.0.0.1:9200 its show this
elastic build version etc
http://127.0.0.1:9200/zammad_production/Ticket/_search\n#\u003cUserAgent::Result:0x007fd4e1818400 @Success=false, @Body=nil, @DaTa=nil, @code=“400”, @content_type=nil, @error=“Client Error: #\u003cNet::HTTPBadRequest 400 Bad Request readbody=true\u003e!”\u003e"}

how to solve this issue

I have the same problem after updating zammad to 2.2x, running on Debian.

Starting Reporting ends in StatusCode:500

{“error”:“Unable to process POST at http://127.0.0.1:9200/zammad_production/Ticket/_search\n#\u003cUserAgent::Result:0x00007f84881dae70 @success=false, @body=nil, @data=nil, @code=0, @content_type=nil, @error=”#\u003cErrno::ECONNREFUSED: Failed to open TCP connection to 127.0.0.1:9200 (Connection refused - connect(2) for \“127.0.0.1\” port 9200)\u003e"\u003e"}

I have tried what you have written, but without success. How can I sove it?

Thanks
Patrick

I addition, going to reportings opens the link: http://zammad:3000/#report. Is elasticsearch using the wrong port, in any way?

How I understand zammad and elasticsearch is that zammad actually feeds/triggers elasticsearch.

When I had 400 & 500 errors, I was not using 5.6.x of elasticsearch and also “zammad run rake searchindex:rebuild” had errors.

On my Suse I had to run the above command twice for it to go through without error.

@PatrickGoenner Your error looks like a firewall problem or elasticsearch service not running.
You have to go through all the described steps for elasticsearch integration and maybe also check if your firewall is filtering pakets on localhost (shouldn’t do it but sometimes you never know…)

Also check, as written, if elasticsearch is running. If you installed elasticsearch and run the comments from the documentation, a service restart of zammad and elasticsearch may be necessary.

Oh, I see elasticsearch is loaded but failed. I can’t start it.

I’m not a linux pro, so please can you help me how to fix this problem?

@PatrickGoenner cannot help if you don’t supply information why the service stopped. You can see the last service messages with

systemctl status elasticsearch

or with

journalctl -u elasticsearch.service

This will help you to find out what elasticsearch might not like :slight_smile: By the way, do you have java installed on your machine? Elasticsearch needs it …

Thank you for support,
java 8 is installed. Here the screenshot:

I have solved my problem by reconfiguring the java certificate and again doing these steps:

sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure
sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install mapper-attachments
systemctl restart elasticsearch
systemctl enable elasticsearch

elasticsearch is now running again and we can go on working with zammad :slight_smile:

2 Likes

Good to know, thanks for posting your solution :slight_smile:

that was the key for me! I had installed, uninstalled and reinstalled elasticsearch so many times that I was bagning my head. Finally I tried the above command, and started the process over again and it worked.

Thanks!

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