Closed mohierf closed 7 years ago
In the backend log:
[2017-02-14 04:41:07,622] - eve - ERROR - Exception on /service/589c88356376e9e74f2e6e2b [PATCH]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/site-packages/eve/endpoints.py", line 94, in item_endpoint
response = patch(resource, **lookup)
File "/usr/local/lib/python2.7/site-packages/eve/methods/common.py", line 242, in rate_limited
return f(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/eve/auth.py", line 77, in decorated
if not auth.authorized(roles, resource_name, request.method):
File "/usr/local/lib/python2.7/site-packages/eve/auth.py", line 259, in authorized
method)
File "/usr/local/lib/python2.7/site-packages/alignak_backend/app.py", line 83, in check_auth
user = current_app.data.driver.db['user'].find_one({'token': token})
File "/usr/local/lib/python2.7/site-packages/pymongo/collection.py", line 1102, in find_one
for result in cursor.limit(-1):
File "/usr/local/lib/python2.7/site-packages/pymongo/cursor.py", line 1114, in next
if len(self.__data) or self._refresh():
File "/usr/local/lib/python2.7/site-packages/pymongo/cursor.py", line 1036, in _refresh
self.__collation))
File "/usr/local/lib/python2.7/site-packages/pymongo/cursor.py", line 873, in __send_message
**kwargs)
File "/usr/local/lib/python2.7/site-packages/pymongo/mongo_client.py", line 905, in _send_message_with_response
exhaust)
File "/usr/local/lib/python2.7/site-packages/pymongo/mongo_client.py", line 916, in _reset_on_error
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/pymongo/server.py", line 99, in send_message_with_response
with self.get_socket(all_credentials, exhaust) as sock_info:
File "/usr/local/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/usr/local/lib/python2.7/site-packages/pymongo/server.py", line 168, in get_socket
with self.pool.get_socket(all_credentials, checkout) as sock_info:
File "/usr/local/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/usr/local/lib/python2.7/site-packages/pymongo/pool.py", line 790, in get_socket
sock_info = self._get_socket_no_auth()
File "/usr/local/lib/python2.7/site-packages/pymongo/pool.py", line 836, in _get_socket_no_auth
sock_info = self._check(sock_info)
File "/usr/local/lib/python2.7/site-packages/pymongo/pool.py", line 890, in _check
return self.connect()
File "/usr/local/lib/python2.7/site-packages/pymongo/pool.py", line 763, in connect
_raise_connection_failure(self.address, error)
File "/usr/local/lib/python2.7/site-packages/pymongo/pool.py", line 211, in _raise_connection_failure
raise AutoReconnect(msg)
AutoReconnect: 93.93.47.82:27017: [Errno 61] Connection refused
And then the backend was restarted at 05:03 ! You did restarted @ddurieux ?
yes
Then you should have checked that Alignak modules were not broken 😞
Using
try...except
is a must-have for the backend modules!