Mongodb Connection Refused

MongoDB is a free and open-source NoSQL document database used commonly in modern web applications. Spring Boot With Embedded MongoDB In this post, I discuss how to use embedded MongoDB in a Spring Boot application. So, restart your mongod sudo service mongodb restart, try now to connect it mongo. However, spring boot doesn't seem to use an embedded mongodb but fails to connect (Connection refused) because it cannot find a real mongo process running on the test port. Then open a separate terminal and connect to MongoDB without authentication. 1 via TCP/IP We can see that even though SSL is enabled on the server, we are able to connect to it without SSL. MongoDB doesn't use HTTP or HTTPS, so it should never have worked from free accounts -- it looks like there were a few cases (specifically, MLab instances that happened to be in the same data center as our servers) where that wasn't enforced properly, but our most recent system update has closed that. View Ankush Ray’s profile on LinkedIn, the world's largest professional community. Could not connect to MongoDB at localhost:27017: Cannot connect to database default :. 170:25 No connection could be made because the target machine actively refused it 127. 2 Support NEW: MongoDB Connection Manager - Provide option for cursor timeout NEW: MongoDB Source - Add support for Binary Data Type (BinData). Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Connection handling and persistence. It leads to error: SQLSTATE[HY000] [2002] Connection refused But I can connect to db with Workbench or from console with the same credentials. MongoDB错误32-bit servers don't have journaling enabled by default解决方法; Windows下把MongoDB安装为系统服务的方法; Mongodb启动命令参数中文说明; connect() failed (111: Connection refused) while connecting to upstream; connect() failed (111: Connection refused) while connecting to upstream. 1:27017 Mongo: Couldn’t connect to server 127. Three ways to connect to MongoDB Create a new connection (e. 0 with Homebrew. conf, change the location of dbpath, changed the dbpath of mongodb. Remember, SSH is worth setting up regardless, as it makes installing the other two options far easier!. com port 22: Connection refused A few days back, one of my friends was having an issue with his Amazon EC2 production instance. 1 via TCP/IP We can see that even though SSL is enabled on the server, we are able to connect to it without SSL. The exception occurs on the client for new Socket (ip, port) operation, the exception occurs because the ip address or. ConnectException: Connection refused (Connection refused) 时间: 2018-02-07 16:52:56 阅读: 227 评论: 0 收藏: 0 [点我收藏+]. To fix this you need to replace the BlobContainerRest. However, if I run the same test in the Java environment that is configured without MongoDB installed, the same test also works. Based on the answer from this thread - Cannot connect to mongodb errno:61 Connection refused. Tools and technologies used : MongoDB 2. Socket exception with the exception MINA Socket Exception Client Exception java. 04 LTS and MongoDB instance (service is running and CAN connect locally) that I can't connect to from an outside source. 0 or later version of the mongo shell with TLS/SSL support. 0 port 3001: Connection refused try with curl command directly in the shell I also tried to execute the curl command directly in the pipeline shell but then I also have an error, but a different one:. 0 BY-SA 版权协议,转载请附上原文出处链接和本声明。. Next application on my list is MongoDB, another NoSQL database. Applications can use change streams to subscribe to all data changes on a single collection, a database, or an entire deployment, and immediately react to them. I am receiving the following errors which do not allow me to connect:. There are changes in mongod. 1:27017, reason: errno:10061 No connection could be made because the target machine actively refused it. Now, I tried connecting remotely from another virtual machine on EC2 but I can't get to connect regardless how much I'm trying. NET Core in C# for Visual Studio 2015 This site uses cookies for analytics, personalized content and ads. springboot+mongodb报错Caused by: java. Category Howto & Style; Song Fast Lane (Album Version (Edited)) Artist Bad Meets Evil; Album Fast Lane; Licensed to YouTube by UMG (on behalf of Shady Records); PEDL, Me Gusta Music (Publishing. Generally means that the connection string isn't correct, the driver couldn't even find the database server. After successfully installed, I tried to connect using the mongo command. So mongodb worked on my ubuntu device, then I reinstalled Apache2 and installed mysql/php and some other minor tools and Mongo stopped working. public boolean isBlobExist(String. 1:25 No connection could be made because the target machine actively refused it. To authenticate to MongoDB, select an authentication type in AuthMechanism and set User and Password. Posted in MongoDB and tagged fix mongodb failed to connect, fix mongodb refused to connect on OSX, MongoDB, mongodb failed to connect, OSX on May 29, 2016. SQL Server Management Studio provides Object Explorer, which allows you to connect to any server in the SQL Server family and graphically browse its contents. In front-end development I use HTML5 / HAML, CSS3 / SCSS, javascript / coffeescript. Graylog web interface connection refused. Reason: Connection refused: connect. Loading Ubiquiti Community Ubiquiti Community. WAIT numreplicas timeout Wait for the synchronous replication of all the write commands sent in the context of the current connection WATCH key [key ] Watch the given keys to determine execution of the MULTI/EXEC block. Install MongoDB Use the following linux command to install MongoDB on Ubuntu 18. If you telnet to another interface on the same machine for example 192. Expert on Git, SVN , Git Hook, Bitbucket. No connection could be made because the target machine actively refused it 208. First, use the shortcut key − Ctrl + C; The query is as follows −. In MongoDB some data is denormalized, or stored with related data in documents to remove the need for joins. I have a Linode server running Ubuntu 12. 1) we gain access to the server. ConnectException: Connection refused (Connection refused) 时间: 2018-02-07 16:28:13 阅读: 2137 评论: 0 收藏: 0 [点我收藏+]. C:\Program Files\MongoDB\Server\3. Suddenly my mongodb stopped working after a forced system restart. STEP:1 Create a Package named-'content' under the. I am trying to connect from Yii2 app to db. No server in a replica set connection was identified as the primary. I have download nifi 1. • Processed and kept all records of revoked, expired, refused applications, etc. 99% browsers compatibility, and more. Moreover, I can connect to the mongoDB instance from other programs. In my computer MongoDB is installed at C:\Program Files\MongoDB\Server\3. This issue can arise due to many factors, however, mentioned scenario is with the. Here are the steps you can take to achieve this: Edit the MongoDB configuration. You can create a MongoDB user to access to your Atlas cluster in the Connect dialog. View Naveen Kumar Nandyala’s profile on LinkedIn, the world's largest professional community. Failed to connect to 127. Unable to connect to upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused How can I fix it? Start MongoDB with systemctl in Ubuntu 16. smagne87 opened this issue Jun 8, 2017 · 0 comments Comments. This tutorial will help you set up MongoDB on your server for a production application environment. MongoTimeoutException: Timed out after. markdown #MongoDB Connection Refused If you come across a connection refused when trying to connect to MongoDB try deleting the file:. NET project, then check the next article Using MongoDB. Running Mongo on Ubuntu Virtual Machine in Azure You just setup a VM and you want to store data! You checked out Document DB , but decided Mongo was more your style. sudo start mongodb or sudo service mongodb start Step 4: Check status of mongodb. XML Word Printable. Every web application needs a place to store its critical data. If you are using MongoDB Compass to connect to your cluster, you can visit the Compass Connection Errors page for additional troubleshooting resources. MongoDB does not have a rich built-in REST interface. Windows host Docker Toolbox, so it is using VirtualBox I used docker run --name mongo2 -p 127. 04 Bionic server: $ sudo apt-get install -y mongodb-org Start MongoDB Database After installation the MongoDB database does not start by default. The above type of. 远程连接mongodb出现 no route to host 和 Connection refused的更多相关文章. To connect to Atlas, pass the connection string provided by Atlas to MongoClient:. The connection string always starts with mongodb://, to indicate it is a connection string in this form. Mosquitto is lightweight and is suitable for use on all devices from low power single board computers to full servers. MongoDB Enterprise is available as part of the MongoDB Enterprise Advanced subscription, which features the most comprehensive support and the best SLA when you run MongoDB on your own infrastructure. He was able to SSH into it a few days back, but all of a sudden, he was not able to get into it. lockファイルというものせいで、mongodbが起動できなくなる事象。. After setting up Postfix and configuring the config files, when trying to access the server on port 25 by telnet to the localhost (127. bind_ip=127. This is all you need to do to start using Embedded MongoDB in a Spring Boot application. I am receiving the following errors which do not allow me to connect:. Performance tuning is not trivial, but you can go a long way with a few basic guidelines. enter mongod then leave the window (it leaves a message) 2. sudo mongod --repair Step 3: start mongodb. Screenshots included. I have been asked for some info that is store in the DB but I cannot figure out how to access the database. js’) and start this server using the node command (node server. Vista 284 vezes 1. Import the attached transformation. 9: Connection refused Failed to connect to Reason 442 Failed to failed to connect Unable to connect to connect-mongodb connect to Xlib: connection to ":0. Naveen Kumar has 2 jobs listed on their profile. Windows host Docker Toolbox, so it is using VirtualBox I used docker run --name mongo2 -p 127. I am presuming, since I am free user, even though *. I could solve the problem changing the permission with the following command :. 04 LTS and MongoDB instance (service is running and CAN connect locally) that I can't. Learn • Develop • Meet • Ask. 远程连接mongodb出现 no route to host 和 Connection refused. We use cookies to provide social media features and to analyse our traffic. 878-0700 warning: Failed to connect to 127. Now, I tried connecting remotely from another virtual machine on EC2 but I can't get to connect regardless how much I'm trying. Hello everyone, I am new in developing mobile applications. So, if you try to connect (with mongo -program) to your mongod, you cannot. sudo mongod --repair Step 3: start mongodb. I have added these two rules to my IP tables, where < ip address > is the server I want to connect FROM (as outlined in this MongoDB reference):. conf file in the latest MongoDB v 3. Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. conf, change the location of dbpath, changed the dbpath of mongodb. In this chapter, we will see how to create a database in MongoDB. DBeaver is a database management tool for managing DBs such as MySQL, PostgreSQL, MariaDB, SQLite, Oracle, DB2, SQL Server, Sybase, MS Access, Teradata, Firebird, Derby, etc. Creating an application in OpenShift Enterprise created 10 or more connections to MongoDB. Starting the Mongo Shell should verify this. ethika and new era have partnered on a new snapback program that will offer you limited edition, one of a kind, 9fifty snapbacks. This is because the you are running on the non-privilege session. I am receiving the following errors which do not allow me to connect:. 问题:发现mongodb无法连接,查看mongodb日志,出现大量的如下报错:connection refused because too many open connections:819mongodb的连接数到达819后,就无法增加,所以无法连接上去。. I can use node-opencv to drive opencv apis from node on Windows right nowBut I'm looking for a best way to build a node application with template matching and image resize using opencv for cross-platform(OS) and in the same time keep the dependency library. Graylog version - graylog/graylog:2. The problem, despite what it said in the Java stack trace, was simply "connection refused. Kubernetes on Docker for Windows: No connection Kubernetes on Docker for Windows: No connection could be made because the target machine actively refused it. We will restore the dependency on this Spring Boot starter when we would have installed MongoDB on the machine. 有时候nginx运行很正常,但是会发现错误日志中依旧有报错connect() failed (111: Connection refused) while connecting to upstream. NEW: MongoDB Connection - Add support for MongoDB Atlas or any server with Tls1. and run the command as shown in the following image. DB_CONNECTION=mysql DB_HOST=mysql DB_PORT=3306 DB_DATABASE=laraqueue DB_USERNAME=root DB_PASSWORD=root. Unable to register systems to Satellite : "Unable to register system, not all services available" # subscription-manager register --org="ORG NAME " --activationkey="ActivationKey NAME" Unable to register system, not all services available. Hi Tobias, just let you know, the open source mongodb service's max connection number is 100; if exceeds this number the db will exit. MongoDB users have access to MongoDB databases, while Atlas users have access to the Atlas application itself. Create a Scheduling Server in Test Studio to be able to run schedule tests on remote machines. 2 Support NEW: MongoDB Connection Manager - Provide option for cursor timeout NEW: MongoDB Source - Add support for Binary Data Type (BinData). There are changes in mongod. 0" refused by server connection to ":0. sudo start mongodb or sudo service mongodb start Step 4: Check status of mongodb. Posted 30th March 2014 by Unknown. To fix this you need to replace the BlobContainerRest. Since there's no simple all-in-one tutorial out there explaining how to set up user authentication for Mongo so that you can read and write to your MongoDB server from your laptop, I decided to write one. I am receiving the following errors which do not allow me to connect:. So, I will take server logs which is relevant my VM and print some logs data to MongoDB. Connection to mongodb instace refused Question by MarcinB ( 1 ) | Jun 04, 2014 at 07:37 AM mongodb ibmcloud Hi, I cannot unbind and delete mongodb service, probably because there is some problem with mongodb instance. Well from what I can see there was no input like that that we provided going back to 1. 04 Bionic server: $ sudo apt-get install -y mongodb-org Start MongoDB Database After installation the MongoDB database does not start by default. Ativa 2 meses atrás. See the complete profile on LinkedIn and discover Anki Reddy’s connections and jobs at similar companies. Logs as below:. 1:27017, reason: errno:111 Connection refused(MongoDB启动异常) 12-25 阅读数 1万+ mongdb启动异常 博文 来自: 李武杨. If everything went smoothly you should be able to access the controller through your web browser: https://unifi-server-here:8443. 0, client hangs when connection refused [mongodb-user] MongoDB C# Driver - connection refused after replSet [mongodb-user] localhost:27017 connection refused in Docker container. gdbserver is not a complete replacement for the debugging stubs, because it requires essentially the same operating-system. Start MongoDB with mongod and make a simple mongo connection with errno:61 Connection refused. 6:47:08 PM web. 1 to mongo db system ip. Also i noticed then when connecting via SSH tunnel I can verify the connection works within the edit window of the connection. bind_ip=127. A connection string mostly follows RFC 3986, with the exception of the domain name. springboot+mongodb报错Caused by: java. I can able to connect from client---tunneling---MongoDB using mongoClient. Thus, it's not something wrong inputs. This error occurs if MongoDB server is offline. To fix Node. As before, open your Connection Manager. gdbserver is not a complete replacement for the debugging stubs, because it requires essentially the same operating-system. This multi-part tutorial demonstrates how to create a new app written in Node. This issue can arise due to many factors, however, mentioned scenario is with the ports that are blocked by IPTABLES. 在计算机实现原理专题--二进制减法器(一)中说明了基本原理,现准备说明如何来实现。 首先第一步255-b运算相当于对b进行按位取反,因此可将8个非门组成如下图的形式: 由于每次做减法时,我. I have started all 3 (1 Primary, 2 secondary) instances with mongo --port 27022. I came across a solution while working on mongodb and would like to share with you all in case you face any such problem while working on mongodb. If everything went smoothly you should be able to access the controller through your web browser: https://unifi-server-here:8443. There are many reasons why Error 102 Connection Refused Unknown Error happen, including having malware, spyware, or programs not installing properly. 0 with Homebrew. 2 on Mac OS. The cool thing about MongoDB is that you need not to create collection before you insert document in it. 0" refused by server 解决lost connection to mysql server cannot connect to ho 问题出现。. eclipse运行hadoop程序报错:Connection refused: no further information log4j:WARN No appenders could be foun. Test the connection to the MongoDB data source server to verify that the MongoDB Rest Service is started correctly. ServerSelectionTimeoutError: localhost:32018: [Errno 111] Connection refused 先去找找服务器本地,确保mongod是正常运行的: 【已解决】CentOS中如何查看Mongod的server的运行情况. gdbserver is not a complete replacement for the debugging stubs, because it requires essentially the same operating-system. connect to MongoDB localhost) If you’ve just downloaded MongoDB and don’t have a MongoDB URI to paste or a URI file to import, then you need to create a new connection. Input validation. shutdownServer()" Let us implement the above syntax in order to stop MongoDB in one command. Construct a new. Connection refused: MongoDB 4. Find a solution to your bug with our map. NET Driver with ASP. Authenticating MongoDB Connections. In case something goes wrong I’ve uploaded it to my github account. The URL you provide to the MongoClient. I suspect driver chose "admin" db and couldn't perform any operation. Search the world's information, including webpages, images, videos and more. In addition, OpenSSH provides a large suite of secure tunneling capabilities, several authentication methods, and sophisticated configuration options. Is it ethical to offer female candidates a Server Machine Ip address from the Client Machine. A MongoDB source endpoint can fail to connect for several reasons. Note: By default your application will connect to the test database. C:\Program Files\MongoDB\Server\3. 04 you need execute only this command. 1) and restarted the MongoDB service. I have a Linode server running Ubuntu 12. Since MongoDB is a popular database for development, Docker has also ensured it has support for MongoDB. Find a solution to your bug with our map. This will connect to MongoDB on port 27017. NET (Part 1): Driver Basics & Inserting Documents Published Nov 23, 2016 Last updated Jan 18, 2017 MongoDB, classified as a NoSQL database, is a document-oriented database system which stores data in JSON-like format. 0" refused by server 解决lost connection to mysql server cannot connect to ho 问题出现。. To follow this tutorial, you will need: One Ubuntu 16. Logs as below:. Is it possible for me to connect to a MongoDB instance inside a container inside the docker machine from Windows and make changes? I would ideally like to use a GUI tool such as Mongo Management Studio to make changes to a Mongo database within a container. I have two computers: Ubuntu1 and Ubuntu2. Connections inherit from Node. MongoDB said:Failed to connect to: 127. cd docker login docker ps -- to check already mongo running. 3 Eclipse 4. Join to Connect. ssh: connect to host ec2-xx-xx-xxx-xxx. Use the mongo function to connect to MongoDB. 1" in MongoDB configuration file (/etc/mongodb. rsync: failed to connect to 192. Good-bye JEE, hello Jakarta EE. conf # Listen to local interface only. " I did it before and it worked fine. It says, among other things: "No connection could be made because the target machine actively refused it. 04 LTS and MongoDB instance (service is running and CAN connect locally) that I can't. Could not connect to MongoDB at localhost:27017: Cannot connect to database default :. Use the createServer() method to create an HTTP server:. 0 it was working fine. I'm using Windows 10, which did an automatic update, and it could be this that messed it up. With a single command you can insert a document in the collection and the MongoDB creates that collection on. This multi-part tutorial demonstrates how to create a new app written in Node. 1:6379 failed - connect ECONNREFUSED This topic has been deleted. 0\bin folder you can see a bunch of executable files (. ConnectionFailure: [Errno 111] Connection refused; In order to resolve this issue, you need to enable external interfaces on the remote server by commenting out the line with "bind_ip = 127. I received the same msg ERR_CONNECTION_REFUSED and was blocked from doing any searches. See the complete profile on LinkedIn and discover Ankush’s connections and jobs at similar companies. Users are advised not to re-use MongoDB\Driver\Manager instances in a forked child process. Three ways to connect to MongoDB Create a new connection (e. ConnectException: Connection refused (Connection refused) 时间: 2018-02-07 16:52:56 阅读: 227 评论: 0 收藏: 0 [点我收藏+]. Mosquitto is lightweight and is suitable for use on all devices from low power single board computers to full servers. js MongoError: failed to connect to server, follow the two checkpoints. Posted 30th March 2014 by Unknown. If you haven’t already confirmed that the service is running you can check using the ps and service commands as explained in the previous article in this series on checking running services. Docker-compose Spring boo e MongoDB: Connection Refused. Stack Exchange Network. This is all you need to do to start using Embedded MongoDB in a Spring Boot application. Via the IONOS partner portal you can communicate directly with your customers and e. x on port 25 you get "Connection refused". Getting started. In this tutorial, we will show you how to enable remote access to a MongoDB server. MongoConnectionException: An exception occurred while receiving a message from the server. Here, I have entered my Ubuntu 18 Vagrant box ssh credentials. We're the creators of MongoDB, the most popular database for modern apps, and MongoDB Atlas, the global cloud database on AWS, Azure, and GCP. So you may have to find a community one that does it. Failed to connect to 127. conf file in the latest MongoDB v 3. I can use node-opencv to drive opencv apis from node on Windows right nowBut I'm looking for a best way to build a node application with template matching and image resize using opencv for cross-platform(OS) and in the same time keep the dependency library. 0 it was working fine. Anki Reddy has 1 job listed on their profile. About this task You can test the connection to the MongoDB server using telnet tool to verify if Rest Service is started. > Python > Mongo: Couldn’t connect to server 127. couldn't get host info for [server] This indicated that DNS could not resolve the server address you gave. sudo status mongodb or sudo service mongodb status Step 5: Start mongo console. In case something goes wrong I’ve uploaded it to my github account. Skip to content. Ask Question handle from a single client # if you encounter MongoDB connection problems. ---> System. 0 it was working fine. The connection string always starts with mongodb://, to indicate it is a connection string in this form. You can then use an Azure Cosmos database as the data store for your MongoDB app. Connection refused to connect. I ran into this Problem with the PHP Data Object. Well from what I can see there was no input like that that we provided going back to 1. Big Data & NoSQL, Information Architecture, Data Management, Governance, etc. Moreover, I can connect to the mongoDB instance from other programs. If you haven’t already confirmed that the service is running you can check using the ps and service commands as explained in the previous article in this series on checking running services. Removing the MediaBrowser add-on fixed it. As your service mongodb status tells, your mongod process don't exists. This sample demonstrates how to use MongoDB with ASP. You can now connect to your MongoDB instance with your system-wide user administrator and create additional users. MongoDB use DATABASE_NAME is used to create database. (Yes, this also frequently happens to other products obtain from there too, like Eclipse, but you know it's such a nice service that you want to trust it. MongoDB users have access to MongoDB databases, while Atlas users have access to the Atlas application itself. js I’m new in nodeJS, started learning by following a trailer on youtube, everything goes well until I added the connect function if mongodb ,. conf # Listen to local interface only. View my complete profile. Windows MongoDB Connection Refuse #3. I cannot connect to my Database. This tutorial will help you set up MongoDB on your server for a production application environment. Docker-compose Spring boo e MongoDB: Connection Refused. View Naveen Kumar Nandyala’s profile on LinkedIn, the world's largest professional community. 0 or later version of the mongo shell with TLS/SSL support. Then open a separate terminal and connect to MongoDB without authentication. 3 Eclipse 4. 搜索了差不多一天的时候都没有相关的解决方法. I have a Linode server running Ubuntu 12. In order to stop MongoDB in a single command, use the following syntax − mongo --eval "db. There are a few main causes why you get ECONNREFUSED - Connection refused by server in FileZilla FTP client. eclipse运行hadoop程序报错:Connection refused: no further information log4j:WARN No appenders could be foun. 【MongoDB】 Failed to connect to 127. cd docker login docker ps -- to check already mongo running. ssh: connect to host ec2-xx-xx-xxx-xxx. Unable to register systems to Satellite : "Unable to register system, not all services available" # subscription-manager register --org="ORG NAME " --activationkey="ActivationKey NAME" Unable to register system, not all services available. This issue can arise due to many factors, however, mentioned scenario is with the ports that are blocked by IPTABLES. js with Express and Angular and then connect it to your Cosmos account configured with Cosmos DB's API for MongoDB. If username and password are specified, the constructor will attempt to authenticate the connection with the database before returning. Three ways to connect to MongoDB Create a new connection (e. An exception occurred while opening a connection to the server. We use cookies to provide social media features and to analyse our traffic. Graylog version - graylog/graylog:2. How to draw route in google-maps-api-v2 from my Current-location to a given Destination. bind_ip = 127. However, spring boot doesn't seem to use an embedded mongodb but fails to connect (Connection refused) because it cannot find a real mongo process running on the test port. ssh: connect to host xxx. As before, open your Connection Manager. No connection could be made because the target machine actively refused it 208. Graylog web interface connection refused. Everything what I have ever wanted was served with empathy and at the best with an easy to understand manual. MongoDB ransom attacks are in Wild. This tutorials uses already implemented REST services using Node. Timeouts should be set very thoughtfully, based on the unique environment. How to use MongoDB with ASP. There are many reasons why Error 102 Connection Refused Unknown Error happen, including having malware, spyware, or programs not installing properly. Use 'connect\'' (and 'openReplicaSet\'') if you want to ignore this global and specify your own timeout. Getting it setup and running on a development box is easy, but I wanted to document the steps for reference. Note: I assume that you have installed/upgrade MongoDB using homebrew. Install MongoDB Download MongoDB from their website. 12-1 MySQL 8. I see your db just exited due to this reason (saw this before I close the window). In my computer MongoDB is installed at C:\Program Files\MongoDB\Server\3. MongoDB Enterprise is available as part of the MongoDB Enterprise Advanced subscription, which features the most comprehensive support and the best SLA when you run MongoDB on your own infrastructure. In this guide, I will show you two ways to create a collection in MongoDB. Can't config replica set using MongoDB 3.