# Failed to send event to MongoDB, retrying in 3 seconds {:event=\>#\<LogStash::Event:0x2367ca72\>, :exception=\>#\<ArgumentError: wrong number of arguments (2 for 1)\>}

**URL:** <https://discuss.elastic.co/t/failed-to-send-event-to-mongodb-retrying-in-3-seconds-event-logstash-0x2367ca72-exception-argumenterror-wrong-number-of-arguments-2-for-1/208652>\
**Category:** Logstash\
**Created:** [November 20, 2019, 8:22am UTC](https://discuss.elastic.co/t/failed-to-send-event-to-mongodb-retrying-in-3-seconds-event-logstash-0x2367ca72-exception-argumenterror-wrong-number-of-arguments-2-for-1/208652 "2019-11-20T08:22:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Cheriyan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_cheriyan/32/58007_2.png) [@Paul\_Cheriyan](https://discuss.elastic.co/u/Paul_Cheriyan)\
**Post date:** [November 20, 2019, 8:22am UTC](https://discuss.elastic.co/t/failed-to-send-event-to-mongodb-retrying-in-3-seconds-event-logstash-0x2367ca72-exception-argumenterror-wrong-number-of-arguments-2-for-1/208652/1 "2019-11-20T08:22:54Z")

</div>

this my code  
input {  
jdbc {  
jdbc\_connection\_string =\> "jdbc:mysql://fgh:3306/fgh?useSSL=false"  
# The user we wish to execute our statement as  
jdbc\_user =\> "fghfgh"  
jdbc\_password =\> "fghfghhfgfgh"  
# The path to our downloaded jdbc driver  
jdbc\_driver\_library =\> "/dfghmysql-connector-java-8.0.18.jar"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
# our query  
statement =\> "SELECT \* FROM fdh"  
# schedule =\> "\*/5 \* \* \* \* \*"  
clean\_run =\> true  
}

}  
output {  
# stdout {  
# codec =\> json\_lines  
# }  
mongodb {  
id =\> "dddddddd"  
collection =\> "dfd"  
database =\> "springboottest"  
uri =\> "mongodb://localhost:27017"  
codec =\> "json"  
# generateId =\> true  
isodate =\> true  
}  
}  
the version i using

- logstash-6.2.2
- logstash-output-mongodb (3.1.6)
- logstash-input-jdbc (4.3.3)

gettiing error  
[2019-11-20T13:34:48,843][WARN][logstash.outputs.mongodb] Failed to send event to MongoDB, retrying in 3 seconds {:event=\>#LogStash::Event:0x2367ca72, :exception=\>#\<ArgumentError: wrong number of arguments (2 for 1)\>}  
[2019-11-20T13:34:49,297][WARN][logstash.shutdownwatcher] {"inflight\_count"=\>531, "stalling\_thread\_info"=\>{"other"=\>[{"thread\_id"=\>34, "name"=\>nil, "current\_call"=\>"[...]/logstash-core/lib/logstash/output\_delegator\_strategies/legacy.rb:21:in `pop'"}, {"thread_id"=>35, "name"=>nil, "current_call"=>"[...]/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:21:in `pop'"}, {"thread\_id"=\>36, "name"=\>nil, "current\_call"=\>"[...]/logstash-core/lib/logstash/output\_delegator\_strategies/legacy.rb:21:in `pop'"}, {"thread_id"=>37, "name"=>nil, "current_call"=>"[...]/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:21:in `pop'"}, {"thread\_id"=\>38, "name"=\>nil, "current\_call"=\>"[...]/logstash-core/lib/logstash/output\_delegator\_strategies/legacy.rb:21:in `pop'"}, {"thread_id"=>39, "name"=>nil, "current_call"=>"[...]/logstash-core/lib/logstash/output_delegator_strategies/legacy.rb:21:in `pop'"}, {"thread\_id"=\>40, "name"=\>nil, "current\_call"=\>"[...]/logstash-core/lib/logstash/output\_delegator\_strategies/legacy.rb:21:in `pop'"}, {"thread_id"=>41, "name"=>nil, "current_call"=>"[...]/vendor/bundle/jruby/2.3.0/gems/logstash-output-mongodb-3.1.6/lib/logstash/outputs/mongodb.rb:123:in `sleep'"}]}}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 18, 2019, 8:23am UTC](https://discuss.elastic.co/t/failed-to-send-event-to-mongodb-retrying-in-3-seconds-event-logstash-0x2367ca72-exception-argumenterror-wrong-number-of-arguments-2-for-1/208652/2 "2019-12-18T08:23:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
