$ python3 main.py init
Clear old data
Traceback (most recent call last):
File "main.py", line 61, in <module>
parser.parse_args().func()
File "main.py", line 19, in init
Initialize(db)
File "/home/sea-kg/develop/ctfight/ctf-attack-defense.git/classes/initialize.py", line 33, in __init__
self.delete_old_data()
File "/home/sea-kg/develop/ctfight/ctf-attack-defense.git/classes/initialize.py", line 50, in delete_old_data
self.db.teams.delete_many({})
File "/home/sea-kg/.local/lib/python3.5/site-packages/pymongo/collection.py", line 974, in delete_many
with self._socket_for_writes() as sock_info:
File "/usr/lib/python3.5/contextlib.py", line 59, in __enter__
return next(self.gen)
File "/home/sea-kg/.local/lib/python3.5/site-packages/pymongo/mongo_client.py", line 762, in _get_socket
server = self._get_topology().select_server(selector)
File "/home/sea-kg/.local/lib/python3.5/site-packages/pymongo/topology.py", line 210, in select_server
address))
File "/home/sea-kg/.local/lib/python3.5/site-packages/pymongo/topology.py", line 186, in select_servers
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused```