Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2014-09-22 14:34:24,572 [noc.lib.nbsocket.socketfactory] Running socket factory (KEventPoller)
- 2014-09-22 14:34:54,590 [noc.lib.debug] UNHANDLED EXCEPTION (2014-09-22 14:34:54.570643)
- Working directory: /opt/noc
- <class 'socket.timeout'>
- timed out
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /usr/local/lib/python2.7/socket.py (Line: 476)
- Function: readline
- 469 rv = buf.read(size)
- 470 self._rbuf = StringIO()
- 471 self._rbuf.write(buf.read())
- 472 return rv
- 473 self._rbuf = StringIO() # reset _rbuf. we consume it via buf.
- 474 while True:
- 475 try:
- 476 ==> data = self._sock.recv(self._rbufsize)
- 477 except error, e:
- 478 if e.args[0] == EINTR:
- 479 continue
- 480 raise
- 481 if not data:
- 482 break
- Variables:
- buf_len = 0
- buf = <cStringIO.StringO object at 0x807d771f0>
- self = <socket._fileobject object at 0x807d7bd50>
- e = timeout('timed out',)
- size = 65537
- ------------------------------------------------------------------------
- File: /usr/local/lib/python2.7/httplib.py (Line: 365)
- Function: _read_status
- 358 self.chunked = _UNKNOWN # is "chunked" being used?
- 359 self.chunk_left = _UNKNOWN # bytes left to read in current chunk
- 360 self.length = _UNKNOWN # number of bytes left in response
- 361 self.will_close = _UNKNOWN # conn will close at end of response
- 362
- 363 def _read_status(self):
- 364 # Initialize with Simple-Response defaults
- 365 ==> line = self.fp.readline(_MAXLINE + 1)
- 366 if len(line) > _MAXLINE:
- 367 raise LineTooLong("header line")
- 368 if self.debuglevel > 0:
- 369 print "reply:", repr(line)
- 370 if not line:
- 371 # Presumably, the server closed the connection before
- Variables:
- self = <httplib.HTTPResponse instance at 0x807d8c998>
- ------------------------------------------------------------------------
- File: /usr/local/lib/python2.7/httplib.py (Line: 409)
- Function: begin
- 402 def begin(self):
- 403 if self.msg is not None:
- 404 # we've already started reading the response
- 405 return
- 406
- 407 # read until we get a non-100 response
- 408 while True:
- 409 ==> version, status, reason = self._read_status()
- 410 if status != CONTINUE:
- 411 break
- 412 # skip the header from the 100 response
- 413 while True:
- 414 skip = self.fp.readline(_MAXLINE + 1)
- 415 if len(skip) > _MAXLINE:
- Variables:
- self = <httplib.HTTPResponse instance at 0x807d8c998>
- ------------------------------------------------------------------------
- File: /usr/local/lib/python2.7/httplib.py (Line: 1067)
- Function: getresponse
- 1060 args += (self.debuglevel,)
- 1061 if buffering:
- 1062 #only add this keyword if non-default, for compatibility with
- 1063 #other response_classes.
- 1064 kwds["buffering"] = True;
- 1065 response = self.response_class(*args, **kwds)
- 1066
- 1067 ==> response.begin()
- 1068 assert response.will_close != _UNKNOWN
- 1069 self.__state = _CS_IDLE
- 1070
- 1071 if response.will_close:
- 1072 # this effectively passes the connection to the response
- 1073 self.close()
- Variables:
- self = <httplib.HTTPConnection instance at 0x807d8c7e8>
- buffering = True
- args = (<socket._socketobject object at 0x807d628a0>,)
- response = <httplib.HTTPResponse instance at 0x807d8c998>
- kwds = {'strict': 0, 'buffering': True, 'method': 'GET'}
- ------------------------------------------------------------------------
- File: /usr/local/lib/python2.7/urllib2.py (Line: 1187)
- Function: do_open
- 1180 try:
- 1181 h.request(req.get_method(), req.get_selector(), req.data, headers)
- 1182 except socket.error, err: # XXX what error?
- 1183 h.close()
- 1184 raise URLError(err)
- 1185 else:
- 1186 try:
- 1187 ==> r = h.getresponse(buffering=True)
- 1188 except TypeError: # buffering kw not supported
- 1189 r = h.getresponse()
- 1190
- 1191 # Pick apart the HTTPResponse object to get the addinfourl
- 1192 # object initialized properly.
- 1193
- Variables:
- h = <httplib.HTTPConnection instance at 0x807d8c7e8>
- self = <urllib2.HTTPHandler instance at 0x807d8c488>
- req = <urllib2.Request instance at 0x807d8c320>
- headers =
- {'Authorization': 'Basic bm9jOjUwOTIxanR5',
- 'Connection': 'close',
- 'Host': '127.0.0.1:8000',
- 'User-Agent': 'Python-urllib/2.7'}
- host = '127.0.0.1:8000'
- http_class = <class httplib.HTTPConnection at 0x801b7f1f0>
- ------------------------------------------------------------------------
- File: /usr/local/lib/python2.7/urllib2.py (Line: 1214)
- Function: http_open
- 1207 resp.msg = r.reason
- 1208 return resp
- 1209
- 1210
- 1211 class HTTPHandler(AbstractHTTPHandler):
- 1212
- 1213 def http_open(self, req):
- 1214 ==> return self.do_open(httplib.HTTPConnection, req)
- 1215
- 1216 http_request = AbstractHTTPHandler.do_request_
- 1217
- 1218 if hasattr(httplib, 'HTTPS'):
- 1219 class HTTPSHandler(AbstractHTTPHandler):
- 1220
- Variables:
- self = <urllib2.HTTPHandler instance at 0x807d8c488>
- req = <urllib2.Request instance at 0x807d8c320>
- ------------------------------------------------------------------------
- File: /usr/local/lib/python2.7/urllib2.py (Line: 382)
- Function: _call_chain
- 375 # Handlers raise an exception if no one else should try to handle
- 376 # the request, or return None if they can't but another handler
- 377 # could. Otherwise, they return the response.
- 378 handlers = chain.get(kind, ())
- 379 for handler in handlers:
- 380 func = getattr(handler, meth_name)
- 381
- 382 ==> result = func(*args)
- 383 if result is not None:
- 384 return result
- 385
- 386 def open(self, fullurl, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
- 387 # accept a URL or a Request object
- 388 if isinstance(fullurl, basestring):
- Variables:
- kind = 'http'
- chain =
- {'file': [<urllib2.FileHandler instance at 0x807d8c368>],
- 'ftp': [<urllib2.FTPHandler instance at 0x807d8c518>],
- 'http': [<urllib2.HTTPHandler instance at 0x807d8c488>],
- 'https': [<urllib2.HTTPSHandler instance at 0x807d8c5a8>],
- 'unknown': [<urllib2.UnknownHandler instance at 0x807d8c440>]}
- handlers = [<urllib2.HTTPHandler instance at 0x807d8c488>]
- self = <urllib2.OpenerDirector instance at 0x807d8c3f8>
- args = (<urllib2.Request instance at 0x807d8c320>,)
- meth_name = 'http_open'
- handler = <urllib2.HTTPHandler instance at 0x807d8c488>
- func =
- <bound method HTTPHandler.http_open of <urllib2.HTTPHandler instance at 0x807d8c488>>
- ------------------------------------------------------------------------
- File: /usr/local/lib/python2.7/urllib2.py (Line: 422)
- Function: _open
- 415 result = self._call_chain(self.handle_open, 'default',
- 416 'default_open', req)
- 417 if result:
- 418 return result
- 419
- 420 protocol = req.get_type()
- 421 result = self._call_chain(self.handle_open, protocol, protocol +
- 422 ==> '_open', req)
- 423 if result:
- 424 return result
- 425
- 426 return self._call_chain(self.handle_open, 'unknown',
- 427 'unknown_open', req)
- 428
- Variables:
- data = None
- self = <urllib2.OpenerDirector instance at 0x807d8c3f8>
- req = <urllib2.Request instance at 0x807d8c320>
- protocol = 'http'
- result = None
- ------------------------------------------------------------------------
- File: /usr/local/lib/python2.7/urllib2.py (Line: 404)
- Function: open
- 397
- 398 # pre-process request
- 399 meth_name = protocol+"_request"
- 400 for processor in self.process_request.get(protocol, []):
- 401 meth = getattr(processor, meth_name)
- 402 req = meth(req)
- 403
- 404 ==> response = self._open(req, data)
- 405
- 406 # post-process response
- 407 meth_name = protocol+"_response"
- 408 for processor in self.process_response.get(protocol, []):
- 409 meth = getattr(processor, meth_name)
- 410 response = meth(req, response)
- Variables:
- protocol = 'http'
- self = <urllib2.OpenerDirector instance at 0x807d8c3f8>
- req = <urllib2.Request instance at 0x807d8c320>
- meth_name = 'http_request'
- fullurl = <urllib2.Request instance at 0x807d8c320>
- timeout = 30
- meth =
- <bound method HTTPHandler.do_request_ of <urllib2.HTTPHandler instance at 0x807d8c488>>
- data = None
- processor = <urllib2.HTTPHandler instance at 0x807d8c488>
- ------------------------------------------------------------------------
- File: /usr/local/lib/python2.7/urllib2.py (Line: 127)
- Function: urlopen
- 120 __version__ = sys.version[:3]
- 121
- 122 _opener = None
- 123 def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
- 124 global _opener
- 125 if _opener is None:
- 126 _opener = build_opener()
- 127 ==> return _opener.open(url, data, timeout)
- 128
- 129 def install_opener(opener):
- 130 global _opener
- 131 _opener = opener
- 132
- 133 # do these error classes make sense?
- Variables:
- url = <urllib2.Request instance at 0x807d8c320>
- data = None
- timeout = 30
- ------------------------------------------------------------------------
- File: /opt/noc/lib/daemon/configuration.py (Line: 80)
- Function: get_config
- 73 url = self.url
- 74 if self.last:
- 75 url += "?last=%s" % self.last
- 76 req = urllib2.Request(url)
- 77 if self.auth:
- 78 req.add_header("Authorization", self.auth)
- 79 try:
- 80 ==> resp = urllib2.urlopen(req, timeout=self.timeout)
- 81 except urllib2.URLError, why:
- 82 logger.error("Cannot get config from %s: %s" % (
- 83 self.url, why))
- 84 return None
- 85 try:
- 86 data = json_decode(resp.read())
- Variables:
- url = 'http://127.0.0.1:8000/pm/probe/default/0/config/'
- self = <ConfigurationThread(default, started daemon 34465945600)>
- req = <urllib2.Request instance at 0x807d8c320>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/daemon/configuration.py (Line: 141)
- Function: run
- 134
- 135 def run(self):
- 136 logger.info("Starting configuration thread")
- 137 while not self.to_shutdown:
- 138 try:
- 139 t0 = time.time()
- 140 interval = self.interval
- 141 ==> config = self.get_config()
- 142 if config:
- 143 self.apply_config(config)
- 144 elif config is None:
- 145 interval = self.failed_interval
- 146 t = time.time()
- 147 nt = t0 + interval
- Variables:
- self = <ConfigurationThread(default, started daemon 34465945600)>
- interval = 300
- t0 = 1411382064.557319
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement