Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Unhandled exception in noc-classifier
- Unhandled exception in noc-classifier
- File: /opt/noc/lib/python2.7/site-packages/pymongo/mongo_client.py, Line: 773
- Traceback:
- File: /opt/noc/lib/python2.7/site-packages/pymongo/mongo_client.py (Line: 773)
- Function: __socket
- 766
- 767 # Check if a unix domain socket
- 768 if host.endswith('.sock'):
- 769 host_details = "%s:" % host
- 770 else:
- 771 host_details = "%s:%d:" % (host, port)
- 772 raise AutoReconnect("could not connect to "
- 773 ==> "%s %s" % (host_details, str(why)))
- 774 try:
- 775 self.__check_auth(sock_info)
- 776 except OperationFailure:
- 777 self.__pool.maybe_return_socket(sock_info)
- 778 raise
- 779 return sock_info
- Variables:
- self = Connection(None, None)
- host_details = 'localhost:27017:'
- host = 'localhost'
- why = error(111, 'Connection refused')
- port = 27017
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/pymongo/mongo_client.py (Line: 1036)
- Function: _send_message_with_response
- 1029 """Send a message to Mongo and return the response.
- 1030
- 1031 Sends the given message and returns the response.
- 1032
- 1033 :Parameters:
- 1034 - `message`: (request_id, data) pair making up the message to send
- 1035 """
- 1036 ==> sock_info = self.__socket()
- 1037 exhaust = kwargs.get('exhaust')
- 1038 try:
- 1039 try:
- 1040 if not exhaust and "network_timeout" in kwargs:
- 1041 sock_info.sock.settimeout(kwargs["network_timeout"])
- 1042 response = self.__send_and_receive(message, sock_info)
- Variables:
- self = Connection(None, None)
- message =
- (1036001642,
- 'Y\x00\x00\x00j!\xc0=\x00\x00\x00\x00\xd4\x07\x00\x00\x00\x00\x00\x00noc.noc.events.new\x00\x00\x00\x00\x00\xe8\x03\x00\x00*\x00\x00\x00\x03$query\x00\x05\x00\x00\x00\x00\x03$orderby\x00\x0e\x00\x00\x00\x10seq\x00\x01\x00\x00\x00\x00\x00',
- 42)
- _must_use_master = False
- kwargs =
- {'exhaust': False,
- 'read_preference': False,
- 'secondary_acceptable_latency_ms': 15.0,
- 'tag_sets': [{}]}
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/pymongo/cursor.py (Line: 782)
- Function: __send_message
- 775 self.__secondary_acceptable_latency_ms)
- 776 kwargs['exhaust'] = self.__exhaust
- 777 if self.__connection_id is not None:
- 778 kwargs["_connection_to_use"] = self.__connection_id
- 779 kwargs.update(self.__kwargs)
- 780
- 781 try:
- 782 ==> res = client._send_message_with_response(message, **kwargs)
- 783 self.__connection_id, (response, sock, pool) = res
- 784 if self.__exhaust:
- 785 self.__exhaust_mgr = _SocketManager(sock, pool)
- 786 except AutoReconnect:
- 787 # Don't try to send kill cursors on another socket
- 788 # or to another server. It can cause a _pinValue
- Variables:
- message =
- (1036001642,
- 'Y\x00\x00\x00j!\xc0=\x00\x00\x00\x00\xd4\x07\x00\x00\x00\x00\x00\x00noc.noc.events.new\x00\x00\x00\x00\x00\xe8\x03\x00\x00*\x00\x00\x00\x03$query\x00\x05\x00\x00\x00\x00\x03$orderby\x00\x0e\x00\x00\x00\x10seq\x00\x01\x00\x00\x00\x00\x00',
- 42)
- client = Connection(None, None)
- self = <pymongo.cursor.Cursor object at 0x6950610>
- kwargs =
- {'_must_use_master': False,
- 'exhaust': False,
- 'read_preference': False,
- 'secondary_acceptable_latency_ms': 15.0,
- 'tag_sets': [{}]}
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/pymongo/cursor.py (Line: 848)
- Function: _refresh
- 841 else:
- 842 ntoreturn = self.__limit
- 843 self.__send_message(
- 844 message.query(self.__query_options(),
- 845 self.__collection.full_name,
- 846 self.__skip, ntoreturn,
- 847 self.__query_spec(), self.__fields,
- 848 ==> self.__uuid_subtype))
- 849 if not self.__id:
- 850 self.__killed = True
- 851 elif self.__id: # Get More
- 852 if self.__limit:
- 853 limit = self.__limit - self.__retrieved
- 854 if self.__batch_size:
- Variables:
- self = <pymongo.cursor.Cursor object at 0x6950610>
- ntoreturn = 1000
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/pymongo/cursor.py (Line: 904)
- Function: next
- 897 def __iter__(self):
- 898 return self
- 899
- 900 def next(self):
- 901 if self.__empty:
- 902 raise StopIteration
- 903 db = self.__collection.database
- 904 ==> if len(self.__data) or self._refresh():
- 905 if self.__manipulate:
- 906 return db._fix_outgoing(self.__data.popleft(),
- 907 self.__collection)
- 908 else:
- 909 return self.__data.popleft()
- 910 else:
- Variables:
- self = <pymongo.cursor.Cursor object at 0x6950610>
- db = Database(Connection(None, None), u'noc')
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/mongoengine/queryset.py (Line: 979)
- Function: next
- 972 self._iter = True
- 973 try:
- 974 if self._limit == 0:
- 975 raise StopIteration
- 976 if self._scalar:
- 977 return self._get_scalar(self._document._from_son(
- 978 self._cursor.next()))
- 979 ==> return self._document._from_son(self._cursor.next())
- 980 except StopIteration, e:
- 981 self.rewind()
- 982 raise e
- 983
- 984 def rewind(self):
- 985 """Rewind the cursor to its unevaluated state.
- Variables:
- self = .. queryset mid-iteration ..
- ------------------------------------------------------------------------
- File: /opt/noc/fm/classifier/__init__.py (Line: 436)
- Function: iter_new_events
- 429 e.mark_as_new("Reclassification has been requested by noc-classifer")
- 430 logging.debug("Failed event %s has been recovered" % e.id)
- 431
- 432 def iter_new_events(self, max_chunk=1000):
- 433 """
- 434 Generator iterating unclassified events in the queue
- 435 """
- 436 ==> for e in NewEvent.objects.order_by("seq")[:max_chunk]:
- 437 yield e
- 438
- 439 def mark_as_failed(self, event, traceback=None):
- 440 """
- 441 Write error log and mark event as failed
- 442 """
- Variables:
- max_chunk = 1000
- self = <noc.fm.classifier.Classifier object at 0x44846d0>
- ------------------------------------------------------------------------
- File: /opt/noc/fm/classifier/__init__.py (Line: 774)
- Function: run
- 767 while True:
- 768 n = 0 # Number of events processed
- 769 sn = st.copy()
- 770 t0 = time.time()
- 771 if self.is_distributed and t0 > nu:
- 772 self.update_object_map()
- 773 nu = t0 + OM_UPDATE_INTERVAL
- 774 ==> for e in self.iter_new_events(REPORT_INTERVAL):
- 775 s = self.consume_event(e)
- 776 sn[s] += 1
- 777 n += 1
- 778 if n:
- 779 # Write performance report
- 780 tt = time.time()
- Variables:
- e = <NewEvent: 53e43cefa4fd7605ce758e23>
- perf = 48.42859782006281
- CHECK_EVERY = 1
- i = 7
- tt = 1407466736.051694
- t0 = 1407466740.064536
- n = 0
- self = <noc.fm.classifier.Classifier object at 0x44846d0>
- s =
- 'elapsed: 0.0206s, speed: 48.4ev/s, events: 1, lag: 1.051738s, failed: 0, deleted: 0, suppressed: 0, unknown: 0, classified: 1, disposed: 0, duplicated: 0, unk. duplicated: 0'
- sn = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0}
- dt = 0.020648956298828125
- st = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0}
- nu = 1407465820.902926
- OM_UPDATE_INTERVAL = 600
- REPORT_INTERVAL = 1000
- ------------------------------------------------------------------------
- File: /opt/noc/lib/daemon.py (Line: 383)
- Function: guarded_run
- 376
- 377 def guarded_run(self):
- 378 """
- 379 Run daemon and catch common exceptions
- 380 :return:
- 381 """
- 382 try:
- 383 ==> self.run()
- 384 except KeyboardInterrupt:
- 385 pass
- 386 except MemoryError:
- 387 logging.error("Out of memory. Exiting.")
- 388 except SystemExit:
- 389 logging.info("Exiting")
- Variables:
- self = <noc.fm.classifier.Classifier object at 0x44846d0>
- ------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement