Coder Social home page Coder Social logo

Comments (18)

mellonbrook avatar mellonbrook commented on August 16, 2024

I am having this issue as well. I am working on a solution. I have a lead though. So the issue is in this file: (https://github.com/logstash-plugins/logstash-output-mongodb/blob/master/lib/logstash/outputs/mongodb.rb) with the call to Mongo::URIParser. The mongo gem being imported does not have a URIParser class. The following is the uri.rb file from the mongo gem being imported https://github.com/mongodb/mongo-ruby-driver/blob/master/lib/mongo/uri.rb. Notice it does not have a URIParser class. I hope this helps somewhat.

from logstash-output-mongodb.

mellonbrook avatar mellonbrook commented on August 16, 2024

So I fixed the issue. Heres a link to my repo with the fix: master...mellonbrook:fix-update-mongoruby

I removed the authentication code because I dont need it and because I dont have time right now to fix it.

Let me know if you have any questions.

from logstash-output-mongodb.

thermz avatar thermz commented on August 16, 2024

I'm facing this issue too... the last version seems broken to me

from logstash-output-mongodb.

cabrinoob avatar cabrinoob commented on August 16, 2024

Same problem here ... (I'am using logstash 1.5.0 and mongodb 3.0.3)

from logstash-output-mongodb.

mellonbrook avatar mellonbrook commented on August 16, 2024

I created a fork of the plugin that works for me. Heres the link: https://github.com/mellonbrook/logstash-output-mongodb/tree/fix-update-mongoruby

The fork doesn't use authentication and the URI is hardcoded in the plugin to '129.0.0.1:27017'

Heres the diff: master...mellonbrook:fix-update-mongoruby

from logstash-output-mongodb.

vanhongts avatar vanhongts commented on August 16, 2024

:( Same problem with logstash 1.5.0

from logstash-output-mongodb.

ocastx avatar ocastx commented on August 16, 2024

Same problem with logstash 1.5.0

from logstash-output-mongodb.

inptensib avatar inptensib commented on August 16, 2024

I am facing a problem with logstash 1.4.3 (I am using mongoDb 3.0.3).I am getting thi error message:

Using milestone 2 output plugin 'mongodb'. This plugin should be stable, but if you see strange behavior, please let us know! For more information on plugin milestones, see http://logstash.net/docs/1.4.3/plugin-milestones {:level=>:warn}
NameError: uninitialized constant Mongo::URIParser
const_missing at org/jruby/RubyModule.java:2726
register at /opt/logstash/lib/logstash/outputs/mongodb.rb:38
each at org/jruby/RubyArray.java:1613
outputworker at /opt/logstash/lib/logstash/pipeline.rb:220
start_outputs at /opt/logstash/lib/logstash/pipeline.rb:152

is something wrong with logstash or what?Thank you

from logstash-output-mongodb.

ocastx avatar ocastx commented on August 16, 2024

The problem occurs because the logstash-output-mongodb plugin requires the mongodb gem without requiring a specific version. When the mongo gem was updated to version 2.0.0, the Mongo:URIParser class was replaced with the URI class.

I supplied a fix in a fork by adding a specific version requirement for the mongo gem.

from logstash-output-mongodb.

inptensib avatar inptensib commented on August 16, 2024

Thank you for you're answer 👍 but it still doesn't work for me.I have this error message :

The error reported is:
uninitialized constant Mongo::URIParser

(I am using the last version of logstash 1.5.1)

from logstash-output-mongodb.

lucashenning avatar lucashenning commented on August 16, 2024

I had the same problem with logstash 1.5.1

The error reported is: 
  uninitialized constant Mongo::URIParser
org/jruby/RubyModule.java:2733:in `const_missing'
/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-mongodb-0.1.4/lib/logstash/outputs/mongodb.rb:37:in `register'

I changed a few lines as suggested by @mellonbrook ( master...mellonbrook:fix-update-mongoruby )

It works now 👍 Thank you

from logstash-output-mongodb.

svezzoli avatar svezzoli commented on August 16, 2024

I have the same problem with logstash 1.5.2.
But do it will be possible to fix this problem definitively on master branch?
Thanks.

from logstash-output-mongodb.

OMarohn avatar OMarohn commented on August 16, 2024

+1

from logstash-output-mongodb.

gitchs avatar gitchs commented on August 16, 2024

+1

from logstash-output-mongodb.

svezzoli avatar svezzoli commented on August 16, 2024

I applied the changes suggested by @mellonbrook but this is only a work around and it is not right for my use case.
Our product uses the authentication to access to mongodb, and so it is not a valid solution to remove the authentication and to make use of an hardcoded value for URI ('127.0.0.1:27017'), the mongodb access via authentication (any mechanism) should be guaranteed at least.

In this situation this plugin is unusable!
Why is there no more maintenance on logstash-output.mongodb plugin?

from logstash-output-mongodb.

purbon avatar purbon commented on August 16, 2024

Good morning @svezzoli , the mongodb output is a community contributed one, this days with tons of plugins under the umbrella of the logstash-plugins organization and the size of our internal core team, we get the places we can, but certainly not to everywhere.

We'll be more than happy to review and merge as much patches as possible here, with all your help, awesome community, we can make this work. Things like raising importance of fixes, reviewing code, proposing PR, etc ... every small detail is highly welcome.

Sayed that, please feel free to point us how can we fix the issues you guys are having?

/cheers

from logstash-output-mongodb.

purbon avatar purbon commented on August 16, 2024

This issue should be gone with the new release of the plugin (https://rubygems.org/gems/logstash-output-mongodb), the URI one, did not work on the authentication issue for now.

@svezzoli @mellonbrook @lucashenning as I said this is a community maintained plugin, feel free to contribute ideas and code back! all PR are welcome you guys can step in every time you want, for example doing reviews, raising issues, etc.

/cheers

  • purbon

from logstash-output-mongodb.

purbon avatar purbon commented on August 16, 2024

I'm going to close this one in benefit of having only one issue for the authentication problem. The problem stated here is the upgrade issue, that is fix for now.

from logstash-output-mongodb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.