Connection to Mongo failed. No collections were visible

The following log entry. I am using no authentication:

2019-03-13 15:26:21,782 [Plugin Startup: local] INFO c.d.p.m.c.MongoConnectionManager - Created connection to [address=localhost:27071, user=null].
2019-03-13 15:26:21,782 [Plugin Startup: local] INFO c.d.p.m.c.MongoConnectionManager - Number of open connections 1.
2019-03-13 15:26:21,783 [Plugin Startup: local] INFO c.d.p.m.c.MongoConnectionManager - MongoClientOptions:
MongoClientOptions{description=‘null’, applicationName=‘null’, compressors=’[]’, readPreference=primary, writeConcern=WriteConcern{w=null, wTimeout=null ms, fsync=null, journal=null, retryWrites=false, readConcern=com.mongodb.ReadConcern@0, codecRegistry=org.bson.codecs.configuration.ProvidersCodecRegistry@eae891cf, serverSelector=null, clusterListeners=[], commandListeners=[], minConnectionsPerHost=0, maxConnectionsPerHost=100, threadsAllowedToBlockForConnectionMultiplier=5, serverSelectionTimeout=5000, maxWaitTime=120000, maxConnectionIdleTime=0, maxConnectionLifeTime=0, connectTimeout=10000, socketTimeout=0, socketKeepAlive=true, sslEnabled=false, sslInvalidHostNamesAllowed=false, sslContext=null, alwaysUseMBeans=false, heartbeatFrequency=10000, minHeartbeatFrequency=500, heartbeatConnectTimeout=20000, heartbeatSocketTimeout=20000, localThreshold=15, requiredReplicaSetName=‘null’, dbDecoderFactory=com.mongodb.DefaultDBDecoder$1@74c8cd5b, dbEncoderFactory=com.mongodb.DefaultDBEncoder$1@2214bf25, socketFactory=null, cursorFinalizerEnabled=true, connectionPoolSettings=ConnectionPoolSettings{maxSize=100, minSize=0, maxWaitQueueSize=500, maxWaitTimeMS=120000, maxConnectionLifeTimeMS=0, maxConnectionIdleTimeMS=0, maintenanceInitialDelayMS=0, maintenanceFrequencyMS=60000, connectionPoolListeners=[]}, socketSettings=SocketSettings{connectTimeoutMS=10000, readTimeoutMS=0, keepAlive=true, receiveBufferSize=0, sendBufferSize=0}, serverSettings=ServerSettings{heartbeatFrequencyMS=10000, minHeartbeatFrequencyMS=500, serverListeners=’[]’, serverMonitorListeners=’[]’}, heartbeatSocketSettings=SocketSettings{connectTimeoutMS=20000, readTimeoutMS=20000, keepAlive=true, receiveBufferSize=0, sendBufferSize=0}}
2019-03-13 15:26:21,783 [Plugin Startup: local] INFO c.d.p.m.c.MongoConnectionManager - MongoCredential:null
2019-03-13 15:26:21,798 [Plugin Startup: local] INFO c.d.p.m.c.MongoConnectionManager - User Error Occurred [ErrorId: c2c848db-1306-4092-895f-79f71d754044]
com.dremio.common.exceptions.UserException: Connection to Mongo failed. No collections were visible.
at com.dremio.common.exceptions.UserException$Builder.build(UserException.java:746) ~[dremio-common-3.1.6-201903070042400578-fdcd3a8.jar:3.1.6-201903070042400578-fdcd3a8]
at com.dremio.plugins.mongo.connection.MongoConnectionManager.validateConnection(MongoConnectionManager.java:306) [dremio-extra-plugin-mongo-3.1.6-201903070042400578-fdcd3a8.jar:3.1.6-201903070042400578-fdcd3a8]
at com.dremio.plugins.mongo.connection.MongoConnectionManager.connect(MongoConnectionManager.java:145) [dremio-extra-plugin-mongo-3.1.6-201903070042400578-fdcd3a8.jar:3.1.6-201903070042400578-fdcd3a8]
at com.dremio.plugins.mongo.MongoStoragePlugin.start(MongoStoragePlugin.java:129) [dremio-extra-plugin-mongo-3.1.6-201903070042400578-fdcd3a8.jar:3.1.6-201903070042400578-fdcd3a8]
at com.dremio.exec.catalog.ManagedStoragePlugin$1.run(ManagedStoragePlugin.java:255) [dremio-sabot-kernel-3.1.6-201903070042400578-fdcd3a8.jar:3.1.6-201903070042400578-fdcd3a8]
at com.dremio.concurrent.RenamingRunnable.run(RenamingRunnable.java:36) [dremio-common-3.1.6-201903070042400578-fdcd3a8.jar:3.1.6-201903070042400578-fdcd3a8]
at com.dremio.concurrent.SingletonRunnable.run(SingletonRunnable.java:41) [dremio-common-3.1.6-201903070042400578-fdcd3a8.jar:3.1.6-201903070042400578-fdcd3a8]
at com.dremio.concurrent.SafeRunnable.run(SafeRunnable.java:40) [dremio-common-3.1.6-201903070042400578-fdcd3a8.jar:3.1.6-201903070042400578-fdcd3a8]
at com.dremio.concurrent.Runnables$1.run(Runnables.java:45) [dremio-common-3.1.6-201903070042400578-fdcd3a8.jar:3.1.6-201903070042400578-fdcd3a8]
73.199.44.157 - - [13/Mar/2019:15:26:21 +0000] “PUT /apiv2/source/local?nocache=1552490781759 HTTP/1.1” 400 160 “http://206.81.4.170:9047/” “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36”

Your DB does not have any collections in it. Just create a collection and you will be able to add the mongodb source.

Thanks @Jasmin_Trada Just to add, Dremio does not add source when there are no objects