Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2018-05-17 20:43:14.794963)
- PROCESS: ./services/web/service.py
- VERSION: 15.05.1+microservices.9397.6f638eac
- BRANCH: microservices CHANGESET: 6f638eac
- ERROR FINGERPRINT: 89bd3758-2fe7-588c-8f17-8db646ba2c93
- WORKING DIRECTORY: /opt/noc
- EXCEPTION: <type 'exceptions.AttributeError'> 'NoneType' object has no attribute 'rfind'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: ../../usr/lib/python2.7/subprocess.py (Line: 1343)
- Function: _execute_child
- 1336 if data != "":
- 1337 try:
- 1338 _eintr_retry_call(os.waitpid, self.pid, 0)
- 1339 except OSError as e:
- 1340 if e.errno != errno.ECHILD:
- 1341 raise
- 1342 child_exception = pickle.loads(data)
- 1343 ==> raise child_exception
- 1344
- 1345
- 1346 def _handle_exitstatus(self, sts, _WIFSIGNALED=os.WIFSIGNALED,
- 1347 _WTERMSIG=os.WTERMSIG, _WIFEXITED=os.WIFEXITED,
- 1348 _WEXITSTATUS=os.WEXITSTATUS):
- 1349 # This method is called (indirectly) by __del__, so it cannot
- Variables:
- errread = 13
- c2pread = None
- gc_was_enabled = True
- errwrite = 15
- shell = False
- errpipe_write = 17
- to_close = set([13])
- close_fds = False
- self = <subprocess.Popen object at 0x7f109f691710>
- env = {'SMIPATH': 'var/mibs/local:var/mibs/dist'}
- cwd = None
- child_exception = AttributeError("'NoneType' object has no attribute 'rfind'",)
- args = [None, '-m', '/tmp/tmpWMs1dq']
- executable = None
- c2pwrite = None
- data =
- '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.'
- creationflags = 0
- errpipe_read = 16
- preexec_fn = None
- p2cread = None
- startupinfo = None
- p2cwrite = None
- _close_in_parent = <function _close_in_parent at 0x7f10baa42500>
- pickle_bits =
- ['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.']
- universal_newlines = False
- ------------------------------------------------------------------------
- File: ../../usr/lib/python2.7/subprocess.py (Line: 711)
- Function: __init__
- 704
- 705 try:
- 706 self._execute_child(args, executable, preexec_fn, close_fds,
- 707 cwd, env, universal_newlines,
- 708 startupinfo, creationflags, shell, to_close,
- 709 p2cread, p2cwrite,
- 710 c2pread, c2pwrite,
- 711 ==> errread, errwrite)
- 712 except Exception:
- 713 # Preserve original exception in case os.close raises.
- 714 exc_type, exc_value, exc_trace = sys.exc_info()
- 715
- 716 for fd in to_close:
- 717 try:
- Variables:
- errread = 13
- stdout = None
- c2pread = None
- errwrite = 15
- bufsize = 0
- exc_type = <type 'exceptions.AttributeError'>
- to_close = set([13])
- close_fds = False
- self = <subprocess.Popen object at 0x7f109f691710>
- env = {'SMIPATH': 'var/mibs/local:var/mibs/dist'}
- cwd = None
- shell = False
- args = [None, '-m', '/tmp/tmpWMs1dq']
- executable = None
- fd = 13
- c2pwrite = None
- creationflags = 0
- preexec_fn = None
- exc_trace = <traceback object at 0x7f10bb09f2d8>
- p2cread = None
- startupinfo = None
- stdin = None
- p2cwrite = None
- exc_value = AttributeError("'NoneType' object has no attribute 'rfind'",)
- stderr = -1
- universal_newlines = False
- ------------------------------------------------------------------------
- File: fm/models/mib.py (Line: 123)
- Function: load
- 116 """
- 117 if not os.path.exists(path):
- 118 raise ValueError("File not found: %s" % path)
- 119 # Pass MIB through smilint to detect missed modules
- 120 f = subprocess.Popen(
- 121 [config.path.smilint, "-m", path],
- 122 stderr=subprocess.PIPE,
- 123 ==> env={"SMIPATH": ":".join(cls.MIB_PATH)}).stderr
- 124 for l in f:
- 125 match = rx_module_not_found.search(l.strip())
- 126 if match:
- 127 raise MIBRequiredException("Uploaded MIB",
- 128 match.group(1))
- 129 # Convert MIB to python module and load
- Variables:
- path = '/tmp/tmpWMs1dq'
- force = False
- cls = <class 'noc.fm.models.mib.MIB'>
- ------------------------------------------------------------------------
- File: services/web/apps/fm/mib/views.py (Line: 118)
- Function: api_upload
- 111 left[f] = request.FILES[f]
- 112 errors = {}
- 113 while len(left):
- 114 n = len(left)
- 115 for name in left.keys():
- 116 with temporary_file(left[name].read()) as path:
- 117 try:
- 118 ==> MIB.load(path)
- 119 del left[name]
- 120 if name in errors:
- 121 del errors[name]
- 122 except MIB.MIBRequiredException, x:
- 123 errors[name] = "%s requires MIBs %s" % (
- 124 x.mib, x.requires_mib)
- Variables:
- errors = {}
- name = u'mib_0'
- f = u'mib_0'
- self =
- <noc.services.web.apps.fm.mib.views.MIBApplication object at 0x7f10a00b2650>
- request =
- <WSGIRequest
- path:/fm/mib/upload/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'mib_1': [u''], u'mib_2': [u''], u'mib_3': [u''], u'mib_4': [u'']}>,
- COOKIES:{'csrftoken': '6eTa1kpdNp8DpWE8GxKV0H4hlbUh65Y3',
- 'noc_user': '2|1:0|10:1526578192|8:noc_user|12:ZC5zZXJlbmtv|9b51cf66c70d09e6135c0f82812a5d4c800df2f4d20ed473da23b509d6a265cb'},
- META:{'CONTENT_LENGTH': '76800',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryUW7Dq2SRPHH5hUfm',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, br',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',
- 'HTTP_CACHE_CONTROL': 'max-age=0',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=6eTa1kpdNp8DpWE8GxKV0H4hlbUh65Y3; noc_user="2|1:0|10:1526578192|8:noc_user|12:ZC5zZXJlbmtv|9b51cf66c70d09e6135c0f82812a5d4c800df2f4d20ed473da23b509d6a265cb"',
- 'HTTP_HOST': 'noc-node1.skymaxsib.ru',
- 'HTTP_ORIGIN': 'https://noc-node1.skymaxsib.ru',
- 'HTTP_REFERER': 'https://noc-node1.skymaxsib.ru/',
- 'HTTP_REMOTE_USER': 'd.serenko',
- 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
- '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)',
- 'HTTP_X_FORWARDED_FOR': '10.125.126.100',
- 'HTTP_X_FORWARDED_PROTO': 'https',
- 'HTTP_X_REAL_IP': '10.125.126.100',
- 'HTTP_X_SCHEME': 'https',
- 'PATH_INFO': u'/fm/mib/upload/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '10.125.126.100',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': 'noc-node1.skymaxsib.ru',
- 'SERVER_PORT': '443',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f10ca1f41e0>,
- 'wsgi.input': <_io.BytesIO object at 0x7f109f58fbf0>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'https',
- 'wsgi.version': (1, 0)}>
- n = 1
- path = '/tmp/tmpWMs1dq'
- left =
- {u'mib_0': <InMemoryUploadedFile: Mikrotik.mib (application/octet-stream)>}
- ------------------------------------------------------------------------
- File: lib/app/site.py (Line: 230)
- Function: inner
- 223 for k, v in request.POST.lists())
- 224 elif request.method == "GET":
- 225 a = dict((k, v[0] if len(v) == 1 else v)
- 226 for k, v in request.GET.lists())
- 227 app_logger.debug("API %s %s %s",
- 228 request.method, request.path, a)
- 229 # Call handler
- 230 ==> r = v(request, *args, **kwargs)
- 231 # Dump SQL statements
- 232 if self.log_sql_statements:
- 233 from django.db import connections
- 234 tsc = 0
- 235 sc = defaultdict(int)
- 236 for conn in connections.all():
- Variables:
- args = ()
- view_map =
- {'POST': <bound method MIBApplication.api_upload of <noc.services.web.apps.fm.mib.views.MIBApplication object at 0x7f10a00b2650>>}
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x7f10bb1bbd10>
- v =
- <bound method MIBApplication.api_upload of <noc.services.web.apps.fm.mib.views.MIBApplication object at 0x7f10a00b2650>>
- request =
- <WSGIRequest
- path:/fm/mib/upload/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'mib_1': [u''], u'mib_2': [u''], u'mib_3': [u''], u'mib_4': [u'']}>,
- COOKIES:{'csrftoken': '6eTa1kpdNp8DpWE8GxKV0H4hlbUh65Y3',
- 'noc_user': '2|1:0|10:1526578192|8:noc_user|12:ZC5zZXJlbmtv|9b51cf66c70d09e6135c0f82812a5d4c800df2f4d20ed473da23b509d6a265cb'},
- META:{'CONTENT_LENGTH': '76800',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryUW7Dq2SRPHH5hUfm',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, br',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',
- 'HTTP_CACHE_CONTROL': 'max-age=0',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=6eTa1kpdNp8DpWE8GxKV0H4hlbUh65Y3; noc_user="2|1:0|10:1526578192|8:noc_user|12:ZC5zZXJlbmtv|9b51cf66c70d09e6135c0f82812a5d4c800df2f4d20ed473da23b509d6a265cb"',
- 'HTTP_HOST': 'noc-node1.skymaxsib.ru',
- 'HTTP_ORIGIN': 'https://noc-node1.skymaxsib.ru',
- 'HTTP_REFERER': 'https://noc-node1.skymaxsib.ru/',
- 'HTTP_REMOTE_USER': 'd.serenko',
- 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
- '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)',
- 'HTTP_X_FORWARDED_FOR': '10.125.126.100',
- 'HTTP_X_FORWARDED_PROTO': 'https',
- 'HTTP_X_REAL_IP': '10.125.126.100',
- 'HTTP_X_SCHEME': 'https',
- 'PATH_INFO': u'/fm/mib/upload/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '10.125.126.100',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': 'noc-node1.skymaxsib.ru',
- 'SERVER_PORT': '443',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f10ca1f41e0>,
- 'wsgi.input': <_io.BytesIO object at 0x7f109f58fbf0>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'https',
- 'wsgi.version': (1, 0)}>
- app_logger = <logging.Logger object at 0x7f10a00b2810>
- InterfaceTypeError = <type 'exceptions.ValueError'>
- to_log_api_call = False
- kwargs = {}
- nq = <function nq at 0x7f109ecc7de8>
- app =
- <noc.services.web.apps.fm.mib.views.MIBApplication object at 0x7f10a00b2650>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement