mongos starts but doesn't listen on its assigned port

924 views
Skip to first unread message

David Noble

unread,
Jul 28, 2017, 3:59:17 PM7/28/17
to mongodb-user
Here's my mongos configuration file:

net:
    port: 27017
sharding:
    configDB: config-server.replication-set/<server-names>
systemLog:
    destination: file
    logAppend: true
    path: /var/log/mongodb/mongos.log


Facts:
  • Debian "Jessie" 8 with mongo-org installed using apt-get.
  • Verified with mongo shell: all config servers are reachable and rs.status() shows that the configDB cluster is functional
  • Mongos starts and stays running using mongodb user account, but "netstat -plnt" shows that it's not listening on any port and nothing is listening on port 27017
  • That said mongos does create /tmp/mongodb-27017.sock
  • Verified with netstat: Standalone mongodb runs under mongodb user account and "netstat -plnt" shows it's listening on 27017
Help!

Thanks in advance for your help :)

Kevin Adistambha

unread,
Aug 3, 2017, 1:25:51 AM8/3/17
to mongodb-user

Hi David

Debian “Jessie” 8 with mongo-org installed using apt-get.

Did you use the installation instructions available on Install MongoDB Community Edition on Debian? If not, you may want to follow the instruction on that page since it will install the latest MongoDB version for you.

Verified with mongo shell: all config servers are reachable and rs.status() shows that the configDB cluster is functional

Could you share the output of rs.status()? How about the shard servers?

Mongos starts and stays running using mongodb user account, but
“netstat -plnt” shows that it’s not listening on any port and nothing is
listening on port 27017

This sounds like mongos did not start properly. Could you verify using ps aux that the mongos process is running? If not, there should be an error message in /var/log/mongodb/mongos.log.

Verified with netstat: Standalone mongodb runs under mongodb user
account and “netstat -plnt” shows it’s listening on 27017

Do you mean that you tried to start a standalone mongod to verify that a process can listen to port 27017?

You may want to peruse the procedure outlined in Deploy a Sharded Cluster page for hints of what went wrong.

Best regards,
Kevin

Reply all
Reply to author
Forward
0 new messages