KevaTeam / ctf-attack-defense

Attack-defense platform
GNU General Public License v3.0
25 stars 6 forks source link

If mongo not started then got terrible error #1

Open sea-kg opened 8 years ago

sea-kg commented 8 years ago
$ 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```
shipko commented 8 years ago

Все верно, возможно потом сделаю ошибку