phutchins / logstash-input-mongodb

MongoDB input plugin for Logstash
Other
187 stars 104 forks source link

error raised when installing on logstash 1.5.3 #5

Closed pnigos closed 8 years ago

pnigos commented 9 years ago

when i enter "./plugin install logstash-input-mongodb" , error below raised: Plugin version conflict, aborting ERROR: Installation Aborted, message: Bundler could not find compatible versions for gem "logstash": In Gemfile: logstash-input-mongodb (>= 0) java depends on logstash (< 2.0.0, >= 1.4.0) java Could not find gem 'logstash (< 2.0.0, >= 1.4.0) java', which is required by gem 'logstash-input-mongodb (>= 0) java', in any of the sources.

phutchins commented 9 years ago

I'm working on fixing these issues also. There is also an SSL issue in 1.5.3 which should be fixed in the upcoming 1.5.4 so I'll wait for that to push out a fix.

pnigos commented 9 years ago

Thx!

Tharves commented 9 years ago

Please let me know, have you fixed this issue.

Could not find gem 'logstash (< 2.0.0, >= 1.4.0) java', which is required by gem 'logstash-input-mongodb (>= 0) java', in any of the sources.

How do we resolve, Couple of weeks breaking my head, I can't step out. Please help me.

phutchins commented 9 years ago

Working on this now. I manually patched logstash for the ssl issue so I should be able to get a fix for this out shortly.

phutchins commented 9 years ago

@Tharves & @pnigos, I've made the changes, have successfully built the 0.1.3 gem and installed with ./bin/plugin install. Could you give it a shot again and let me know if it works for you?

Tharves commented 9 years ago

Thanks for your quick reply Phutchins, whereas I need small info for (path => '/opt/logstash-mongodb/logstash_sqlite.db'), Please let me know, what is .db file, which is any dependency for mongodb. please can you share sample .db file and 0.1.3 gem aslo

abirray commented 9 years ago

i am still having this issue with the most recent logstash (1.5.3.) could not find gem << 2.0.0 >= 1.4.0> java.

phutchins commented 9 years ago

@Tharves, the logstash_sqlite.db file is a very small database. It is created by the input-mongodb plugin and it is used to keep track of, or bookmark the last processed documents from mongo. You do not need to create it, simply provide a directory that logstash can write to and specify the desired file.

@exprnet This sounds like you might still be using the old gem. I'll build it and push it to the repository. Give it a shot again and if you have any issues please post as much detail about your process from beginning to end when setting up logstash and installing the plugin with logs.

abirray commented 9 years ago

untitled-1 Does that work? untitled-1

abirray commented 9 years ago

still same issue.

deepvoice commented 9 years ago

After redo'ing everything from scratch per your instructions in my comment... I am now having the above issue as well

phutchins commented 9 years ago

@exprnet, @deepvoice which method did you use to install logstash? Zip, package or github repo? If it's the github repo, which SHA or tag are you using?

I've had to use the zip file download to get this to work. Using the github repo does not seem to work for me when installing plugins with bin/plugin install [plugin].

phutchins commented 9 years ago

For reference this is my complete install path...

inputtest@logs-test:~$ wget https://download.elastic.co/logstash/logstash/logstash-1.5.3.tar.gz
--2015-08-14 11:45:27--  https://download.elastic.co/logstash/logstash/logstash-1.5.3.tar.gz
Resolving download.elastic.co (download.elastic.co)... 2406:da00:ff00::3211:bbd7, 2406:da00:ff00::ae81:2629, 2406:da00:ff00::b848:f3c3, ...
Connecting to download.elastic.co (download.elastic.co)|2406:da00:ff00::3211:bbd7|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 91914390 (88M) [application/x-gzip]
Saving to: ‘logstash-1.5.3.tar.gz’

100%[===================================================================================================================================================================================================================>] 91,914,390  48.2MB/s   in 1.8s

2015-08-14 11:45:29 (48.2 MB/s) - ‘logstash-1.5.3.tar.gz’ saved [91914390/91914390]

inputtest@logs-test:~$ tar -zxf logstash-1.5.3.tar.gz
inputtest@logs-test:~$ cd logstash-1.5.3/
inputtest@logs-test:~/logstash-1.5.3$ bin/plugin install /tmp/logstash-input-mongodb-0.1.3.gem
Validating /tmp/logstash-input-mongodb-0.1.3.gem
Installing logstash-input-mongodb
Installation successful
inputtest@logs-test:~/logstash-1.5.3$
phutchins commented 9 years ago

And from git...

inputtest@logs-test:~$ git clone https://github.com/elastic/logstash.git
Cloning into 'logstash'...
remote: Counting objects: 40780, done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 40780 (delta 28), reused 0 (delta 0), pack-reused 40732
Receiving objects: 100% (40780/40780), 71.28 MiB | 28.43 MiB/s, done.
Resolving deltas: 100% (27595/27595), done.
Checking connectivity... done.
inputtest@logs-test:~$ ls
logstash  logstash-1.5.3  logstash-1.5.3.tar.gz
inputtest@logs-test:~$ cd logstash
inputtest@logs-test:~/logstash$ ls
acceptance_spec  bin  CHANGELOG     ci               CONTRIBUTORS  dripmain.rb  Gemfile.jruby-1.9.lock  LICENSE  logstash-core.gemspec   Makefile    patterns  Rakefile  README.md           spec      tools
benchmark        bot  CHANGELOG.md  CONTRIBUTING.md  docs          Gemfile      lib                     locales  logstash-event.gemspec  NOTICE.TXT  pkg       rakelib   require-analyze.rb  STYLE.md
inputtest@logs-test:~/logstash$ rvm list

rvm rubies

=* jruby-1.7.19 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

inputtest@logs-test:~/logstash$ rake test:install-core
mkdir -p vendor
mkdir vendor/_
Downloading http://jruby.org.s3.amazonaws.com/downloads/1.7.20/jruby-bin-1.7.20.tar.gz
Installing minitar >= 0 because the build process needs it.
mkdir -p build
mkdir -p build/bootstrap
[bootstrap] Fetching and installing gem: minitar (>= 0)
Fetching: minitar-0.5.4.gem (100%)
Successfully installed minitar-0.5.4
Installing bundler ~> 1.9.4 because the build process needs it.
[bootstrap] Fetching and installing gem: bundler (~> 1.9.4)
Fetching: bundler-1.9.10.gem (100%)
Successfully installed bundler-1.9.10
Invoking bundler install...
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Installing addressable 2.3.8
Installing cabin 0.7.1
Installing arr-pm 0.0.10
Installing backports 3.6.4
Installing ffi 1.9.8
Installing childprocess 0.5.6
Installing clamp 0.6.5
Installing coderay 1.1.0
Installing multipart-post 2.0.0
Installing faraday 0.9.1
Using minitar 0.5.4
Installing file-dependencies 0.1.6
Installing filesize 0.0.4
Installing json 1.8.2
Installing fpm 1.3.3
Installing gems 0.8.3
Installing i18n 0.6.9
Installing jrjackson 0.2.9
Installing method_source 0.8.2
Installing slop 3.6.0
Installing spoon 0.0.4
Installing pry 0.10.1
Installing stud 0.0.21
Installing thread_safe 0.3.5
Installing polyglot 0.3.5
Installing treetop 1.4.15
Using logstash-core 2.0.0.dev from source at .
Installing sawyer 0.6.0
Installing octokit 3.8.0
Installing rubyzip 1.1.7
Using bundler 1.9.10
Bundle complete! 14 Gemfile dependencies, 31 gems now installed.
Gems in the group development were not installed.
Bundled gems are installed into ./vendor/bundle.
[plugin:install-core] Installing core plugins
Installing logstash-filter-clone, logstash-filter-mutate, logstash-filter-multiline, logstash-input-generator, logstash-input-stdin, logstash-input-tcp, logstash-output-stdout
Installation successful
[plugin:install-development-dependencies] Installing development dependencies of all installed plugins
Installing logstash-devutils
Installation successful
inputtest@logs-test:~/logstash$ bin/plugin install /tmp/logstash-input-mongodb-0.1.3.gem
Validating /tmp/logstash-input-mongodb-0.1.3.gem
Installing logstash-input-mongodb
Installation successful
inputtest@logs-test:~/logstash$ bin/plugin install --development
Installing logstash-devutils
Installation successful
inputtest@logs-test:~/logstash$

Note that I have jruby installed and I'm running rake test:install-core to install the core plugins which include the logstash plugin that your error is complaining about.

deepvoice commented 9 years ago

I am also to this point. It installs but complains when used

phutchins commented 9 years ago

@deepvoice can you answer my questions for you from above? It would be very helpful in solving your problem...

And "complains when used" would be more helpful with error logs.

deepvoice commented 9 years ago

I didn't want to paste an exact duplicate error. It is exactly the same as the exprnet comment above

abirray commented 9 years ago

I’m doing this in Windows; how would you recommend going about it in Windows?


Abir Ray Director Expression Networks, LLC. Perpetual Innovation. (tm)

SDB Certified.

Unclassified: abir.ray@expr.net mailto:abir.ray@expr.net NIPR: abir.ray2.ctr@mail.mil mailto:abir.ray2.ctr@mail.mil SIPR: abir.ray2.ctr@mail.smil.mil mailto:abir.ray2.ctr@mail.smil On-the-web: http://corp.expr.net/ http://corp.expr.net/

Phone: 877.509.7737 Ext. 5950 Facsimile: 301.576.5461 Mobile: 202.725.0950

This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message.

Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1]

On Aug 14, 2015, at 7:58 AM, Philip Hutchins notifications@github.com wrote:

And from git...

inputtest@logs-test:~$ git clone https://github.com/elastic/logstash.git Cloning into 'logstash'... remote: Counting objects: 40780, done. remote: Compressing objects: 100% (41/41), done. remote: Total 40780 (delta 28), reused 0 (delta 0), pack-reused 40732 Receiving objects: 100% (40780/40780), 71.28 MiB | 28.43 MiB/s, done. Resolving deltas: 100% (27595/27595), done. Checking connectivity... done. inputtest@logs-test:~$ ls logstash logstash-1.5.3 logstash-1.5.3.tar.gz inputtest@logs-test:~$ cd logstash inputtest@logs-test:~/logstash$ ls acceptance_spec bin CHANGELOG ci CONTRIBUTORS dripmain.rb Gemfile.jruby-1.9.lock LICENSE logstash-core.gemspec Makefile patterns Rakefile README.md spec tools benchmark bot CHANGELOG.md CONTRIBUTING.md docs Gemfile lib locales logstash-event.gemspec NOTICE.TXT pkg rakelib require-analyze.rb STYLE.md inputtest@logs-test:~/logstash$ rvm list

rvm rubies

=* jruby-1.7.19 [ x86_64 ]

=> - current

=* - current && default

* - default

inputtest@logs-test:~/logstash$ rake test:install-core mkdir -p vendor mkdir vendor/_ Downloading http://jruby.org.s3.amazonaws.com/downloads/1.7.20/jruby-bin-1.7.20.tar.gz Installing minitar >= 0 because the build process needs it. mkdir -p build mkdir -p build/bootstrap [bootstrap] Fetching and installing gem: minitar (>= 0) Fetching: minitar-0.5.4.gem (100%) Successfully installed minitar-0.5.4 Installing bundler ~> 1.9.4 because the build process needs it. [bootstrap] Fetching and installing gem: bundler (~> 1.9.4) Fetching: bundler-1.9.10.gem (100%) Successfully installed bundler-1.9.10 Invoking bundler install... Fetching gem metadata from https://rubygems.org/......... Fetching version metadata from https://rubygems.org/... Fetching dependency metadata from https://rubygems.org/.. Resolving dependencies... Installing addressable 2.3.8 Installing cabin 0.7.1 Installing arr-pm 0.0.10 Installing backports 3.6.4 Installing ffi 1.9.8 Installing childprocess 0.5.6 Installing clamp 0.6.5 Installing coderay 1.1.0 Installing multipart-post 2.0.0 Installing faraday 0.9.1 Using minitar 0.5.4 Installing file-dependencies 0.1.6 Installing filesize 0.0.4 Installing json 1.8.2 Installing fpm 1.3.3 Installing gems 0.8.3 Installing i18n 0.6.9 Installing jrjackson 0.2.9 Installing method_source 0.8.2 Installing slop 3.6.0 Installing spoon 0.0.4 Installing pry 0.10.1 Installing stud 0.0.21 Installing thread_safe 0.3.5 Installing polyglot 0.3.5 Installing treetop 1.4.15 Using logstash-core 2.0.0.dev from source at . Installing sawyer 0.6.0 Installing octokit 3.8.0 Installing rubyzip 1.1.7 Using bundler 1.9.10 Bundle complete! 14 Gemfile dependencies, 31 gems now installed. Gems in the group development were not installed. Bundled gems are installed into ./vendor/bundle. [plugin:install-core] Installing core plugins Installing logstash-filter-clone, logstash-filter-mutate, logstash-filter-multiline, logstash-input-generator, logstash-input-stdin, logstash-input-tcp, logstash-output-stdout Installation successful [plugin:install-development-dependencies] Installing development dependencies of all installed plugins Installing logstash-devutils Installation successful inputtest@logs-test:~/logstash$ bin/plugin install /tmp/logstash-input-mongodb-0.1.3.gem Validating /tmp/logstash-input-mongodb-0.1.3.gem Installing logstash-input-mongodb Installation successful inputtest@logs-test:~/logstash$ bin/plugin install --development Installing logstash-devutils Installation successful inputtest@logs-test:~/logstash$ Note that I have jruby installed and I'm running rake test:install-core to install the core plugins which include the logstash plugin that your error is complaining about.

— Reply to this email directly or view it on GitHub https://github.com/phutchins/logstash-input-mongodb/issues/5#issuecomment-131086339.

abirray commented 9 years ago

(i have installed log stash from the zip not from git.)

Tharves commented 9 years ago

Hello Thanks a lot, I have installed successfully, But i am getting connectivity issue.

MongoDB Details use searchdb db.searchdb.insert

I am tested mongodb connectivity from java class, which is reteriving data what i inserted. example : MongoClient mongoClient = new MongoClient( "localhost" , 27017 ); DB db = mongoClient.getDB( "searchdb" ); DBCollection coll = db.getCollection("searchdb");

After i tried to connect from logstasah mongodb.conf

input { mongodb { uri => 'mongodb://localhost:27017/searchdb' placeholder_db_dir => 'D:/POC/Worksetup/MongoDB/data' placeholder_db_name => 'logstashsqlite.db' collection => 'events' batch_size => 5000 } }

filter { date { match => [ "logdate", "ISO8601" ] } }

output { stdout { codec => rubydebug } elasticsearch { embedded => true index => "mongodbexample" type => "mongodbexampletest" cluster =>"trailcluster" protocol => "http" port => "9200"

}

}

LOGSTASH

D:\POC\Worksetup\logstash-1.5.2\bin>logstash -f mongodb.conf io/console not supported; tty will not be manipulated ←[31mUnknown setting 'placeholder_db_dir' for mongodb {:level=>:error}←[0m ←[31mUnknown setting 'placeholder_db_name' for mongodb {:level=>:error}←[0m Error: Something is wrong with your configuration. You may be interested in the '--configtest' flag which you can use to validate logstash's configuration before you choose to restart a running system.

Please let me know, where i made mistake.

abirray commented 9 years ago

Tharves,

I assume you got everything installed since you are using log stash 1.5.2 on windows rather than 1.5.3 (which is where i still have an issue.)

Thanks, Abir


Abir Ray Director Expression Networks, LLC. Perpetual Innovation. (tm)

SDB Certified.

Unclassified: abir.ray@expr.net mailto:abir.ray@expr.net NIPR: abir.ray2.ctr@mail.mil mailto:abir.ray2.ctr@mail.mil SIPR: abir.ray2.ctr@mail.smil.mil mailto:abir.ray2.ctr@mail.smil On-the-web: http://corp.expr.net/ http://corp.expr.net/

Phone: 877.509.7737 Ext. 5950 Facsimile: 301.576.5461 Mobile: 202.725.0950

This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message.

Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1]

On Aug 18, 2015, at 10:45 PM, Tharves notifications@github.com wrote:

Hello Thanks a lot, I have installed successfully, But i am getting connectivity issue.

MongoDB Details use searchdb db.searchdb.insert

I am tested mongodb connectivity from java class, which is reteriving data what i inserted. example : MongoClient mongoClient = new MongoClient( "localhost" , 27017 ); DB db = mongoClient.getDB( "searchdb" ); DBCollection coll = db.getCollection("searchdb");

After i tried to connect from logstasah mongodb.conf

input { mongodb { uri => 'mongodb://localhost:27017/searchdb' placeholder_db_dir => 'D:/POC/Worksetup/MongoDB/data' placeholder_db_name => 'logstashsqlite.db' collection => 'events' batch_size => 5000 } }

filter { date { match => [ "logdate", "ISO8601" ] } }

output { stdout { codec => rubydebug } elasticsearch { embedded => true index => "mongodbexample" type => "mongodbexampletest" cluster =>"trailcluster" protocol => "http" port => "9200"

} }

LOGSTASH

D:\POC\Worksetup\logstash-1.5.2\bin>logstash -f mongodb.conf io/console not supported; tty will not be manipulated ←[31mUnknown setting 'placeholder_db_dir' for mongodb {:level=>:error}←[0m ←[31mUnknown setting 'placeholder_db_name' for mongodb {:level=>:error}←[0m Error: Something is wrong with your configuration. You may be interested in the '--configtest' flag which you can use to validate logstash's configuration before you choose to restart a running system.

Please let me know, where i made mistake.

— Reply to this email directly or view it on GitHub https://github.com/phutchins/logstash-input-mongodb/issues/5#issuecomment-132427230.

Tharves commented 9 years ago

I tried to use logstash-1.5.3

I am getting issue with plugin install --development

D:\POC\Worksetup\logstash-1.5.3\bin>plugin install --development io/console not supported; tty will not be manipulated Installing logstash-devutils, ftw, logstash-output-elasticsearch, stud, logstash-codec-json, logstash-codec-multiline, flores, simplecov, coveralls, logstash-input-generator, longshoreman, rumbster, logstash-filter-kv, logstash-filter-ruby, logstash-input-stdin, logstash-codec-line Error Bundler::InstallError, retrying 1/10 An error occurred while installing docker-api (1.22.2), and Bundler cannot continue. Make sure that gem install docker-api -v '1.22.2' succeeds before bundling. Error Bundler::InstallError, retrying 2/10

pnigos commented 9 years ago

Still have some issues on logstash 1.5.4,hope can solve them soon.

root@ubuntu:/opt/logstash/bin# ./logstash -t -f /etc/logstash/conf.d/xxx.conf Missing a required setting for the mongodb input plugin:

input { mongodb { path => # SETTING MISSING ... } } {:level=>:error} Error: Something is wrong with your configuration. root@ubuntu:/opt/logstash/bin# vim /etc/logstash/conf.d/xxx.conf after add place* setting: root@ubuntu:/opt/logstash/bin# ./logstash -t -f /etc/logstash/conf.d/xxx.conf Unknown setting 'placeholder_db_dir' for mongodb {:level=>:error} Unknown setting 'placeholder_db_name' for mongodb {:level=>:error}

tacoben commented 9 years ago

Hi - we are having a problem when running: plugin.bat install --development (on windows!)

we get:

io/console not supported; tty will not be manipulated

Installing logstash-devutils, ftw, logstash-output-elasticsearch, stud, logstash-codec-json, logstash-codec-multiline, flores, simplecov, coveralls, logstash-input-generator, longshoreman, rumbster, logstash-filter-kv, logstash-filter-ruby, logstash-output-lumberjack, logstash-codec-plain, logstash-input-stdin, logstash-codec-line Error Bundler::InstallError, retrying 1/10 An error occurred while installing docker-api (1.22.4), and Bundler cannot continue. Make sure that gem install docker-api -v '1.22.4' succeeds before bundling.

Lots of fun!

tacoben commented 9 years ago

we followed up by successfully installing the gem - but this did not resolve the issue.

tacoben commented 9 years ago

MY issues were resolved by unzipping into a root of c: folder on windows.

Read this thread in entirety:

https://github.com/elastic/logstash/issues/3829

intellica commented 9 years ago

Hi When i try to install sample output plugin i got following error; can you give some suggestion...

bin ./plugin install /Users/alhas/Development/gitworkspace/logstash-codec/logstash-output-example-0.1.3.gem Validating /Users/alhas/Development/gitworkspace/logstash-codec/logstash-output-example-0.1.3.gem Installing logstash-output-example Plugin version conflict, aborting ERROR: Installation Aborted, message: Bundler could not find compatible versions for gem "logstash-core": In snapshot (Gemfile.lock): logstash-core (= 1.5.4)

In Gemfile: logstash-output-kafka (>= 0) java depends on logstash-core (< 2.0.0, >= 1.4.0) java ... ......

intellica commented 9 years ago

Ok I solved. Problem was in spec file, wrong version for logstash-core

marcinkubica commented 8 years ago

Got this issue for Logstash 1.5.5 and 2.0.0 Any chance author can fix this?

phutchins commented 8 years ago

Sure thing. @intellica, what changes did you make to get it working for you? I've made the changes to the spec file for a plugin to use 2.0.0 so I'm aware of the changes needed there...

phutchins commented 8 years ago

Updated spec file should solve this. Please let me know if you are still seeing this issue... Closing.