Connection refused when trying to run ./install.py
timothydillan opened this issue · comments
Hi!
I'm trying to install airnotifier on my VPS so that I'll be able to integrate push notification with my customized moodle app. The Moodle is also hosted on the same VPS. I'm pretty new to web development stuff so please forgive me for that.
So far, I've followed: https://github.com/airnotifier/airnotifier/wiki/Installation-3.x successfully until the part where we're supposed to set up an initial user: pipenv run ./install.py, but I keep on getting this error:
Traceback (most recent call last):
File "/root/airnotifier/install.py", line 64, in <module>
collection_names = masterdb.collection_names()
File "/root/.local/share/virtualenvs/airnotifier--hHQdAqd/lib64/python3.6/site-packages/pymongo/database.py", line 552, in collection_names
ReadPreference.PRIMARY) as (sock_info, slave_okay):
File "/usr/lib64/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/root/.local/share/virtualenvs/airnotifier--hHQdAqd/lib64/python3.6/site-packages/pymongo/mongo_client.py", line 904, in _socket_for_reads
with self._get_socket(read_preference) as sock_info:
File "/usr/lib64/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/root/.local/share/virtualenvs/airnotifier--hHQdAqd/lib64/python3.6/site-packages/pymongo/mongo_client.py", line 868, in _get_socket
server = self._get_topology().select_server(selector)
File "/root/.local/share/virtualenvs/airnotifier--hHQdAqd/lib64/python3.6/site-packages/pymongo/topology.py", line 214, in select_server
address))
File "/root/.local/share/virtualenvs/airnotifier--hHQdAqd/lib64/python3.6/site-packages/pymongo/topology.py", line 189, in select_servers
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused
I'm not sure if I'm missing something.
Any help is appreciated.
My bad. After searching around, seems like I needed to run:
sudo systemctl unmask mongod
then,
sudo service mongod start
and then run the install command.