logstash-plugins / logstash-output-rabbitmq

Apache License 2.0
17 stars 37 forks source link

Not respecting `port` parameter? #76

Open joshuar opened 6 years ago

joshuar commented 6 years ago
input {
    stdin { }
}

output {
    rabbitmq {
        host => ["localhost"]
        key => "whatevs"
        persistent => true
        port => 35007
        vhost => "logstash"
        exchange => ""
        exchange_type => "fanout"
    }
}

I'm starting up a test RabbitMQ install with:

docker run --rm -ti --hostname my-rabbit --name some-rabbit -p 35007:35007 -e RABBITMQ_NODE_PORT=35007 rabbitmq:3

Note that I'm using a custom port, 35007. When I start Logstash with the above configuration, it still tries to connect on port 5672:

Sending Logstash's logs to /home/joshua/Documents/Support/217376/logstash-6.2.4/logs which is now configured via log4j2.properties
[2018-04-26T15:08:15,064][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/home/joshua/Documents/Support/217376/logstash-6.2.4/modules/netflow/configuration"}
[2018-04-26T15:08:15,075][DEBUG][logstash.plugins.registry] Adding plugin to the registry {:name=>"netflow", :type=>:modules, :class=>#<LogStash::Modules::Scaffold:0x73e91c6d @module_name="netflow", @directory="/home/joshua/Documents/Support/217376/logstash-6.2.4/modules/netflow/configuration", @kibana_version_parts=["6", "0", "0"]>}
[2018-04-26T15:08:15,087][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/home/joshua/Documents/Support/217376/logstash-6.2.4/modules/fb_apache/configuration"}
[2018-04-26T15:08:15,088][DEBUG][logstash.plugins.registry] Adding plugin to the registry {:name=>"fb_apache", :type=>:modules, :class=>#<LogStash::Modules::Scaffold:0x4e41441b @module_name="fb_apache", @directory="/home/joshua/Documents/Support/217376/logstash-6.2.4/modules/fb_apache/configuration", @kibana_version_parts=["6", "0", "0"]>}
[2018-04-26T15:08:15,535][DEBUG][logstash.runner          ] -------- Logstash Settings (* means modified) ---------
[2018-04-26T15:08:15,535][DEBUG][logstash.runner          ] node.name: "ludicra"
[2018-04-26T15:08:15,535][DEBUG][logstash.runner          ] *path.config: "../logstash.conf"
[2018-04-26T15:08:15,535][DEBUG][logstash.runner          ] path.data: "/home/joshua/Documents/Support/217376/logstash-6.2.4/data"
[2018-04-26T15:08:15,535][DEBUG][logstash.runner          ] modules.cli: []
[2018-04-26T15:08:15,535][DEBUG][logstash.runner          ] modules: []
[2018-04-26T15:08:15,535][DEBUG][logstash.runner          ] modules_setup: false
[2018-04-26T15:08:15,536][DEBUG][logstash.runner          ] config.test_and_exit: false
[2018-04-26T15:08:15,536][DEBUG][logstash.runner          ] config.reload.automatic: false
[2018-04-26T15:08:15,536][DEBUG][logstash.runner          ] config.reload.interval: 3000000000
[2018-04-26T15:08:15,536][DEBUG][logstash.runner          ] config.support_escapes: false
[2018-04-26T15:08:15,536][DEBUG][logstash.runner          ] metric.collect: true
[2018-04-26T15:08:15,537][DEBUG][logstash.runner          ] pipeline.id: "main"
[2018-04-26T15:08:15,537][DEBUG][logstash.runner          ] pipeline.system: false
[2018-04-26T15:08:15,537][DEBUG][logstash.runner          ] pipeline.workers: 4
[2018-04-26T15:08:15,537][DEBUG][logstash.runner          ] pipeline.output.workers: 1
[2018-04-26T15:08:15,537][DEBUG][logstash.runner          ] pipeline.batch.size: 125
[2018-04-26T15:08:15,537][DEBUG][logstash.runner          ] pipeline.batch.delay: 50
[2018-04-26T15:08:15,537][DEBUG][logstash.runner          ] pipeline.unsafe_shutdown: false
[2018-04-26T15:08:15,537][DEBUG][logstash.runner          ] pipeline.java_execution: false
[2018-04-26T15:08:15,537][DEBUG][logstash.runner          ] pipeline.reloadable: true
[2018-04-26T15:08:15,537][DEBUG][logstash.runner          ] path.plugins: []
[2018-04-26T15:08:15,537][DEBUG][logstash.runner          ] config.debug: false
[2018-04-26T15:08:15,538][DEBUG][logstash.runner          ] *log.level: "debug" (default: "info")
[2018-04-26T15:08:15,538][DEBUG][logstash.runner          ] version: false
[2018-04-26T15:08:15,538][DEBUG][logstash.runner          ] help: false
[2018-04-26T15:08:15,538][DEBUG][logstash.runner          ] log.format: "plain"
[2018-04-26T15:08:15,538][DEBUG][logstash.runner          ] http.host: "127.0.0.1"
[2018-04-26T15:08:15,538][DEBUG][logstash.runner          ] http.port: 9600..9700
[2018-04-26T15:08:15,538][DEBUG][logstash.runner          ] http.environment: "production"
[2018-04-26T15:08:15,538][DEBUG][logstash.runner          ] queue.type: "memory"
[2018-04-26T15:08:15,538][DEBUG][logstash.runner          ] queue.drain: false
[2018-04-26T15:08:15,538][DEBUG][logstash.runner          ] queue.page_capacity: 67108864
[2018-04-26T15:08:15,539][DEBUG][logstash.runner          ] queue.max_bytes: 1073741824
[2018-04-26T15:08:15,539][DEBUG][logstash.runner          ] queue.max_events: 0
[2018-04-26T15:08:15,539][DEBUG][logstash.runner          ] queue.checkpoint.acks: 1024
[2018-04-26T15:08:15,539][DEBUG][logstash.runner          ] queue.checkpoint.writes: 1024
[2018-04-26T15:08:15,539][DEBUG][logstash.runner          ] queue.checkpoint.interval: 1000
[2018-04-26T15:08:15,539][DEBUG][logstash.runner          ] dead_letter_queue.enable: false
[2018-04-26T15:08:15,539][DEBUG][logstash.runner          ] dead_letter_queue.max_bytes: 1073741824
[2018-04-26T15:08:15,539][DEBUG][logstash.runner          ] slowlog.threshold.warn: -1
[2018-04-26T15:08:15,539][DEBUG][logstash.runner          ] slowlog.threshold.info: -1
[2018-04-26T15:08:15,539][DEBUG][logstash.runner          ] slowlog.threshold.debug: -1
[2018-04-26T15:08:15,540][DEBUG][logstash.runner          ] slowlog.threshold.trace: -1
[2018-04-26T15:08:15,540][DEBUG][logstash.runner          ] keystore.classname: "org.logstash.secret.store.backend.JavaKeyStore"
[2018-04-26T15:08:15,540][DEBUG][logstash.runner          ] keystore.file: "/home/joshua/Documents/Support/217376/logstash-6.2.4/config/logstash.keystore"
[2018-04-26T15:08:15,540][DEBUG][logstash.runner          ] path.queue: "/home/joshua/Documents/Support/217376/logstash-6.2.4/data/queue"
[2018-04-26T15:08:15,540][DEBUG][logstash.runner          ] path.dead_letter_queue: "/home/joshua/Documents/Support/217376/logstash-6.2.4/data/dead_letter_queue"
[2018-04-26T15:08:15,540][DEBUG][logstash.runner          ] path.settings: "/home/joshua/Documents/Support/217376/logstash-6.2.4/config"
[2018-04-26T15:08:15,540][DEBUG][logstash.runner          ] path.logs: "/home/joshua/Documents/Support/217376/logstash-6.2.4/logs"
[2018-04-26T15:08:15,540][DEBUG][logstash.runner          ] --------------- Logstash Settings -------------------
[2018-04-26T15:08:15,642][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-04-26T15:08:15,747][DEBUG][logstash.agent           ] Setting up metric collection
[2018-04-26T15:08:15,876][DEBUG][logstash.instrument.periodicpoller.os] Starting {:polling_interval=>5, :polling_timeout=>120}
[2018-04-26T15:08:16,024][DEBUG][logstash.instrument.periodicpoller.cgroup] Error, cannot retrieve cgroups information {:exception=>"NoMethodError", :message=>"undefined method `[]' for nil:NilClass"}
[2018-04-26T15:08:16,270][DEBUG][logstash.instrument.periodicpoller.jvm] Starting {:polling_interval=>5, :polling_timeout=>120}
[2018-04-26T15:08:16,507][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ParNew"}
[2018-04-26T15:08:16,515][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ConcurrentMarkSweep"}
[2018-04-26T15:08:16,644][DEBUG][logstash.instrument.periodicpoller.persistentqueue] Starting {:polling_interval=>5, :polling_timeout=>120}
[2018-04-26T15:08:16,667][DEBUG][logstash.instrument.periodicpoller.deadletterqueue] Starting {:polling_interval=>5, :polling_timeout=>120}
[2018-04-26T15:08:16,797][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"6.2.4"}
[2018-04-26T15:08:16,852][DEBUG][logstash.agent           ] Starting agent
[2018-04-26T15:08:16,932][DEBUG][logstash.agent           ] Starting puma
[2018-04-26T15:08:16,969][DEBUG][logstash.agent           ] Trying to start WebServer {:port=>9600}
[2018-04-26T15:08:17,123][DEBUG][logstash.api.service     ] [api-service] start
[2018-04-26T15:08:17,159][DEBUG][logstash.config.source.local.configpathloader] Skipping the following files while reading config since they don't match the specified glob pattern {:files=>["/home/joshua/Documents/Support/217376/logstash-6.2.4", "/home/joshua/Documents/Support/217376/rabbitmq.log"]}
[2018-04-26T15:08:17,199][DEBUG][logstash.config.source.local.configpathloader] Reading config file {:config_file=>"/home/joshua/Documents/Support/217376/logstash.conf"}
[2018-04-26T15:08:17,382][DEBUG][logstash.agent           ] Converging pipelines state {:actions_count=>1}
[2018-04-26T15:08:17,430][DEBUG][logstash.agent           ] Executing action {:action=>LogStash::PipelineAction::Create/pipeline_id:main}
[2018-04-26T15:08:17,875][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
[2018-04-26T15:08:19,775][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"stdin", :type=>"input", :class=>LogStash::Inputs::Stdin}
[2018-04-26T15:08:20,211][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"line", :type=>"codec", :class=>LogStash::Codecs::Line}
[2018-04-26T15:08:20,273][DEBUG][logstash.codecs.line     ] config LogStash::Codecs::Line/@id = "line_c454ebc0-5c8e-40ff-8146-e684fe1f0a07"
[2018-04-26T15:08:20,275][DEBUG][logstash.codecs.line     ] config LogStash::Codecs::Line/@enable_metric = true
[2018-04-26T15:08:20,275][DEBUG][logstash.codecs.line     ] config LogStash::Codecs::Line/@charset = "UTF-8"
[2018-04-26T15:08:20,277][DEBUG][logstash.codecs.line     ] config LogStash::Codecs::Line/@delimiter = "\n"
[2018-04-26T15:08:20,362][DEBUG][logstash.inputs.stdin    ] config LogStash::Inputs::Stdin/@id = "c142e6e2bc1a4de5641f94c859fc9172e7f55f84d836657f095dc3025a2d5f1c"
[2018-04-26T15:08:20,362][DEBUG][logstash.inputs.stdin    ] config LogStash::Inputs::Stdin/@enable_metric = true
[2018-04-26T15:08:20,376][DEBUG][logstash.inputs.stdin    ] config LogStash::Inputs::Stdin/@codec = <LogStash::Codecs::Line id=>"line_c454ebc0-5c8e-40ff-8146-e684fe1f0a07", enable_metric=>true, charset=>"UTF-8", delimiter=>"\n">
[2018-04-26T15:08:20,380][DEBUG][logstash.inputs.stdin    ] config LogStash::Inputs::Stdin/@add_field = {}
[2018-04-26T15:08:20,695][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"rabbitmq", :type=>"output", :class=>LogStash::Outputs::RabbitMQ}
[2018-04-26T15:08:20,825][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"json", :type=>"codec", :class=>LogStash::Codecs::JSON}
[2018-04-26T15:08:20,860][DEBUG][logstash.codecs.json     ] config LogStash::Codecs::JSON/@id = "json_2977da76-afed-477b-9d75-d62021aa64ef"
[2018-04-26T15:08:20,886][DEBUG][logstash.codecs.json     ] config LogStash::Codecs::JSON/@enable_metric = true
[2018-04-26T15:08:20,887][DEBUG][logstash.codecs.json     ] config LogStash::Codecs::JSON/@charset = "UTF-8"
[2018-04-26T15:08:20,966][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@host = ["localhost"]
[2018-04-26T15:08:20,966][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@key = "secure_log"
[2018-04-26T15:08:20,967][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@persistent = true
[2018-04-26T15:08:20,967][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@port = 35007
[2018-04-26T15:08:20,967][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@vhost = "logstash"
[2018-04-26T15:08:20,967][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@exchange = ""
[2018-04-26T15:08:20,967][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@exchange_type = "fanout"
[2018-04-26T15:08:20,968][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@id = "d0af37538727094bad9fb7a925d1cd0b8d09dc7e8281c8a89a720628e0032478"
[2018-04-26T15:08:20,968][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@enable_metric = true
[2018-04-26T15:08:20,969][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@codec = <LogStash::Codecs::JSON id=>"json_2977da76-afed-477b-9d75-d62021aa64ef", enable_metric=>true, charset=>"UTF-8">
[2018-04-26T15:08:20,969][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@workers = 1
[2018-04-26T15:08:20,969][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@user = "guest"
[2018-04-26T15:08:20,972][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@password = <password>
[2018-04-26T15:08:20,973][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@ssl_version = "TLSv1.2"
[2018-04-26T15:08:20,988][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@automatic_recovery = true
[2018-04-26T15:08:20,990][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@connect_retry_interval = 1
[2018-04-26T15:08:20,991][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@passive = false
[2018-04-26T15:08:20,992][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@arguments = {}
[2018-04-26T15:08:20,994][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@durable = true
[2018-04-26T15:08:21,002][DEBUG][logstash.outputs.rabbitmq] config LogStash::Outputs::RabbitMQ/@message_properties = {}
[2018-04-26T15:08:21,234][INFO ][logstash.pipeline        ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2018-04-26T15:08:21,384][DEBUG][logstash.instrument.periodicpoller.cgroup] Error, cannot retrieve cgroups information {:exception=>"NoMethodError", :message=>"undefined method `[]' for nil:NilClass"}
[2018-04-26T15:08:21,418][DEBUG][logstash.outputs.rabbitmq] Connecting to RabbitMQ. Settings: {:vhost=>"logstash", :hosts=>["localhost"], :port=>35007, :user=>"guest", :automatic_recovery=>true, :pass=>"guest", :timeout=>0, :heartbeat=>0}
[2018-04-26T15:08:21,728][ERROR][logstash.outputs.rabbitmq] RabbitMQ connection error, will retry. {:error_message=>"Connection to localhost:5672 refused", :exception=>"MarchHare::ConnectionRefused", :backtrace=>["/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:505:in `converting_rjc_exceptions_to_ruby'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:541:in `new_connection_impl'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:534:in `build_new_connection'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:157:in `initialize'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:127:in `connect'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare.rb:24:in `connect'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-mixin-rabbitmq_connection-5.0.2-java/lib/logstash/plugin_mixins/rabbitmq_connection.rb:201:in `connect'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-mixin-rabbitmq_connection-5.0.2-java/lib/logstash/plugin_mixins/rabbitmq_connection.rb:138:in `connect!'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-output-rabbitmq-5.1.1-java/lib/logstash/outputs/rabbitmq.rb:47:in `register'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/output_delegator_strategies/shared.rb:9:in `register'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/output_delegator.rb:42:in `register'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:342:in `register_plugin'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:353:in `block in register_plugins'", "org/jruby/RubyArray.java:1734:in `each'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:353:in `register_plugins'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:730:in `maybe_setup_out_plugins'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:363:in `start_workers'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:290:in `run'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:250:in `block in start'"]}
[2018-04-26T15:08:21,830][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ParNew"}
[2018-04-26T15:08:21,833][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ConcurrentMarkSweep"}
[2018-04-26T15:08:22,763][DEBUG][logstash.outputs.rabbitmq] Connecting to RabbitMQ. Settings: {:vhost=>"logstash", :hosts=>["localhost"], :port=>35007, :user=>"guest", :automatic_recovery=>true, :pass=>"guest", :timeout=>0, :heartbeat=>0}
[2018-04-26T15:08:22,768][ERROR][logstash.outputs.rabbitmq] RabbitMQ connection error, will retry. {:error_message=>"Connection to localhost:5672 refused", :exception=>"MarchHare::ConnectionRefused", :backtrace=>["/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:505:in `converting_rjc_exceptions_to_ruby'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:541:in `new_connection_impl'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:534:in `build_new_connection'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:157:in `initialize'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare/session.rb:127:in `connect'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/march_hare-3.1.1-java/lib/march_hare.rb:24:in `connect'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-mixin-rabbitmq_connection-5.0.2-java/lib/logstash/plugin_mixins/rabbitmq_connection.rb:201:in `connect'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-mixin-rabbitmq_connection-5.0.2-java/lib/logstash/plugin_mixins/rabbitmq_connection.rb:138:in `connect!'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-output-rabbitmq-5.1.1-java/lib/logstash/outputs/rabbitmq.rb:47:in `register'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/output_delegator_strategies/shared.rb:9:in `register'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/output_delegator.rb:42:in `register'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:342:in `register_plugin'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:353:in `block in register_plugins'", "org/jruby/RubyArray.java:1734:in `each'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:353:in `register_plugins'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:730:in `maybe_setup_out_plugins'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:363:in `start_workers'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:290:in `run'", "/home/joshua/Documents/Support/217376/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:250:in `block in start'"]}
^C[2018-04-26T15:08:23,143][WARN ][logstash.runner          ] SIGINT received. Shutting down.
^C[2018-04-26T15:08:23,305][FATAL][logstash.runner          ] SIGINT received. Terminating immediately..

Am I missing something?

jsvd commented 6 years ago

This seems to be the way the underlying library we use (march_hare) works: if you specify a list of hosts then the port option is ignored. However in this plugin we always pass a list, even if it's a list of 1, so the port is always ignored...

We should likely just remove this port option. Currently the users can pass a list of "host" strings when the port is 5672, or "host:port" strings when the port is different than 5672.

joshuar commented 6 years ago

Ah cool! Thanks @jsvd! I didn't realise a host:port combo would work as well. That works for me. The doc examples are all just host strings. So possibly a doc update as well required?

seandilda commented 5 years ago

There's a known issue with march_hare (https://github.com/ruby-amqp/march_hare/issues/133) that causes localhost:5672 to always show up in connection errors, even if that's not where its connecting.

If anyone else sees this, ignore the error message and use tcpdump to verify the traffic is going where you want.

mikearruda commented 5 years ago

@jsvd Thank you so much! "host:port" is working for me now.

Ricaz commented 5 years ago

I had the same problem with the RabbitMQ input plugin because I had forgotten to specify ssl => true. It would fail to initiate a handshake, but the logs only stated it failed to connect to the default address (localhost:5672, not mq.example.org:5671 as I specified).