Advertisement
denserdotru

Untitled

May 17th, 2018
114
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.34 KB | None
  1. UNHANDLED EXCEPTION (2018-05-17 20:43:14.794963)
  2. PROCESS: ./services/web/service.py
  3. VERSION: 15.05.1+microservices.9397.6f638eac
  4. BRANCH: microservices CHANGESET: 6f638eac
  5. ERROR FINGERPRINT: 89bd3758-2fe7-588c-8f17-8db646ba2c93
  6. WORKING DIRECTORY: /opt/noc
  7. EXCEPTION: <type 'exceptions.AttributeError'> 'NoneType' object has no attribute 'rfind'
  8. START OF TRACEBACK
  9. ------------------------------------------------------------------------
  10. File: ../../usr/lib/python2.7/subprocess.py (Line: 1343)
  11. Function: _execute_child
  12. 1336 if data != "":
  13. 1337 try:
  14. 1338 _eintr_retry_call(os.waitpid, self.pid, 0)
  15. 1339 except OSError as e:
  16. 1340 if e.errno != errno.ECHILD:
  17. 1341 raise
  18. 1342 child_exception = pickle.loads(data)
  19. 1343 ==> raise child_exception
  20. 1344
  21. 1345
  22. 1346 def _handle_exitstatus(self, sts, _WIFSIGNALED=os.WIFSIGNALED,
  23. 1347 _WTERMSIG=os.WTERMSIG, _WIFEXITED=os.WIFEXITED,
  24. 1348 _WEXITSTATUS=os.WEXITSTATUS):
  25. 1349 # This method is called (indirectly) by __del__, so it cannot
  26. Variables:
  27. errread = 13
  28. c2pread = None
  29. gc_was_enabled = True
  30. errwrite = 15
  31. shell = False
  32. errpipe_write = 17
  33. to_close = set([13])
  34. close_fds = False
  35. self = <subprocess.Popen object at 0x7f109f691710>
  36. env = {'SMIPATH': 'var/mibs/local:var/mibs/dist'}
  37. cwd = None
  38. child_exception = AttributeError("'NoneType' object has no attribute 'rfind'",)
  39. args = [None, '-m', '/tmp/tmpWMs1dq']
  40. executable = None
  41. c2pwrite = None
  42. data =
  43. 'cexceptions\nAttributeError\np0\n(S"\'NoneType\' object has no attribute \'rfind\'"\np1\ntp2\nRp3\n(dp4\nS\'child_traceback\'\np5\nS\'Traceback (most recent call last):\\n File "/usr/lib/python2.7/subprocess.py", line 1296, in _execute_child\\n os.execvpe(executable, args, env)\\n File "/opt/noc/lib/python2.7/os.py", line 355, in execvpe\\n _execvpe(file, args, env)\\n File "/opt/noc/lib/python2.7/os.py", line 368, in _execvpe\\n head, tail = path.split(file)\\n File "/opt/noc/lib/python2.7/posixpath.py", line 85, in split\\n i = p.rfind(\\\'/\\\') + 1\\nAttributeError: \\\'NoneType\\\' object has no attribute \\\'rfind\\\'\\n\'\np6\nsb.'
  44. creationflags = 0
  45. errpipe_read = 16
  46. preexec_fn = None
  47. p2cread = None
  48. startupinfo = None
  49. p2cwrite = None
  50. _close_in_parent = <function _close_in_parent at 0x7f10baa42500>
  51. pickle_bits =
  52. ['cexceptions\nAttributeError\np0\n(S"\'NoneType\' object has no attribute \'rfind\'"\np1\ntp2\nRp3\n(dp4\nS\'child_traceback\'\np5\nS\'Traceback (most recent call last):\\n File "/usr/lib/python2.7/subprocess.py", line 1296, in _execute_child\\n os.execvpe(executable, args, env)\\n File "/opt/noc/lib/python2.7/os.py", line 355, in execvpe\\n _execvpe(file, args, env)\\n File "/opt/noc/lib/python2.7/os.py", line 368, in _execvpe\\n head, tail = path.split(file)\\n File "/opt/noc/lib/python2.7/posixpath.py", line 85, in split\\n i = p.rfind(\\\'/\\\') + 1\\nAttributeError: \\\'NoneType\\\' object has no attribute \\\'rfind\\\'\\n\'\np6\nsb.']
  53. universal_newlines = False
  54. ------------------------------------------------------------------------
  55. File: ../../usr/lib/python2.7/subprocess.py (Line: 711)
  56. Function: __init__
  57. 704
  58. 705 try:
  59. 706 self._execute_child(args, executable, preexec_fn, close_fds,
  60. 707 cwd, env, universal_newlines,
  61. 708 startupinfo, creationflags, shell, to_close,
  62. 709 p2cread, p2cwrite,
  63. 710 c2pread, c2pwrite,
  64. 711 ==> errread, errwrite)
  65. 712 except Exception:
  66. 713 # Preserve original exception in case os.close raises.
  67. 714 exc_type, exc_value, exc_trace = sys.exc_info()
  68. 715
  69. 716 for fd in to_close:
  70. 717 try:
  71. Variables:
  72. errread = 13
  73. stdout = None
  74. c2pread = None
  75. errwrite = 15
  76. bufsize = 0
  77. exc_type = <type 'exceptions.AttributeError'>
  78. to_close = set([13])
  79. close_fds = False
  80. self = <subprocess.Popen object at 0x7f109f691710>
  81. env = {'SMIPATH': 'var/mibs/local:var/mibs/dist'}
  82. cwd = None
  83. shell = False
  84. args = [None, '-m', '/tmp/tmpWMs1dq']
  85. executable = None
  86. fd = 13
  87. c2pwrite = None
  88. creationflags = 0
  89. preexec_fn = None
  90. exc_trace = <traceback object at 0x7f10bb09f2d8>
  91. p2cread = None
  92. startupinfo = None
  93. stdin = None
  94. p2cwrite = None
  95. exc_value = AttributeError("'NoneType' object has no attribute 'rfind'",)
  96. stderr = -1
  97. universal_newlines = False
  98. ------------------------------------------------------------------------
  99. File: fm/models/mib.py (Line: 123)
  100. Function: load
  101. 116 """
  102. 117 if not os.path.exists(path):
  103. 118 raise ValueError("File not found: %s" % path)
  104. 119 # Pass MIB through smilint to detect missed modules
  105. 120 f = subprocess.Popen(
  106. 121 [config.path.smilint, "-m", path],
  107. 122 stderr=subprocess.PIPE,
  108. 123 ==> env={"SMIPATH": ":".join(cls.MIB_PATH)}).stderr
  109. 124 for l in f:
  110. 125 match = rx_module_not_found.search(l.strip())
  111. 126 if match:
  112. 127 raise MIBRequiredException("Uploaded MIB",
  113. 128 match.group(1))
  114. 129 # Convert MIB to python module and load
  115. Variables:
  116. path = '/tmp/tmpWMs1dq'
  117. force = False
  118. cls = <class 'noc.fm.models.mib.MIB'>
  119. ------------------------------------------------------------------------
  120. File: services/web/apps/fm/mib/views.py (Line: 118)
  121. Function: api_upload
  122. 111 left[f] = request.FILES[f]
  123. 112 errors = {}
  124. 113 while len(left):
  125. 114 n = len(left)
  126. 115 for name in left.keys():
  127. 116 with temporary_file(left[name].read()) as path:
  128. 117 try:
  129. 118 ==> MIB.load(path)
  130. 119 del left[name]
  131. 120 if name in errors:
  132. 121 del errors[name]
  133. 122 except MIB.MIBRequiredException, x:
  134. 123 errors[name] = "%s requires MIBs %s" % (
  135. 124 x.mib, x.requires_mib)
  136. Variables:
  137. errors = {}
  138. name = u'mib_0'
  139. f = u'mib_0'
  140. self =
  141. <noc.services.web.apps.fm.mib.views.MIBApplication object at 0x7f10a00b2650>
  142. request =
  143. <WSGIRequest
  144. path:/fm/mib/upload/,
  145. GET:<QueryDict: {}>,
  146. POST:<QueryDict: {u'mib_1': [u''], u'mib_2': [u''], u'mib_3': [u''], u'mib_4': [u'']}>,
  147. COOKIES:{'csrftoken': '6eTa1kpdNp8DpWE8GxKV0H4hlbUh65Y3',
  148. 'noc_user': '2|1:0|10:1526578192|8:noc_user|12:ZC5zZXJlbmtv|9b51cf66c70d09e6135c0f82812a5d4c800df2f4d20ed473da23b509d6a265cb'},
  149. META:{'CONTENT_LENGTH': '76800',
  150. 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryUW7Dq2SRPHH5hUfm',
  151. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
  152. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, br',
  153. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',
  154. 'HTTP_CACHE_CONTROL': 'max-age=0',
  155. 'HTTP_CONNECTION': 'close',
  156. 'HTTP_COOKIE': 'csrftoken=6eTa1kpdNp8DpWE8GxKV0H4hlbUh65Y3; noc_user="2|1:0|10:1526578192|8:noc_user|12:ZC5zZXJlbmtv|9b51cf66c70d09e6135c0f82812a5d4c800df2f4d20ed473da23b509d6a265cb"',
  157. 'HTTP_HOST': 'noc-node1.skymaxsib.ru',
  158. 'HTTP_ORIGIN': 'https://noc-node1.skymaxsib.ru',
  159. 'HTTP_REFERER': 'https://noc-node1.skymaxsib.ru/',
  160. 'HTTP_REMOTE_USER': 'd.serenko',
  161. 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
  162. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.18 Safari/537.36 OPR/55.0.2955.0 (Edition developer)',
  163. 'HTTP_X_FORWARDED_FOR': '10.125.126.100',
  164. 'HTTP_X_FORWARDED_PROTO': 'https',
  165. 'HTTP_X_REAL_IP': '10.125.126.100',
  166. 'HTTP_X_SCHEME': 'https',
  167. 'PATH_INFO': u'/fm/mib/upload/',
  168. 'QUERY_STRING': '',
  169. 'REMOTE_ADDR': '10.125.126.100',
  170. 'REQUEST_METHOD': 'POST',
  171. 'SCRIPT_NAME': u'',
  172. 'SERVER_NAME': 'noc-node1.skymaxsib.ru',
  173. 'SERVER_PORT': '443',
  174. 'SERVER_PROTOCOL': 'HTTP/1.0',
  175. 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f10ca1f41e0>,
  176. 'wsgi.input': <_io.BytesIO object at 0x7f109f58fbf0>,
  177. 'wsgi.multiprocess': True,
  178. 'wsgi.multithread': False,
  179. 'wsgi.run_once': False,
  180. 'wsgi.url_scheme': 'https',
  181. 'wsgi.version': (1, 0)}>
  182. n = 1
  183. path = '/tmp/tmpWMs1dq'
  184. left =
  185. {u'mib_0': <InMemoryUploadedFile: Mikrotik.mib (application/octet-stream)>}
  186. ------------------------------------------------------------------------
  187. File: lib/app/site.py (Line: 230)
  188. Function: inner
  189. 223 for k, v in request.POST.lists())
  190. 224 elif request.method == "GET":
  191. 225 a = dict((k, v[0] if len(v) == 1 else v)
  192. 226 for k, v in request.GET.lists())
  193. 227 app_logger.debug("API %s %s %s",
  194. 228 request.method, request.path, a)
  195. 229 # Call handler
  196. 230 ==> r = v(request, *args, **kwargs)
  197. 231 # Dump SQL statements
  198. 232 if self.log_sql_statements:
  199. 233 from django.db import connections
  200. 234 tsc = 0
  201. 235 sc = defaultdict(int)
  202. 236 for conn in connections.all():
  203. Variables:
  204. args = ()
  205. view_map =
  206. {'POST': <bound method MIBApplication.api_upload of <noc.services.web.apps.fm.mib.views.MIBApplication object at 0x7f10a00b2650>>}
  207. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  208. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  209. self = <noc.lib.app.site.Site object at 0x7f10bb1bbd10>
  210. v =
  211. <bound method MIBApplication.api_upload of <noc.services.web.apps.fm.mib.views.MIBApplication object at 0x7f10a00b2650>>
  212. request =
  213. <WSGIRequest
  214. path:/fm/mib/upload/,
  215. GET:<QueryDict: {}>,
  216. POST:<QueryDict: {u'mib_1': [u''], u'mib_2': [u''], u'mib_3': [u''], u'mib_4': [u'']}>,
  217. COOKIES:{'csrftoken': '6eTa1kpdNp8DpWE8GxKV0H4hlbUh65Y3',
  218. 'noc_user': '2|1:0|10:1526578192|8:noc_user|12:ZC5zZXJlbmtv|9b51cf66c70d09e6135c0f82812a5d4c800df2f4d20ed473da23b509d6a265cb'},
  219. META:{'CONTENT_LENGTH': '76800',
  220. 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryUW7Dq2SRPHH5hUfm',
  221. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
  222. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, br',
  223. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',
  224. 'HTTP_CACHE_CONTROL': 'max-age=0',
  225. 'HTTP_CONNECTION': 'close',
  226. 'HTTP_COOKIE': 'csrftoken=6eTa1kpdNp8DpWE8GxKV0H4hlbUh65Y3; noc_user="2|1:0|10:1526578192|8:noc_user|12:ZC5zZXJlbmtv|9b51cf66c70d09e6135c0f82812a5d4c800df2f4d20ed473da23b509d6a265cb"',
  227. 'HTTP_HOST': 'noc-node1.skymaxsib.ru',
  228. 'HTTP_ORIGIN': 'https://noc-node1.skymaxsib.ru',
  229. 'HTTP_REFERER': 'https://noc-node1.skymaxsib.ru/',
  230. 'HTTP_REMOTE_USER': 'd.serenko',
  231. 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
  232. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.18 Safari/537.36 OPR/55.0.2955.0 (Edition developer)',
  233. 'HTTP_X_FORWARDED_FOR': '10.125.126.100',
  234. 'HTTP_X_FORWARDED_PROTO': 'https',
  235. 'HTTP_X_REAL_IP': '10.125.126.100',
  236. 'HTTP_X_SCHEME': 'https',
  237. 'PATH_INFO': u'/fm/mib/upload/',
  238. 'QUERY_STRING': '',
  239. 'REMOTE_ADDR': '10.125.126.100',
  240. 'REQUEST_METHOD': 'POST',
  241. 'SCRIPT_NAME': u'',
  242. 'SERVER_NAME': 'noc-node1.skymaxsib.ru',
  243. 'SERVER_PORT': '443',
  244. 'SERVER_PROTOCOL': 'HTTP/1.0',
  245. 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f10ca1f41e0>,
  246. 'wsgi.input': <_io.BytesIO object at 0x7f109f58fbf0>,
  247. 'wsgi.multiprocess': True,
  248. 'wsgi.multithread': False,
  249. 'wsgi.run_once': False,
  250. 'wsgi.url_scheme': 'https',
  251. 'wsgi.version': (1, 0)}>
  252. app_logger = <logging.Logger object at 0x7f10a00b2810>
  253. InterfaceTypeError = <type 'exceptions.ValueError'>
  254. to_log_api_call = False
  255. kwargs = {}
  256. nq = <function nq at 0x7f109ecc7de8>
  257. app =
  258. <noc.services.web.apps.fm.mib.views.MIBApplication object at 0x7f10a00b2650>
  259. ------------------------------------------------------------------------
  260. END OF TRACEBACK
Advertisement
RAW Paste Data Copied
Advertisement