Alignak-monitoring-contrib / alignak-backend

Backend for alignak (REST API for configuration, retention, livestate, logs) based on Python Eve
GNU Affero General Public License v3.0
11 stars 4 forks source link

Exception active_checks_enabled on start #518

Closed mohierf closed 6 years ago

mohierf commented 6 years ago

Exception raised on very first start

Traceback (most recent call last):
  File "/usr/local/etc/alignak-backend/alignak-backend-3.6.wsgi", line 4, in <module>
    from alignak_backend.app import app as application
  File "/usr/local/lib/python3.6/site-packages/alignak_backend/app.py", line 2404, in <module>
    }, True)
  File "/usr/local/lib/python3.6/site-packages/eve/methods/post.py", line 279, in post_internal
    getattr(app, "on_inserted_%s" % resource)(documents)
  File "/usr/local/lib/python3.6/site-packages/events/events.py", line 95, in __call__
    f(*a, **kw)
  File "/usr/local/lib/python3.6/site-packages/alignak_backend/app.py", line 1547, in after_insert_host
    active_checked = item['active_checks_enabled']
KeyError: 'active_checks_enabled'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
dropping root privileges after application loading
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 16807)
spawned uWSGI worker 1 (pid: 16813, cores: 1)
spawned uWSGI worker 2 (pid: 16814, cores: 1)
spawned uWSGI worker 3 (pid: 16815, cores: 1)
spawned uWSGI worker 4 (pid: 16816, cores: 1)
spawned uWSGI worker 5 (pid: 16817, cores: 1)
spawned uWSGI worker 6 (pid: 16818, cores: 1)
spawned uWSGI http 1 (pid: 16819)
mohierf commented 6 years ago

After stop and restart:

Traceback (most recent call last):
  File "/usr/local/etc/alignak-backend/alignak-backend-3.6.wsgi", line 4, in <module>
    from alignak_backend.app import app as application
  File "/usr/local/lib/python3.6/site-packages/alignak_backend/app.py", line 2466, in <module>
    Livesynthesis.recalculate()
  File "/usr/local/lib/python3.6/site-packages/alignak_backend/livesynthesis.py", line 132, in recalculate
    Timeseries.send_livesynthesis_metrics(realm['_id'], data)
  File "/usr/local/lib/python3.6/site-packages/alignak_backend/timeseries.py", line 76, in send_livesynthesis_metrics
    "realm": Timeseries.get_realms_prefix(realm_uuid),
  File "/usr/local/lib/python3.6/site-packages/alignak_backend/timeseries.py", line 221, in get_realms_prefix
    if realm_info['_tree_parents']:
KeyError: '_tree_parents'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
dropping root privileges after application loading
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 16871)
spawned uWSGI worker 1 (pid: 16878, cores: 1)
spawned uWSGI worker 2 (pid: 16879, cores: 1)
spawned uWSGI worker 3 (pid: 16880, cores: 1)