Advertisement
Guest User

Untitled

a guest
Feb 17th, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.38 KB | None | 0 0
  1. 2015-02-17 12:24:50,397 [fm.alarm] UNHANDLED EXCEPTION (2015-02-17 12:24:50.385122)
  2. BRANCH: develop TIP: 0997ca557065
  3. PROCESS: ./scripts/noc-web.py
  4. ERROR FINGERPRINT: 685ef0b2-eb54-5794-b643-8aa2426f31f2
  5. WORKING DIRECTORY: /opt/noc
  6. EXCEPTION: <class 'mongoengine.errors.ValidationError'> Unable to dereference <class 'noc.fm.models.alarmclass.AlarmClass'>:522888964a5e68440f61a449
  7. START OF TRACEBACK
  8. ------------------------------------------------------------------------
  9. File: lib/nosql.py (Line: 144)
  10. Function: __get__
  11. 137 v = self.document_type.objects(id=value).first()
  12. 138 if v and self.ttl:
  13. 139 self._DEREF_CACHE[str(value)] = (t + self.ttl, v)
  14. 140 if v is not None:
  15. 141 instance._data[self.name] = v
  16. 142 else:
  17. 143 raise ValidationError("Unable to dereference %s:%s" % (
  18. 144 ==> self.document_type, value))
  19. 145 return super(PlainReferenceField, self).__get__(instance, owner)
  20. 146
  21. 147 def to_mongo(self, document):
  22. 148 if isinstance(document, Document):
  23. 149 # We need the id from the saved object to create the DBRef
  24. 150 id_ = document.id
  25. Variables:
  26. owner = <class 'noc.fm.models.activealarm.ActiveAlarm'>
  27. instance = <ActiveAlarm: 522da8494a5e680a4ce42efd>
  28. self = <noc.lib.nosql.PlainReferenceField object at 0x3d53a50>
  29. value = ObjectId('522888964a5e68440f61a449')
  30. v = None
  31. ------------------------------------------------------------------------
  32. File: fm/apps/alarm/views.py (Line: 122)
  33. Function: instance_to_dict
  34. 115 "status": o.status,
  35. 116 "managed_object": o.managed_object.id,
  36. 117 "managed_object__label": o.managed_object.name,
  37. 118 "administrative_domain": o.managed_object.administrative_domain_id,
  38. 119 "administrative_domain__label": o.managed_object.administrative_domain.name,
  39. 120 "severity": o.severity,
  40. 121 "severity__label": s.name,
  41. 122 ==> "alarm_class": str(o.alarm_class.id),
  42. 123 "alarm_class__label": o.alarm_class.name,
  43. 124 "timestamp": self.to_json(o.timestamp),
  44. 125 "subject": o.get_translated_subject(lang),
  45. 126 "events": n_events,
  46. 127 "duration": o.duration,
  47. 128 "row_class": s.style.css_class_name
  48. Variables:
  49. lang = 'en'
  50. fields = None
  51. self = <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>
  52. o = <ActiveAlarm: 522da8494a5e680a4ce42efd>
  53. s = <AlarmSeverity: WARNING>
  54. n_events = 931
  55. ------------------------------------------------------------------------
  56. File: lib/app/extapplication.py (Line: 166)
  57. Function: list_data
  58. 159 data = data[int(start):int(start) + int(limit)]
  59. 160 ld = len(data)
  60. 161 if self.row_limit and ld > self.row_limit:
  61. 162 # Request too large
  62. 163 return self.response(
  63. 164 "System limit is %d records (%d requested)" % (self.row_limit, ld),
  64. 165 status=self.TOO_LARGE)
  65. 166 ==> out = [formatter(o, fields=only) for o in data]
  66. 167 # Set favorites
  67. 168 if not only and formatter == self.instance_to_dict:
  68. 169 if fav_items is None:
  69. 170 fav_items = self.get_favorite_items(request.user)
  70. 171 for r in out:
  71. 172 r[self.fav_status] = r[self.pk] in fav_items
  72. Variables:
  73. ld = 45
  74. fs = None
  75. ordering = []
  76. self = <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>
  77. request =
  78. <WSGIRequest
  79. path:/fm/alarm/,
  80. GET:<QueryDict: {u'status': [u'A'], u'__limit': [u'45'], u'__start': [u'0'], u'__page': [u'1'], u'_dc': [u'1424165090343'], u'__format': [u'ext'], u'collapse': [u'1']}>,
  81. POST:<QueryDict: {}>,
  82. COOKIES:{'csrftoken': 'PqK2hWmFQGuotOphzHFhth5nZ14OeWRI',
  83. 'sessionid': '630bd6c3ef2419c0ad014b4d8fa87be8'},
  84. META:{'HTTP_ACCEPT': '*/*',
  85. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
  86. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  87. 'HTTP_CONNECTION': 'close',
  88. 'HTTP_COOKIE': 'csrftoken=PqK2hWmFQGuotOphzHFhth5nZ14OeWRI; sessionid=630bd6c3ef2419c0ad014b4d8fa87be8',
  89. 'HTTP_HOST': '127.0.0.1:8000',
  90. 'HTTP_REFERER': 'http://srv-noc.net.billing.ru/main/desktop/',
  91. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36',
  92. 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
  93. 'PATH_INFO': u'/fm/alarm/',
  94. 'QUERY_STRING': '_dc=1424165090343&status=A&collapse=1&__format=ext&__page=1&__start=0&__limit=45',
  95. 'REMOTE_ADDR': '127.0.0.1',
  96. 'REQUEST_METHOD': 'GET',
  97. 'SCRIPT_NAME': u'',
  98. 'SERVER_NAME': '127.0.0.1',
  99. 'SERVER_PORT': '8000',
  100. 'SERVER_PROTOCOL': 'HTTP/1.0',
  101. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x1e280c0>,
  102. 'wsgi.input': <_io.BytesIO object at 0xa5818f0>,
  103. 'wsgi.multiprocess': True,
  104. 'wsgi.multithread': False,
  105. 'wsgi.run_once': False,
  106. 'wsgi.url_scheme': 'http',
  107. 'wsgi.version': (1, 0)}>
  108. o = <ActiveAlarm: 522da8494a5e680a4ce42efd>
  109. q = {'root__exists': False}
  110. start = u'0'
  111. only = None
  112. limit = u'45'
  113. formatter =
  114. <bound method AlarmApplication.instance_to_dict of <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>>
  115. query = None
  116. total = 629
  117. data = .. queryset mid-iteration ..
  118. fav_items = None
  119. ------------------------------------------------------------------------
  120. File: fm/apps/alarm/views.py (Line: 146)
  121. Function: api_list
  122. 139 if status not in self.model_map:
  123. 140 raise Exception("Invalid status")
  124. 141 model = self.model_map[status]
  125. 142 return model.objects.all()
  126. 143
  127. 144 @view(url=r"^$", access="launch", method=["GET"], api=True)
  128. 145 def api_list(self, request):
  129. 146 ==> return self.list_data(request, self.instance_to_dict)
  130. 147
  131. 148 @view(url=r"^(?P<id>[a-z0-9]{24})/$", method=["GET"], api=True,
  132. 149 access="launch")
  133. 150 def api_alarm(self, request, id):
  134. 151 alarm = get_alarm(id)
  135. 152 if not alarm:
  136. Variables:
  137. self = <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>
  138. request =
  139. <WSGIRequest
  140. path:/fm/alarm/,
  141. GET:<QueryDict: {u'status': [u'A'], u'__limit': [u'45'], u'__start': [u'0'], u'__page': [u'1'], u'_dc': [u'1424165090343'], u'__format': [u'ext'], u'collapse': [u'1']}>,
  142. POST:<QueryDict: {}>,
  143. COOKIES:{'csrftoken': 'PqK2hWmFQGuotOphzHFhth5nZ14OeWRI',
  144. 'sessionid': '630bd6c3ef2419c0ad014b4d8fa87be8'},
  145. META:{'HTTP_ACCEPT': '*/*',
  146. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
  147. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  148. 'HTTP_CONNECTION': 'close',
  149. 'HTTP_COOKIE': 'csrftoken=PqK2hWmFQGuotOphzHFhth5nZ14OeWRI; sessionid=630bd6c3ef2419c0ad014b4d8fa87be8',
  150. 'HTTP_HOST': '127.0.0.1:8000',
  151. 'HTTP_REFERER': 'http://srv-noc.net.billing.ru/main/desktop/',
  152. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36',
  153. 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
  154. 'PATH_INFO': u'/fm/alarm/',
  155. 'QUERY_STRING': '_dc=1424165090343&status=A&collapse=1&__format=ext&__page=1&__start=0&__limit=45',
  156. 'REMOTE_ADDR': '127.0.0.1',
  157. 'REQUEST_METHOD': 'GET',
  158. 'SCRIPT_NAME': u'',
  159. 'SERVER_NAME': '127.0.0.1',
  160. 'SERVER_PORT': '8000',
  161. 'SERVER_PROTOCOL': 'HTTP/1.0',
  162. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x1e280c0>,
  163. 'wsgi.input': <_io.BytesIO object at 0xa5818f0>,
  164. 'wsgi.multiprocess': True,
  165. 'wsgi.multithread': False,
  166. 'wsgi.run_once': False,
  167. 'wsgi.url_scheme': 'http',
  168. 'wsgi.version': (1, 0)}>
  169. ------------------------------------------------------------------------
  170. File: lib/app/site.py (Line: 248)
  171. Function: inner
  172. 241 a = dict((k, v[0] if len(v) == 1 else v)
  173. 242 for k, v in request.GET.lists())
  174. 243 app_logger.debug("API %s %s %s",
  175. 244 request.method, request.path, a)
  176. 245 # Call handler
  177. 246 v.__dict__["hits_metric"] += 1
  178. 247 with v.__dict__["time_metric"].timer():
  179. 248 ==> r = v(request, *args, **kwargs)
  180. 249 # Dump SQL statements
  181. 250 if self.log_sql_statements:
  182. 251 from django.db import connections
  183. 252 tsc = 0
  184. 253 sc = defaultdict(int)
  185. 254 for conn in connections.all():
  186. Variables:
  187. args = ()
  188. view_map =
  189. {'GET': <bound method AlarmApplication.api_list of <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>>}
  190. Form = <class 'django.forms.forms.Form'>
  191. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  192. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  193. self = <noc.lib.app.site.Site object at 0x2490bd0>
  194. v =
  195. <bound method AlarmApplication.api_list of <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>>
  196. request =
  197. <WSGIRequest
  198. path:/fm/alarm/,
  199. GET:<QueryDict: {u'status': [u'A'], u'__limit': [u'45'], u'__start': [u'0'], u'__page': [u'1'], u'_dc': [u'1424165090343'], u'__format': [u'ext'], u'collapse': [u'1']}>,
  200. POST:<QueryDict: {}>,
  201. COOKIES:{'csrftoken': 'PqK2hWmFQGuotOphzHFhth5nZ14OeWRI',
  202. 'sessionid': '630bd6c3ef2419c0ad014b4d8fa87be8'},
  203. META:{'HTTP_ACCEPT': '*/*',
  204. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
  205. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  206. 'HTTP_CONNECTION': 'close',
  207. 'HTTP_COOKIE': 'csrftoken=PqK2hWmFQGuotOphzHFhth5nZ14OeWRI; sessionid=630bd6c3ef2419c0ad014b4d8fa87be8',
  208. 'HTTP_HOST': '127.0.0.1:8000',
  209. 'HTTP_REFERER': 'http://srv-noc.net.billing.ru/main/desktop/',
  210. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36',
  211. 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
  212. 'PATH_INFO': u'/fm/alarm/',
  213. 'QUERY_STRING': '_dc=1424165090343&status=A&collapse=1&__format=ext&__page=1&__start=0&__limit=45',
  214. 'REMOTE_ADDR': '127.0.0.1',
  215. 'REQUEST_METHOD': 'GET',
  216. 'SCRIPT_NAME': u'',
  217. 'SERVER_NAME': '127.0.0.1',
  218. 'SERVER_PORT': '8000',
  219. 'SERVER_PROTOCOL': 'HTTP/1.0',
  220. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x1e280c0>,
  221. 'wsgi.input': <_io.BytesIO object at 0xa5818f0>,
  222. 'wsgi.multiprocess': True,
  223. 'wsgi.multithread': False,
  224. 'wsgi.run_once': False,
  225. 'wsgi.url_scheme': 'http',
  226. 'wsgi.version': (1, 0)}>
  227. app_logger = <logging.Logger object at 0x4d651d0>
  228. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  229. to_log_api_call = False
  230. kwargs = {}
  231. nq = <function nq at 0x59deb90>
  232. app = <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>
  233. ------------------------------------------------------------------------
  234. END OF TRACEBACK
  235. 2015-02-17 12:24:50,401 [tornado.access] 500 GET /fm/alarm/?_dc=1424165090343&status=A&collapse=1&__format=ext&__page=1&__start=0&__limit=45 (127.0.0.1) 84.34ms
  236. 2015-02-17 12:24:50,980 [tornado.access] 200 GET /fm/event/?_dc=1424165090697&status=A&__format=ext&__page=2&__start=45&__limit=45&__sort=%5B%7B%22property%22%3A%22timestamp%22%2C%22direction%22%3A%22DESC%22%7D%5D (127.0.0.1) 319.11ms
  237. 2015-02-17 12:25:20,396 [fm.alarm] UNHANDLED EXCEPTION (2015-02-17 12:25:20.384482)
  238. BRANCH: develop TIP: 0997ca557065
  239. PROCESS: ./scripts/noc-web.py
  240. ERROR FINGERPRINT: 685ef0b2-eb54-5794-b643-8aa2426f31f2
  241. WORKING DIRECTORY: /opt/noc
  242. EXCEPTION: <class 'mongoengine.errors.ValidationError'> Unable to dereference <class 'noc.fm.models.alarmclass.AlarmClass'>:522888964a5e68440f61a449
  243. START OF TRACEBACK
  244. ------------------------------------------------------------------------
  245. File: lib/nosql.py (Line: 144)
  246. Function: __get__
  247. 137 v = self.document_type.objects(id=value).first()
  248. 138 if v and self.ttl:
  249. 139 self._DEREF_CACHE[str(value)] = (t + self.ttl, v)
  250. 140 if v is not None:
  251. 141 instance._data[self.name] = v
  252. 142 else:
  253. 143 raise ValidationError("Unable to dereference %s:%s" % (
  254. 144 ==> self.document_type, value))
  255. 145 return super(PlainReferenceField, self).__get__(instance, owner)
  256. 146
  257. 147 def to_mongo(self, document):
  258. 148 if isinstance(document, Document):
  259. 149 # We need the id from the saved object to create the DBRef
  260. 150 id_ = document.id
  261. Variables:
  262. owner = <class 'noc.fm.models.activealarm.ActiveAlarm'>
  263. instance = <ActiveAlarm: 522da8494a5e680a4ce42efd>
  264. self = <noc.lib.nosql.PlainReferenceField object at 0x3d53a50>
  265. value = ObjectId('522888964a5e68440f61a449')
  266. v = None
  267. ------------------------------------------------------------------------
  268. File: fm/apps/alarm/views.py (Line: 122)
  269. Function: instance_to_dict
  270. 115 "status": o.status,
  271. 116 "managed_object": o.managed_object.id,
  272. 117 "managed_object__label": o.managed_object.name,
  273. 118 "administrative_domain": o.managed_object.administrative_domain_id,
  274. 119 "administrative_domain__label": o.managed_object.administrative_domain.name,
  275. 120 "severity": o.severity,
  276. 121 "severity__label": s.name,
  277. 122 ==> "alarm_class": str(o.alarm_class.id),
  278. 123 "alarm_class__label": o.alarm_class.name,
  279. 124 "timestamp": self.to_json(o.timestamp),
  280. 125 "subject": o.get_translated_subject(lang),
  281. 126 "events": n_events,
  282. 127 "duration": o.duration,
  283. 128 "row_class": s.style.css_class_name
  284. Variables:
  285. lang = 'en'
  286. fields = None
  287. self = <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>
  288. o = <ActiveAlarm: 522da8494a5e680a4ce42efd>
  289. s = <AlarmSeverity: WARNING>
  290. n_events = 931
  291. ------------------------------------------------------------------------
  292. File: lib/app/extapplication.py (Line: 166)
  293. Function: list_data
  294. 159 data = data[int(start):int(start) + int(limit)]
  295. 160 ld = len(data)
  296. 161 if self.row_limit and ld > self.row_limit:
  297. 162 # Request too large
  298. 163 return self.response(
  299. 164 "System limit is %d records (%d requested)" % (self.row_limit, ld),
  300. 165 status=self.TOO_LARGE)
  301. 166 ==> out = [formatter(o, fields=only) for o in data]
  302. 167 # Set favorites
  303. 168 if not only and formatter == self.instance_to_dict:
  304. 169 if fav_items is None:
  305. 170 fav_items = self.get_favorite_items(request.user)
  306. 171 for r in out:
  307. 172 r[self.fav_status] = r[self.pk] in fav_items
  308. Variables:
  309. ld = 45
  310. fs = None
  311. ordering = []
  312. self = <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>
  313. request =
  314. <WSGIRequest
  315. path:/fm/alarm/,
  316. GET:<QueryDict: {u'status': [u'A'], u'__limit': [u'45'], u'__start': [u'0'], u'__page': [u'1'], u'_dc': [u'1424165120356'], u'__format': [u'ext'], u'collapse': [u'1']}>,
  317. POST:<QueryDict: {}>,
  318. COOKIES:{'csrftoken': 'PqK2hWmFQGuotOphzHFhth5nZ14OeWRI',
  319. 'sessionid': '630bd6c3ef2419c0ad014b4d8fa87be8'},
  320. META:{'HTTP_ACCEPT': '*/*',
  321. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
  322. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  323. 'HTTP_CONNECTION': 'close',
  324. 'HTTP_COOKIE': 'csrftoken=PqK2hWmFQGuotOphzHFhth5nZ14OeWRI; sessionid=630bd6c3ef2419c0ad014b4d8fa87be8',
  325. 'HTTP_HOST': '127.0.0.1:8000',
  326. 'HTTP_REFERER': 'http://srv-noc.net.billing.ru/main/desktop/',
  327. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36',
  328. 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
  329. 'PATH_INFO': u'/fm/alarm/',
  330. 'QUERY_STRING': '_dc=1424165120356&status=A&collapse=1&__format=ext&__page=1&__start=0&__limit=45',
  331. 'REMOTE_ADDR': '127.0.0.1',
  332. 'REQUEST_METHOD': 'GET',
  333. 'SCRIPT_NAME': u'',
  334. 'SERVER_NAME': '127.0.0.1',
  335. 'SERVER_PORT': '8000',
  336. 'SERVER_PROTOCOL': 'HTTP/1.0',
  337. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x1e280c0>,
  338. 'wsgi.input': <_io.BytesIO object at 0x8186b30>,
  339. 'wsgi.multiprocess': True,
  340. 'wsgi.multithread': False,
  341. 'wsgi.run_once': False,
  342. 'wsgi.url_scheme': 'http',
  343. 'wsgi.version': (1, 0)}>
  344. o = <ActiveAlarm: 522da8494a5e680a4ce42efd>
  345. q = {'root__exists': False}
  346. start = u'0'
  347. only = None
  348. limit = u'45'
  349. formatter =
  350. <bound method AlarmApplication.instance_to_dict of <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>>
  351. query = None
  352. total = 629
  353. data = .. queryset mid-iteration ..
  354. fav_items = None
  355. ------------------------------------------------------------------------
  356. File: fm/apps/alarm/views.py (Line: 146)
  357. Function: api_list
  358. 139 if status not in self.model_map:
  359. 140 raise Exception("Invalid status")
  360. 141 model = self.model_map[status]
  361. 142 return model.objects.all()
  362. 143
  363. 144 @view(url=r"^$", access="launch", method=["GET"], api=True)
  364. 145 def api_list(self, request):
  365. 146 ==> return self.list_data(request, self.instance_to_dict)
  366. 147
  367. 148 @view(url=r"^(?P<id>[a-z0-9]{24})/$", method=["GET"], api=True,
  368. 149 access="launch")
  369. 150 def api_alarm(self, request, id):
  370. 151 alarm = get_alarm(id)
  371. 152 if not alarm:
  372. Variables:
  373. self = <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>
  374. request =
  375. <WSGIRequest
  376. path:/fm/alarm/,
  377. GET:<QueryDict: {u'status': [u'A'], u'__limit': [u'45'], u'__start': [u'0'], u'__page': [u'1'], u'_dc': [u'1424165120356'], u'__format': [u'ext'], u'collapse': [u'1']}>,
  378. POST:<QueryDict: {}>,
  379. COOKIES:{'csrftoken': 'PqK2hWmFQGuotOphzHFhth5nZ14OeWRI',
  380. 'sessionid': '630bd6c3ef2419c0ad014b4d8fa87be8'},
  381. META:{'HTTP_ACCEPT': '*/*',
  382. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
  383. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  384. 'HTTP_CONNECTION': 'close',
  385. 'HTTP_COOKIE': 'csrftoken=PqK2hWmFQGuotOphzHFhth5nZ14OeWRI; sessionid=630bd6c3ef2419c0ad014b4d8fa87be8',
  386. 'HTTP_HOST': '127.0.0.1:8000',
  387. 'HTTP_REFERER': 'http://srv-noc.net.billing.ru/main/desktop/',
  388. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36',
  389. 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
  390. 'PATH_INFO': u'/fm/alarm/',
  391. 'QUERY_STRING': '_dc=1424165120356&status=A&collapse=1&__format=ext&__page=1&__start=0&__limit=45',
  392. 'REMOTE_ADDR': '127.0.0.1',
  393. 'REQUEST_METHOD': 'GET',
  394. 'SCRIPT_NAME': u'',
  395. 'SERVER_NAME': '127.0.0.1',
  396. 'SERVER_PORT': '8000',
  397. 'SERVER_PROTOCOL': 'HTTP/1.0',
  398. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x1e280c0>,
  399. 'wsgi.input': <_io.BytesIO object at 0x8186b30>,
  400. 'wsgi.multiprocess': True,
  401. 'wsgi.multithread': False,
  402. 'wsgi.run_once': False,
  403. 'wsgi.url_scheme': 'http',
  404. 'wsgi.version': (1, 0)}>
  405. ------------------------------------------------------------------------
  406. File: lib/app/site.py (Line: 248)
  407. Function: inner
  408. 241 a = dict((k, v[0] if len(v) == 1 else v)
  409. 242 for k, v in request.GET.lists())
  410. 243 app_logger.debug("API %s %s %s",
  411. 244 request.method, request.path, a)
  412. 245 # Call handler
  413. 246 v.__dict__["hits_metric"] += 1
  414. 247 with v.__dict__["time_metric"].timer():
  415. 248 ==> r = v(request, *args, **kwargs)
  416. 249 # Dump SQL statements
  417. 250 if self.log_sql_statements:
  418. 251 from django.db import connections
  419. 252 tsc = 0
  420. 253 sc = defaultdict(int)
  421. 254 for conn in connections.all():
  422. Variables:
  423. args = ()
  424. view_map =
  425. {'GET': <bound method AlarmApplication.api_list of <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>>}
  426. Form = <class 'django.forms.forms.Form'>
  427. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  428. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  429. self = <noc.lib.app.site.Site object at 0x2490bd0>
  430. v =
  431. <bound method AlarmApplication.api_list of <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>>
  432. request =
  433. <WSGIRequest
  434. path:/fm/alarm/,
  435. GET:<QueryDict: {u'status': [u'A'], u'__limit': [u'45'], u'__start': [u'0'], u'__page': [u'1'], u'_dc': [u'1424165120356'], u'__format': [u'ext'], u'collapse': [u'1']}>,
  436. POST:<QueryDict: {}>,
  437. COOKIES:{'csrftoken': 'PqK2hWmFQGuotOphzHFhth5nZ14OeWRI',
  438. 'sessionid': '630bd6c3ef2419c0ad014b4d8fa87be8'},
  439. META:{'HTTP_ACCEPT': '*/*',
  440. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
  441. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  442. 'HTTP_CONNECTION': 'close',
  443. 'HTTP_COOKIE': 'csrftoken=PqK2hWmFQGuotOphzHFhth5nZ14OeWRI; sessionid=630bd6c3ef2419c0ad014b4d8fa87be8',
  444. 'HTTP_HOST': '127.0.0.1:8000',
  445. 'HTTP_REFERER': 'http://srv-noc.net.billing.ru/main/desktop/',
  446. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36',
  447. 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
  448. 'PATH_INFO': u'/fm/alarm/',
  449. 'QUERY_STRING': '_dc=1424165120356&status=A&collapse=1&__format=ext&__page=1&__start=0&__limit=45',
  450. 'REMOTE_ADDR': '127.0.0.1',
  451. 'REMOTE_ADDR': '127.0.0.1',
  452. 'REQUEST_METHOD': 'GET',
  453. 'SCRIPT_NAME': u'',
  454. 'SERVER_NAME': '127.0.0.1',
  455. 'SERVER_PORT': '8000',
  456. 'SERVER_PROTOCOL': 'HTTP/1.0',
  457. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x1e280c0>,
  458. 'wsgi.input': <_io.BytesIO object at 0x8186b30>,
  459. 'wsgi.multiprocess': True,
  460. 'wsgi.multithread': False,
  461. 'wsgi.run_once': False,
  462. 'wsgi.url_scheme': 'http',
  463. 'wsgi.version': (1, 0)}>
  464. app_logger = <logging.Logger object at 0x4d651d0>
  465. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  466. to_log_api_call = False
  467. kwargs = {}
  468. nq = <function nq at 0x823eb18>
  469. app = <noc.fm.apps.alarm.views.AlarmApplication object at 0x4d650d0>
  470. ------------------------------------------------------------------------
  471. END OF TRACEBACK
  472. 2015-02-17 12:25:20,400 [tornado.access] 500 GET /fm/alarm/?_dc=1424165120356&status=A&collapse=1&__format=ext&__page=1&__start=0&__limit=45 (127.0.0.1) 77.73ms
  473. 2015-02-17 12:25:21,018 [tornado.access] 200 GET /fm/event/?_dc=1424165120690&status=A&__format=ext&__page=3&__start=90&__limit=45&__sort=%5B%7B%22property%22%3A%22timestamp%22%2C%22direction%22%3A%22DESC%22%7D%5D (127.0.0.1) 363.21ms
  474. 2015-02-17 12:25:50,642 [tornado.access] 200 GET /fm/event/?_dc=1424165150361&status=A&__format=ext&__page=1&__start=0&__limit=45&__sort=%5B%7B%22property%22%3A%22timestamp%22%2C%22direction%22%3A%22DESC%22%7D%5D (127.0.0.1) 313.35ms
  475. 2015-02-17 12:25:50,990 [tornado.access] 200 GET /fm/event/?_dc=1424165150694&status=A&__format=ext&__page=2&__start=45&__limit=45&__sort=%5B%7B%22property%22%3A%22timestamp%22%2C%22direction%22%3A%22DESC%22%7D%5D (127.0.0.1) 336.11ms
  476. 2015-02-17 12:26:10,516 [tornado.access] 200 GET /inv/interfaceprofile/?_dc=1424165170512&__format=ext&__page=1&__start=0&__limit=45 (127.0.0.1) 43.65ms
  477. 2015-02-17 12:26:21,109 [tornado.access] 202 PUT /inv/interfaceprofile/537354ff4a5e687ab352f4f0/ (127.0.0.1) 5039.02ms
  478. 2015-02-17 12:26:57,823 [tornado.access] 200 GET /main/pyrule/js/Model.js?_dc=1424165217854 (127.0.0.1) 11.15ms
  479. 2015-02-17 12:26:58,252 [tornado.access] 200 POST /main/desktop/state/main.pyrule-grid/ (127.0.0.1) 31.51ms
  480. 2015-02-17 12:28:13,920 [tornado.access] 202 PUT /inv/interfaceprofile/537354ff4a5e687ab352f4f0/ (127.0.0.1) 5059.47ms
  481. 2015-02-17 12:29:21,366 [tornado.access] 200 GET /sa/commandsnippet/js/Application.js?_dc=1424165361404 (127.0.0.1) 8.41ms
  482. 2015-02-17 12:29:21,385 [tornado.access] 200 GET /sa/commandsnippet/js/Model.js?_dc=1424165361423 (127.0.0.1) 11.12ms
  483. 2015-02-17 12:29:21,578 [tornado.access] 200 GET /sa/commandsnippet/?_dc=1424165361514&__format=ext&__page=1&__start=0&__limit=45 (127.0.0.1) 111.71ms
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement