Advertisement
Guest User

Untitled

a guest
Aug 7th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.56 KB | None | 0 0
  1. Unhandled exception in noc-classifier
  2. Unhandled exception in noc-classifier
  3. File: /opt/noc/lib/python2.7/site-packages/pymongo/mongo_client.py, Line: 773
  4. Traceback:
  5. File: /opt/noc/lib/python2.7/site-packages/pymongo/mongo_client.py (Line: 773)
  6. Function: __socket
  7. 766
  8. 767 # Check if a unix domain socket
  9. 768 if host.endswith('.sock'):
  10. 769 host_details = "%s:" % host
  11. 770 else:
  12. 771 host_details = "%s:%d:" % (host, port)
  13. 772 raise AutoReconnect("could not connect to "
  14. 773 ==> "%s %s" % (host_details, str(why)))
  15. 774 try:
  16. 775 self.__check_auth(sock_info)
  17. 776 except OperationFailure:
  18. 777 self.__pool.maybe_return_socket(sock_info)
  19. 778 raise
  20. 779 return sock_info
  21. Variables:
  22. self = Connection(None, None)
  23. host_details = 'localhost:27017:'
  24. host = 'localhost'
  25. why = error(111, 'Connection refused')
  26. port = 27017
  27. ------------------------------------------------------------------------
  28. File: /opt/noc/lib/python2.7/site-packages/pymongo/mongo_client.py (Line: 1036)
  29. Function: _send_message_with_response
  30. 1029 """Send a message to Mongo and return the response.
  31. 1030
  32. 1031 Sends the given message and returns the response.
  33. 1032
  34. 1033 :Parameters:
  35. 1034 - `message`: (request_id, data) pair making up the message to send
  36. 1035 """
  37. 1036 ==> sock_info = self.__socket()
  38. 1037 exhaust = kwargs.get('exhaust')
  39. 1038 try:
  40. 1039 try:
  41. 1040 if not exhaust and "network_timeout" in kwargs:
  42. 1041 sock_info.sock.settimeout(kwargs["network_timeout"])
  43. 1042 response = self.__send_and_receive(message, sock_info)
  44. Variables:
  45. self = Connection(None, None)
  46. message =
  47. (1036001642,
  48. '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',
  49. 42)
  50. _must_use_master = False
  51. kwargs =
  52. {'exhaust': False,
  53. 'read_preference': False,
  54. 'secondary_acceptable_latency_ms': 15.0,
  55. 'tag_sets': [{}]}
  56. ------------------------------------------------------------------------
  57. File: /opt/noc/lib/python2.7/site-packages/pymongo/cursor.py (Line: 782)
  58. Function: __send_message
  59. 775 self.__secondary_acceptable_latency_ms)
  60. 776 kwargs['exhaust'] = self.__exhaust
  61. 777 if self.__connection_id is not None:
  62. 778 kwargs["_connection_to_use"] = self.__connection_id
  63. 779 kwargs.update(self.__kwargs)
  64. 780
  65. 781 try:
  66. 782 ==> res = client._send_message_with_response(message, **kwargs)
  67. 783 self.__connection_id, (response, sock, pool) = res
  68. 784 if self.__exhaust:
  69. 785 self.__exhaust_mgr = _SocketManager(sock, pool)
  70. 786 except AutoReconnect:
  71. 787 # Don't try to send kill cursors on another socket
  72. 788 # or to another server. It can cause a _pinValue
  73. Variables:
  74. message =
  75. (1036001642,
  76. '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',
  77. 42)
  78. client = Connection(None, None)
  79. self = <pymongo.cursor.Cursor object at 0x6950610>
  80. kwargs =
  81. {'_must_use_master': False,
  82. 'exhaust': False,
  83. 'read_preference': False,
  84. 'secondary_acceptable_latency_ms': 15.0,
  85. 'tag_sets': [{}]}
  86. ------------------------------------------------------------------------
  87. File: /opt/noc/lib/python2.7/site-packages/pymongo/cursor.py (Line: 848)
  88. Function: _refresh
  89. 841 else:
  90. 842 ntoreturn = self.__limit
  91. 843 self.__send_message(
  92. 844 message.query(self.__query_options(),
  93. 845 self.__collection.full_name,
  94. 846 self.__skip, ntoreturn,
  95. 847 self.__query_spec(), self.__fields,
  96. 848 ==> self.__uuid_subtype))
  97. 849 if not self.__id:
  98. 850 self.__killed = True
  99. 851 elif self.__id: # Get More
  100. 852 if self.__limit:
  101. 853 limit = self.__limit - self.__retrieved
  102. 854 if self.__batch_size:
  103. Variables:
  104. self = <pymongo.cursor.Cursor object at 0x6950610>
  105. ntoreturn = 1000
  106. ------------------------------------------------------------------------
  107. File: /opt/noc/lib/python2.7/site-packages/pymongo/cursor.py (Line: 904)
  108. Function: next
  109. 897 def __iter__(self):
  110. 898 return self
  111. 899
  112. 900 def next(self):
  113. 901 if self.__empty:
  114. 902 raise StopIteration
  115. 903 db = self.__collection.database
  116. 904 ==> if len(self.__data) or self._refresh():
  117. 905 if self.__manipulate:
  118. 906 return db._fix_outgoing(self.__data.popleft(),
  119. 907 self.__collection)
  120. 908 else:
  121. 909 return self.__data.popleft()
  122. 910 else:
  123. Variables:
  124. self = <pymongo.cursor.Cursor object at 0x6950610>
  125. db = Database(Connection(None, None), u'noc')
  126. ------------------------------------------------------------------------
  127. File: /opt/noc/lib/python2.7/site-packages/mongoengine/queryset.py (Line: 979)
  128. Function: next
  129. 972 self._iter = True
  130. 973 try:
  131. 974 if self._limit == 0:
  132. 975 raise StopIteration
  133. 976 if self._scalar:
  134. 977 return self._get_scalar(self._document._from_son(
  135. 978 self._cursor.next()))
  136. 979 ==> return self._document._from_son(self._cursor.next())
  137. 980 except StopIteration, e:
  138. 981 self.rewind()
  139. 982 raise e
  140. 983
  141. 984 def rewind(self):
  142. 985 """Rewind the cursor to its unevaluated state.
  143. Variables:
  144. self = .. queryset mid-iteration ..
  145. ------------------------------------------------------------------------
  146. File: /opt/noc/fm/classifier/__init__.py (Line: 436)
  147. Function: iter_new_events
  148. 429 e.mark_as_new("Reclassification has been requested by noc-classifer")
  149. 430 logging.debug("Failed event %s has been recovered" % e.id)
  150. 431
  151. 432 def iter_new_events(self, max_chunk=1000):
  152. 433 """
  153. 434 Generator iterating unclassified events in the queue
  154. 435 """
  155. 436 ==> for e in NewEvent.objects.order_by("seq")[:max_chunk]:
  156. 437 yield e
  157. 438
  158. 439 def mark_as_failed(self, event, traceback=None):
  159. 440 """
  160. 441 Write error log and mark event as failed
  161. 442 """
  162. Variables:
  163. max_chunk = 1000
  164. self = <noc.fm.classifier.Classifier object at 0x44846d0>
  165. ------------------------------------------------------------------------
  166. File: /opt/noc/fm/classifier/__init__.py (Line: 774)
  167. Function: run
  168. 767 while True:
  169. 768 n = 0 # Number of events processed
  170. 769 sn = st.copy()
  171. 770 t0 = time.time()
  172. 771 if self.is_distributed and t0 > nu:
  173. 772 self.update_object_map()
  174. 773 nu = t0 + OM_UPDATE_INTERVAL
  175. 774 ==> for e in self.iter_new_events(REPORT_INTERVAL):
  176. 775 s = self.consume_event(e)
  177. 776 sn[s] += 1
  178. 777 n += 1
  179. 778 if n:
  180. 779 # Write performance report
  181. 780 tt = time.time()
  182. Variables:
  183. e = <NewEvent: 53e43cefa4fd7605ce758e23>
  184. perf = 48.42859782006281
  185. CHECK_EVERY = 1
  186. i = 7
  187. tt = 1407466736.051694
  188. t0 = 1407466740.064536
  189. n = 0
  190. self = <noc.fm.classifier.Classifier object at 0x44846d0>
  191. s =
  192. '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'
  193. sn = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0}
  194. dt = 0.020648956298828125
  195. st = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0}
  196. nu = 1407465820.902926
  197. OM_UPDATE_INTERVAL = 600
  198. REPORT_INTERVAL = 1000
  199. ------------------------------------------------------------------------
  200. File: /opt/noc/lib/daemon.py (Line: 383)
  201. Function: guarded_run
  202. 376
  203. 377 def guarded_run(self):
  204. 378 """
  205. 379 Run daemon and catch common exceptions
  206. 380 :return:
  207. 381 """
  208. 382 try:
  209. 383 ==> self.run()
  210. 384 except KeyboardInterrupt:
  211. 385 pass
  212. 386 except MemoryError:
  213. 387 logging.error("Out of memory. Exiting.")
  214. 388 except SystemExit:
  215. 389 logging.info("Exiting")
  216. Variables:
  217. self = <noc.fm.classifier.Classifier object at 0x44846d0>
  218. ------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement