Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot instantiate a MongoDB cluster using Windows Bash Shell #2536

Closed
daernsinstantfortress opened this issue Oct 2, 2017 · 1 comment
Closed

Comments

@daernsinstantfortress
Copy link

daernsinstantfortress commented Oct 2, 2017

Versions

Microsoft Windows [Version 10.0.16299.0]
MongoDB 3.4.9 (latest release version) installed from MongoDB repos using apt

Steps to reproduce

  1. Install MongoDB 3.4.x using apt using MongoDB's repositories:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org

(Taken from here )

  1. Start a mongod config server:
cd ~/
mkdir config
mongod --configsvr --dbpath=config --port=27019 --replSet=config --fork --logpath=mongodb.log
  1. Initialise the config server:
mongo localhost:27019 --eval ' rs.initiate(); '

(It may be necessary to wait for 5s after this command for the config server to complete initialisation)

  1. Start a mongos using this config server:
mongos --port=27017 --configdb=config/localhost:27019

If all is well, the log output of this command should include:

[thread2] waiting for connections on port 27017
  1. Verify that the server is listening on 27017:
mongo

Expected Behaviour

Mongos should start up and listen on TCP:27017. The final connection test returns:

mongos>

(It may also return some warnings - this is ok)

Observed Behaviour

Mongos never completes startup and does not open a listening socket on TCP:27017. The final connection test returns:

exception: connect failed

The mongos log does not report "waiting for connections on port 27017"

Other notes:

With further testing, I have shown that it is possible to run the config server (mongod) in bash and the mongos process natively in Windows (using a Windows-specific binary download), but that the mongos will not successfully complete startup and will not listen on TCP:27017.

I have tested the above steps on native Ubuntu (AWS) and it worked as expected.

@therealkenc
Copy link
Collaborator

see #796 (message).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants