# Mongodb output plugin connection error

**URL:** <https://discuss.elastic.co/t/mongodb-output-plugin-connection-error/273043>\
**Category:** Logstash\
**Created:** [May 14, 2021, 4:00pm UTC](https://discuss.elastic.co/t/mongodb-output-plugin-connection-error/273043 "2021-05-14T16:00:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roberto\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roberto_b/32/77615_2.png) [@Roberto\_B](https://discuss.elastic.co/u/Roberto_B)\
**Post date:** [May 14, 2021, 4:00pm UTC](https://discuss.elastic.co/t/mongodb-output-plugin-connection-error/273043/1 "2021-05-14T16:00:12Z")

</div>

Hi there,

i'm tryng to connect on MongoDB Atlas cluster using logstash output.  
I reach so many errors like this:  
[WARN] 2021-05-14 17:56:55.616 [Ruby-0-Thread-12: :1] mongodb - MONGODB | Error running ismaster on [cluster0-shard-xx-xx.1xx0a.mongodb.net:27017](http://cluster0-shard-xx-xx.1xx0a.mongodb.net:27017): ArgumentError: wrong number of arguments (given 2, expected 1)

I've took the connection string from Atlas "console" for Ruby driver.  
Do you have tried this output plugin before in order to connect Logstash to Atlas?  
Any Advice?

Kind Regards

Roberto

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [May 14, 2021, 4:20pm UTC](https://discuss.elastic.co/t/mongodb-output-plugin-connection-error/273043/2 "2021-05-14T16:20:17Z")

</div>

> [@Roberto\_B](#):
>
> wrong number of arguments

There are three [open issues](https://github.com/logstash-plugins/logstash-output-mongodb/issues?q=is%3Aissue+is%3Aopen+wrong+number+of+arguments) for this, and an [unmerged PR](https://github.com/logstash-plugins/logstash-output-mongodb/pull/66) that claims to fix it.

---

<div class="post-metadata">

**Author:** ![Roberto\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roberto_b/32/77615_2.png) [@Roberto\_B](https://discuss.elastic.co/u/Roberto_B)\
**Post date:** [May 15, 2021, 10:30am UTC](https://discuss.elastic.co/t/mongodb-output-plugin-connection-error/273043/3 "2021-05-15T10:30:33Z")

</div>

Grazie Badger,

i've tried to change the 3 files described here [Fix "wrong number of arguments" error when shipping events to MongoDB (fixes #60, #64, #65) by rmmorrison · Pull Request #66 · logstash-plugins/logstash-output-mongodb · GitHub](https://github.com/logstash-plugins/logstash-output-mongodb/pull/66/files) but nothing change .

Any other advice?

KR

Roberto

---

<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:** [June 12, 2021, 10:31am UTC](https://discuss.elastic.co/t/mongodb-output-plugin-connection-error/273043/4 "2021-06-12T10:31:12Z")

</div>

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