Monday, 3 April 2017

How to change default port of bitnami mongodb vm in microsoft azure

I am deploying my NodeJS web application project in Microsoft azure. I am using Bitnami MongoDB vm for my server, the default port 27017 is not secured. Due to security reason I wanted to change some 27171, I have changed in mongo.conf file but its giving below error.

mongod.conf file-

dbpath=/data/db

#where to log
logpath=/opt/bitnami/mongodb/log/mongodb.log

logappend=true

#bind_ip = 127.0.0.1
port = 27171

journal=true

# Turn on/off security.  Off is currently the default
#noauth = true
auth = true

The error is

MongoDB shell version v3.4.0
connecting to: mongodb:///opt/bitnami/mongodb/tmp/mongodb-27017.sock/
2017-04-03T13:07:48.437+0000 W NETWORK  [main] Failed to connect to /opt/bitnami/mongodb/tmp/mongodb-27017.sock:0, reason: No such file or directory
2017-04-03T13:07:48.462+0000 E QUERY    [main] Error: couldn't connect to server/opt/bitnami/mongodb/tmp/mongodb-27017.sock:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:234:13
@(connect):1:6
exception: connect failed

please suggest what I did wrong, thank in advance.



via Chandrashekhar

No comments:

Post a Comment