logstash-plugins / logstash-input-couchdb_changes

This plugin captures the _changes stream from a CouchDB instance
Apache License 2.0
27 stars 22 forks source link

Basic authentication doesn't work #8

Closed emig closed 9 years ago

emig commented 9 years ago

Basic authentication parmeters are not passed in the request. Changes feed request get a 401 with correct username and password set in the configuration.

The request gets the authenticatin information lost:

http://127.0.0.1:5984/db/_changes?feed=continuous&include_docs=true&since=0&timeout=2000

As a result the plugin crashes and restarts.

A plugin had an unrecoverable error. Will restart this plugin.
Plugin: <LogStash::Inputs::CouchDBChanges db=>"gin_call_centre", host=>"host...", username=>"user">
 Error: initialize: name or service not known {:level=>:error}
konradkonrad commented 9 years ago

May I resurrect this to ask if I should expect basic auth to work in logstash 1.5.0rc2 ?

Update: here is a gist of why I am asking: https://gist.github.com/konradkonrad/ee10deba4c13be60046f

untergeek commented 9 years ago

If the correct version is not in 1.5.0rc2, you can always upgrade the plugin itself to 0.1.4, which was released with this patch.

See: https://rubygems.org/gems/logstash-input-couchdb_changes

To upgrade:

bin/plugin upgrade logstash-input-couchdb_changes
konradkonrad commented 9 years ago

Thanks a lot, the bundled version is indeed 1.3. But your advice does not work, if followed by the word ;)

logstash-1.5.0.rc2/ % bin/plugin upgrade logstash-input-couchdb_changes
ERROR: No such sub-command 'upgrade'
logstash-1.5.0.rc2/ % bin/plugin update logstash-input-couchdb_changes
Updating logstash-input-couchdb_changes
Updated logstash-input-couchdb_changes 0.1.3 to 0.1.4

so s/upgrade/update/

After this it works most of the time :ghost: I need to investigate this further, but there may be an edge case, where an existent, but empty sequence_path file leads to a similar looking error. I will open another ticket, once I can confirm it.

untergeek commented 9 years ago

facepalm Thanks, you're correct. It is update, not upgrade.