# Logstash 7.8.0 Pipeline Authentication on MongoDB 4 Failure

**URL:** <https://discuss.elastic.co/t/logstash-7-8-0-pipeline-authentication-on-mongodb-4-failure/240706>\
**Category:** Logstash\
**Created:** [July 10, 2020, 1:36pm UTC](https://discuss.elastic.co/t/logstash-7-8-0-pipeline-authentication-on-mongodb-4-failure/240706 "2020-07-10T13:36:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leoper](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@leoper](https://discuss.elastic.co/u/leoper)\
**Post date:** [July 10, 2020, 1:36pm UTC](https://discuss.elastic.co/t/logstash-7-8-0-pipeline-authentication-on-mongodb-4-failure/240706/1 "2020-07-10T13:36:10Z")

</div>

Hi everyone.

I'm trying to read a collection on MongoDB 4 (installed on an AWS machine) via the Logstash 7.8.0 pipeline (installed on a GCP machine).

In the pipeline configuration file I tried both to specify the authentication mechanism of the pipeline towards MongoDB, and to not specify it. No authentication mechanisms are supported. Below is an fragment from the log:

```auto
Pipeline aborted due to error {: pipeline_id => "main",: exception => # <Mongo :: Auth :: Unauthorized: User myUser (mechanism: scram) is not authorized to
access myDatabase (auth source: myDatabase, used mechanism: SCRAM-SHA-1, used server: x.y.z.w: 37017 (STANDALONE)):
Authentication failed. (on x.y.z.w: 37017)>,:
backtrace => ["/ usr / share / logstash / vendor / bundle / jruby / 2.5.0 / gems / mongo-2.12.1 / lib / mongo / auth / scram / conversation.rb: 534: in` validate! '" ,
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/auth/scram/conversation.rb:528:in` validate_first_message! '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/auth/scram/conversation.rb:116:in` continue '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/auth/scram.rb:74:in` login '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection.rb:390:in` block in authenticate! '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server.rb:449:in` handle_auth_failure! '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection.rb:388:in` authenticate! '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection.rb:200:in` do_connect '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection.rb:177:in` connect! '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection_pool.rb:745:in` connect_connection '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection_pool.rb:360:in` check_out '",
"/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mongo-2.12.1/lib/mongo/server/connection_pool.rb:570:in` with_connection '"," / usr / share / logsta

```

If I use a MongoDB client to connect to the same database without specifying the authentication mechanism, everything works correctly.

I suspect the problem may be the pipeline's mongoDB plug-in.

Any help is appreciated.

Thanks in advance, leoper.

---

<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:** [August 7, 2020, 1:48pm UTC](https://discuss.elastic.co/t/logstash-7-8-0-pipeline-authentication-on-mongodb-4-failure/240706/2 "2020-08-07T13:48:48Z")

</div>

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