Hi everyone,
I have container with latest logstash image so its v7.5.2, I chose this one because in past there was a problem with default host and port. In the latest version of logstash it looks that it works good but still i have a problem with connection. My host is in internal network, rabbitmq host is in internet, i need to use proxy to go outside. I added to docker run "--env https_proxy=x.x.x.x." , i checked it in container and it's correct but logstash(ruby?) doesn't see this settings Do you know where can i set proxy for logstash/rabbitmq module?
A simple client in python, I wanted to check the connection from the host, from my local computer it works but on container on host doesn't. The same problem, python doesn't take local proxy settings.
I could see both situation in tcpdump, clients connect directly to rabbitmq host, not through proxy
This is what i have in logs:
Summary
{"log":"[2020-02-20T17:56:51,586][ERROR][logstash.inputs.rabbitmq ] RabbitMQ connection error, will retry. {:error_message=\u003e\"Connection was refused. Target host list: host.com, target virtual host: xyz, username: user\", :exception=\u003e\"MarchHare::ConnectionRefused\", :backtrace=\u003e[\"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/march_hare-4.1.1-java/lib/march_hare/session.rb:565:in `converting_rjc_exceptions_to_ruby'\", \"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/march_hare-4.1.1-java/lib/march_hare/session.rb:608:in `new_connection_impl'\", \"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/march_hare-4.1.1-java/lib/march_hare/session.rb:600:in `build_new_connection'\", \"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/march_hare-4.1.1-java/lib/march_hare/session.rb:169:in `initialize'\", \"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/march_hare-4.1.1-java/lib/march_hare/session.rb:131:in `connect'\", \"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/march_hare-4.1.1-java/lib/march_hare.rb:24:in `connect'\", \"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-rabbitmq-7.0.2-java/lib/logstash/plugin_mixins/rabbitmq_connection.rb:200:in `connect'\", \"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-rabbitmq-7.0.2-java/lib/logstash/plugin_mixins/rabbitmq_connection.rb:137:in `connect!'\", \"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-rabbitmq-7.0.2-java/lib/logstash/inputs/rabbitmq.rb:181:in `setup!'\", \"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-rabbitmq-7.0.2-java/lib/logstash/inputs/rabbitmq.rb:175:in `run'\", \"/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:332:in `inputworker'\", \"/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:324:in `block in start_input'\"]}\n","stream":"stdout","time":"2020-02-20T17:56:51.586941805Z"}
{"log":"[2020-02-20T17:56:52,586][DEBUG][logstash.inputs.rabbitmq ] Connecting to RabbitMQ. Settings: {:vhost=\u003e"xyz", :hosts=\u003e["host.com"], :port=\u003e443, :user=\u003e"user", :automatic_recovery=\u003etrue, :pass=\u003e"password", :timeout=\u003e0, :heartbeat=\u003e30, :tls=\u003e"TLSv1.2", :tls_certificate_path=\u003enil, :tls_certificate_password=\u003enil}\n","stream":"stdout","time":"2020-02-20T17:56:52.586753013Z"}
Any idea?