Reputation: 83
I have run this command at mongo routing server
mongos --configdb config0/54.172.165.128:27019,54.165.48.170:27019
But output is
2018-02-08T11:39:48.566+0000 W SHARDING [main] Running a sharded cluster with fewer than 3 config servers should only be done for testing purposes and is not recommended for production.
2018-02-08T11:39:48.571+0000 I CONTROL [main]
2018-02-08T11:39:48.571+0000 I CONTROL [main] ** WARNING: Access control is not enabled for the database.
2018-02-08T11:39:48.571+0000 I CONTROL [main] ** Read and write access to data and configuration is unrestricted.
2018-02-08T11:39:48.571+0000 I CONTROL [main] ** WARNING: You are running this process as the root user, which is not recommended.
2018-02-08T11:39:48.571+0000 I CONTROL [main]
2018-02-08T11:39:48.571+0000 I CONTROL [main] ** WARNING: This server is bound to localhost.
2018-02-08T11:39:48.571+0000 I CONTROL [main] ** Remote systems will be unable to connect to this server.
2018-02-08T11:39:48.571+0000 I CONTROL [main] ** Start the server with --bind_ip <address> to specify which IP
2018-02-08T11:39:48.571+0000 I CONTROL [main] ** addresses it should serve responses from, or with --bind_ip_all to
2018-02-08T11:39:48.571+0000 I CONTROL [main] ** bind to all interfaces. If this behavior is desired, start the
2018-02-08T11:39:48.571+0000 I CONTROL [main] ** server with --bind_ip 127.0.0.1 to disable this warning.
2018-02-08T11:39:48.571+0000 I CONTROL [main]
2018-02-08T11:39:48.571+0000 I SHARDING [mongosMain] mongos version v3.6.2
2018-02-08T11:39:48.571+0000 I CONTROL [mongosMain] git version: 489d177dbd0f0420a8ca04d39fd78d0a2c539420
2018-02-08T11:39:48.571+0000 I CONTROL [mongosMain] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2018-02-08T11:39:48.571+0000 I CONTROL [mongosMain] allocator: tcmalloc
2018-02-08T11:39:48.571+0000 I CONTROL [mongosMain] modules: none
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] build environment:
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] distmod: ubuntu1604
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] distarch: x86_64
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] target_arch: x86_64
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] db version v3.6.2
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] git version: 489d177dbd0f0420a8ca04d39fd78d0a2c539420
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] allocator: tcmalloc
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] modules: none
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] build environment:
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] distmod: ubuntu1604
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] distarch: x86_64
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] target_arch: x86_64
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] options: { sharding: { configDB: "config0/54.172.165.128:27019,54.165.48.170:27019" } }
2018-02-08T11:39:48.572+0000 E SHARDING [mongosMain] Failed to set up listener: SocketException: Address already in use
2018-02-08T11:39:48.572+0000 I CONTROL [mongosMain] shutting down with code:48
What is wrong here?
Upvotes: 0
Views: 615
Reputation: 14456
You've got something running on port 27017
:
Failed to set up listener: SocketException: Address already in use.
If you want it on this port you can see what's running on that port using netstat -a -b
.
Or you can specify another port with the --port xx
option (https://docs.mongodb.com/manual/reference/program/mongos/#cmdoption-mongos-port)
Upvotes: 1