I'm working with Debian 4.9.168 and I want to configure mongoDB replica set monitoring through google cloud, and I found the best solution is through bindplane bluemedora (currect me if I wrong).
So, I deployed my mongo replica and I need to start a mongos instance. I started it with that command:
sudo mongos --configdb rs0/:27019,:27019 --bind_ip 0.0.0.0
and I'm getting that error:
2019-06-09T14:18:07.899+0000 I CONTROL [mongosMain] options: { net: { bindIp: "0.0.0.0" }, sharding: { configDB: "rs0/:27019,35.222.135.175:27019" } }
2019-06-09T14:18:07.900+0000 E SHARDING [mongosMain] Failed to set up listener: SocketException: Address already in use
2019-06-09T14:18:07.900+0000 I CONTROL [mongosMain] shutting down with code:48
So I checked if there's a process that uses that address, and there isn't:
netstat -tuna | grep 2701
tcp 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN
tcp 0 0 10.128.0.13:38586 10.128.0.14:27017 ESTABLISHED
tcp 0 0 10.128.0.13:27017 10.128.0.14:56518 ESTABLISHED
tcp 0 0 10.128.0.13:27017 10.128.0.14:56498 ESTABLISHED
tcp 0 0 10.128.0.13:27017 10.128.0.14:56552 ESTABLISHED
tcp 0 0 10.128.0.13:27017 10.128.0.14:56492 ESTABLISHED
tcp 0 0 10.128.0.13:27017 10.128.0.14:56550 ESTABLISHED
my /etc/mongod.conf file (created automaticly through mongoDB application in Google cloud - https://console.cloud.google.com/marketplace/details/click-to-deploy-images/mongodb):
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /mnt/mongodb/db
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# network interfaces
#
# MongoDB 3.0.x *debian* packages set bind_ip to 127.0.0.1 by default
# Compute Engine public addresses are properly firewalled by default
# set bind_ip to 0.0.0.0 to emulate pre-2.6 behavior which eases maintenance
net:
port: 27017
bindIp: 0.0.0.0
#processManagement:
#security:
#authorization: enabled
#keyFile: replace_me
#operationProfiling:
replication:
replSetName: rs0
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:
I really appreciate any kind of help. Thank you :)
No comments:
Post a Comment