redmine_elasticsearch
redmine_elasticsearch copied to clipboard
Don't working configuration.yml
Hello, I have a problem with configuration.iml. he does not work.
My configuration looks like this:
Elasticsearch Dockerfile:
FROM docker.elastic.co/elasticsearch/elasticsearch:5.6.10
RUN bin/elasticsearch-plugin install http://dl.bintray.com/content/imotov/elasticsearch-plugins/org/elasticsearch/elasticsearch-analysis-morphology/5.6.10/elasticsearch-analysis-morphology-5.6.10.zip
RUN bin/elasticsearch-plugin install ingest-attachment --batch
RUN bin/elasticsearch-plugin remove x-pack
Docker-compose Redmine
version: '3.1'
services:
app:
build:
context: .
dockerfile: ./Dockerfile
image: redmine_up
restart: always
ports:
- <my_port>:3000
environment:
REDMINE_DB_POSTGRES: <->
REDMINE_DB_PORT: <->
REDMINE_DB_USERNAME: <->
REDMINE_DB_PASSWORD: <->
REDMINE_DB_DATABASE: <->
volumes:
- ./data/plugins:/usr/src/redmine/plugins
- ./data/gems:/usr/src/redmine/vendor/cache
- ./data/themes:/usr/src/redmine/public/themes
- ./data/files:/usr/src/redmine/files
- ./data/logs:/usr/src/redmine/log
networks:
- redela
fts:
image: elasticsearch_up
restart: always
environment:
- discovery.type=single-node
- cluster.name=redmine_cluster
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- bootstrap.memory_lock=true
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./data/elasticsearch:/usr/share/elasticsearch/data
networks:
- redela
networks:
redela:
If i run the command curl http://redmine_fts_1:9200
inside the redmine container, all working. I get the right answer.
Next i add configuration.yml file in ./data/plugins/redmine_elasticsearch/config folder.
default:
elasticsearch:
log: true
request_timeout: 180
host: redmine_fts_1
port: 9200
But when i using bundle exec rake redmine_elasticsearch:reindex_all RAILS_ENV=production
i get an error:
Caused by:
Errno::ENETUNREACH: Network is unreachable - connect(2) for "localhost" port 9200
/usr/local/bundle/gems/faraday-0.15.2/lib/faraday/adapter/net_http.rb:87:in `perform_request'
/usr/local/bundle/gems/faraday-0.15.2/lib/faraday/adapter/net_http.rb:43:in `block in call'
/usr/local/bundle/gems/faraday-0.15.2/lib/faraday/adapter/net_http.rb:92:in `with_net_http_connection'
/usr/local/bundle/gems/faraday-0.15.2/lib/faraday/adapter/net_http.rb:38:in `call'
/usr/local/bundle/gems/faraday-0.15.2/lib/faraday/rack_builder.rb:143:in `build_response'
/usr/local/bundle/gems/faraday-0.15.2/lib/faraday/connection.rb:387:in `run_request'
/usr/local/bundle/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/http/faraday.rb:23:in `block in perform_request'
/usr/local/bundle/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/base.rb:262:in `perform_request'
/usr/local/bundle/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/transport/http/faraday.rb:20:in `perform_request'
/usr/local/bundle/gems/elasticsearch-transport-5.0.5/lib/elasticsearch/transport/client.rb:131:in `perform_request'
/usr/local/bundle/gems/elasticsearch-api-5.0.5/lib/elasticsearch/api/namespace/common.rb:21:in `perform_request'
/usr/local/bundle/gems/elasticsearch-api-5.0.5/lib/elasticsearch/api/actions/indices/exists.rb:46:in `block in exists'
/usr/local/bundle/gems/elasticsearch-api-5.0.5/lib/elasticsearch/api/utils.rb:197:in `__rescue_from_not_found'
/usr/local/bundle/gems/elasticsearch-api-5.0.5/lib/elasticsearch/api/actions/indices/exists.rb:45:in `exists'
/usr/src/redmine/plugins/redmine_elasticsearch/lib/redmine_elasticsearch/indexer_service.rb:73:in `index_exists?'
/usr/src/redmine/plugins/redmine_elasticsearch/lib/redmine_elasticsearch/indexer_service.rb:10:in `recreate_index'
/usr/src/redmine/plugins/redmine_elasticsearch/lib/tasks/index.rake:16:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => redmine_elasticsearch:reindex_all
How do I configure the connection settings for elasticsearch?
just realized @lterekhov this should be the main config/configuration.yml file for redmine! it should work there