I’m trying to follow chapter 1, Lab - Launching Mongod
vagrant enviroment looks fine after resolve some problems.
-
Manual instalation of pymongo (requires python-dev). Pease note that python-dev is sugested BUT NOT INSTALLED.
-
Manual instalations of repository keys (NO_PUBKEY 58712A2291FA4AD5)
mongod-m103: + install_pymongo
mongod-m103: + sudo apt-get -y install python-pip
mongod-m103: Reading package lists…
mongod-m103: Building dependency tree…
mongod-m103: Reading state information…
mongod-m103: The following extra packages will be installed:
mongod-m103: build-essential dpkg-dev g++ g+±4.8 libalgorithm-diff-perl
mongod-m103: libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl
mongod-m103: libfile-fcntllock-perl libstdc+±4.8-dev python-chardet-whl python-colorama
mongod-m103: python-colorama-whl python-distlib python-distlib-whl python-html5lib
mongod-m103: python-html5lib-whl python-pip-whl python-requests-whl python-setuptools
mongod-m103: python-setuptools-whl python-six-whl python-urllib3-whl python-wheel
mongod-m103: Suggested packages:
mongod-m103: debian-keyring g+±multilib g+±4.8-multilib gcc-4.8-doc libstdc++6-4.8-dbg
mongod-m103: libstdc+±4.8-doc python-genshi python-lxml
mongod-m103: Recommended packages:
mongod-m103: python-dev-all
mongod-m103: The following NEW packages will be installed:
mongod-m103: build-essential dpkg-dev g++ g+±4.8 libalgorithm-diff-perl
mongod-m103: libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl
mongod-m103: libfile-fcntllock-perl libstdc+±4.8-dev python-chardet-whl python-colorama
mongod-m103: python-colorama-whl python-distlib python-distlib-whl python-html5lib
mongod-m103: python-html5lib-whl python-pip python-pip-whl python-requests-whl
mongod-m103: python-setuptools python-setuptools-whl python-six-whl python-urllib3-whl
mongod-m103: python-wheel
mongod-m103: 0 upgraded, 25 newly installed, 0 to remove and 1 not upgraded.
mongod-m103: Need to get 21.7 MB of archives.
But I can’t connect to mongo. I think that mongo not is runing at all.
vagrant@m103:~$ mongo admin --host localhost:27000 --eval '
db.createUser({
user: "m103-admin",
pwd: "m103-pass",
roles: [
{role: "root", db: "admin"}
]
})
'
MongoDB shell version v3.6.21
connecting to: mongodb://localhost:27000/admin?gssapiServiceName=mongodb
2021-02-09T13:21:41.590+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:27000, in(checking socket for error after poll), reason: Connection refused
2021-02-09T13:21:41.590+0000 E QUERY [thread1] Error: couldn't connect to server localhost:27000, connection attempt failed :
connect@src/mongo/shell/mongo.js:275:13
@(connect):1:6
exception: connect failed
Any hint?