Infos:
Important:
If you are a Zammad Support or hosted customer and experience a technical issue, please refer to: support@zammad.com using your zammad-hostname / or company contract.
- Used Zammad version: 2.6.x
- Used Zammad installation source: package
- Operating system: Debian GNU/Linux 9
- Browser + version: Chrome latest
- Elasticsearch: 5.6.12
Expected behavior:
- To rebuild elastic index after migrating elastic service to another server according to section " Using Elasticsearch on another server" of https://docs.zammad.org/en/latest/install-elasticsearch.html.
Actual behavior:
Unable to process PUT request to elasticsearch URL 'http://elasticsearch/zammad_production'. Check the response and payload for detailed information:
And more
Response: #<UserAgent::Result:0x0000559713bee4c0 @success=false, @body=nil, @data=nil, @code=0, @content_type=nil, @error="#<RuntimeError: Unable to process http call '#<Net::HTTPBadGateway 502 Bad Gateway readbody=true>'>">`
Steps to reproduce the behavior:
- I installed elasticsearch on a new server and configured it to be accessible through a reverse proxy with basic auth as suggested by documentation. I double checked the installation of ingest-attachment plugin on new server:
root@elastic:~# /usr/share/elasticsearch/bin/elasticsearch-plugin list
ingest-attachment
root@elastic:~#
- I can access it from the zammad server using defined credentials:
root@zammad:~# wget --user **** --password **** http://elasticsearch
--2018-10-16 01:05:31-- http://elasticsearch/
Resolving elasticsearch (elasticsearch)... 10.10.10.10
Connecting to elasticsearch (elasticsearch)|10.10.10.10|:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authentication selected: Basic realm="Elasticsearch"
Reusing existing connection to elasticsearch:80.
HTTP request sent, awaiting response... 200 OK
Length: 328 [application/json]
Saving to: ‘index.html’
index.html 100%[=================================================================================================================================>] 328 --.-KB/s in 0s
2018-10-16 01:05:31 (68.9 MB/s) - ‘index.html’ saved [328/328]
root@zammad:~# cat index.html
{
"name" : "aWbkYdn",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "CimSqvNkShyjoyH9_d4fQQ",
"version" : {
"number" : "5.6.12",
"build_hash" : "cfe3d9f",
"build_date" : "2018-09-10T20:12:43.732Z",
"build_snapshot" : false,
"lucene_version" : "6.6.1"
},
"tagline" : "You Know, for Search"
}
- I issued the commands below according to documentation
zammad run rails r "Setting.set('es_url', 'http://elasticsearch')"
zammad run rails r "Setting.set('es_user', '****')"
zammad run rails r "Setting.set('es_password', '****')"
zammad run rails r "Setting.set('es_index', 'zammad')"
zammad run rails r "Setting.set('es_attachment_ignore', [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe', '.box', '.mbox' ] )"
zammad run rails r "Setting.set('es_attachment_max_size_in_mb', 50)"
And then, tried to rebuild index:
root@zammad:~# zammad run rake searchindex:rebuild
This is the same issue listed here "Unable to process PUT" to create ElasticSearch index with remote ElasticSearch
Any help would be great!
Thank you!
Matias