Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.98 KB | None | 0 0
  1. 2014-09-22 14:34:24,572 [noc.lib.nbsocket.socketfactory] Running socket factory (KEventPoller)
  2. 2014-09-22 14:34:54,590 [noc.lib.debug] UNHANDLED EXCEPTION (2014-09-22 14:34:54.570643)
  3. Working directory: /opt/noc
  4. <class 'socket.timeout'>
  5. timed out
  6. START OF TRACEBACK
  7. ------------------------------------------------------------------------
  8. File: /usr/local/lib/python2.7/socket.py (Line: 476)
  9. Function: readline
  10. 469 rv = buf.read(size)
  11. 470 self._rbuf = StringIO()
  12. 471 self._rbuf.write(buf.read())
  13. 472 return rv
  14. 473 self._rbuf = StringIO() # reset _rbuf. we consume it via buf.
  15. 474 while True:
  16. 475 try:
  17. 476 ==> data = self._sock.recv(self._rbufsize)
  18. 477 except error, e:
  19. 478 if e.args[0] == EINTR:
  20. 479 continue
  21. 480 raise
  22. 481 if not data:
  23. 482 break
  24. Variables:
  25. buf_len = 0
  26. buf = <cStringIO.StringO object at 0x807d771f0>
  27. self = <socket._fileobject object at 0x807d7bd50>
  28. e = timeout('timed out',)
  29. size = 65537
  30. ------------------------------------------------------------------------
  31. File: /usr/local/lib/python2.7/httplib.py (Line: 365)
  32. Function: _read_status
  33. 358 self.chunked = _UNKNOWN # is "chunked" being used?
  34. 359 self.chunk_left = _UNKNOWN # bytes left to read in current chunk
  35. 360 self.length = _UNKNOWN # number of bytes left in response
  36. 361 self.will_close = _UNKNOWN # conn will close at end of response
  37. 362
  38. 363 def _read_status(self):
  39. 364 # Initialize with Simple-Response defaults
  40. 365 ==> line = self.fp.readline(_MAXLINE + 1)
  41. 366 if len(line) > _MAXLINE:
  42. 367 raise LineTooLong("header line")
  43. 368 if self.debuglevel > 0:
  44. 369 print "reply:", repr(line)
  45. 370 if not line:
  46. 371 # Presumably, the server closed the connection before
  47. Variables:
  48. self = <httplib.HTTPResponse instance at 0x807d8c998>
  49. ------------------------------------------------------------------------
  50. File: /usr/local/lib/python2.7/httplib.py (Line: 409)
  51. Function: begin
  52. 402 def begin(self):
  53. 403 if self.msg is not None:
  54. 404 # we've already started reading the response
  55. 405 return
  56. 406
  57. 407 # read until we get a non-100 response
  58. 408 while True:
  59. 409 ==> version, status, reason = self._read_status()
  60. 410 if status != CONTINUE:
  61. 411 break
  62. 412 # skip the header from the 100 response
  63. 413 while True:
  64. 414 skip = self.fp.readline(_MAXLINE + 1)
  65. 415 if len(skip) > _MAXLINE:
  66. Variables:
  67. self = <httplib.HTTPResponse instance at 0x807d8c998>
  68. ------------------------------------------------------------------------
  69. File: /usr/local/lib/python2.7/httplib.py (Line: 1067)
  70. Function: getresponse
  71. 1060 args += (self.debuglevel,)
  72. 1061 if buffering:
  73. 1062 #only add this keyword if non-default, for compatibility with
  74. 1063 #other response_classes.
  75. 1064 kwds["buffering"] = True;
  76. 1065 response = self.response_class(*args, **kwds)
  77. 1066
  78. 1067 ==> response.begin()
  79. 1068 assert response.will_close != _UNKNOWN
  80. 1069 self.__state = _CS_IDLE
  81. 1070
  82. 1071 if response.will_close:
  83. 1072 # this effectively passes the connection to the response
  84. 1073 self.close()
  85. Variables:
  86. self = <httplib.HTTPConnection instance at 0x807d8c7e8>
  87. buffering = True
  88. args = (<socket._socketobject object at 0x807d628a0>,)
  89. response = <httplib.HTTPResponse instance at 0x807d8c998>
  90. kwds = {'strict': 0, 'buffering': True, 'method': 'GET'}
  91. ------------------------------------------------------------------------
  92. File: /usr/local/lib/python2.7/urllib2.py (Line: 1187)
  93. Function: do_open
  94. 1180 try:
  95. 1181 h.request(req.get_method(), req.get_selector(), req.data, headers)
  96. 1182 except socket.error, err: # XXX what error?
  97. 1183 h.close()
  98. 1184 raise URLError(err)
  99. 1185 else:
  100. 1186 try:
  101. 1187 ==> r = h.getresponse(buffering=True)
  102. 1188 except TypeError: # buffering kw not supported
  103. 1189 r = h.getresponse()
  104. 1190
  105. 1191 # Pick apart the HTTPResponse object to get the addinfourl
  106. 1192 # object initialized properly.
  107. 1193
  108. Variables:
  109. h = <httplib.HTTPConnection instance at 0x807d8c7e8>
  110. self = <urllib2.HTTPHandler instance at 0x807d8c488>
  111. req = <urllib2.Request instance at 0x807d8c320>
  112. headers =
  113. {'Authorization': 'Basic bm9jOjUwOTIxanR5',
  114. 'Connection': 'close',
  115. 'Host': '127.0.0.1:8000',
  116. 'User-Agent': 'Python-urllib/2.7'}
  117. host = '127.0.0.1:8000'
  118. http_class = <class httplib.HTTPConnection at 0x801b7f1f0>
  119. ------------------------------------------------------------------------
  120. File: /usr/local/lib/python2.7/urllib2.py (Line: 1214)
  121. Function: http_open
  122. 1207 resp.msg = r.reason
  123. 1208 return resp
  124. 1209
  125. 1210
  126. 1211 class HTTPHandler(AbstractHTTPHandler):
  127. 1212
  128. 1213 def http_open(self, req):
  129. 1214 ==> return self.do_open(httplib.HTTPConnection, req)
  130. 1215
  131. 1216 http_request = AbstractHTTPHandler.do_request_
  132. 1217
  133. 1218 if hasattr(httplib, 'HTTPS'):
  134. 1219 class HTTPSHandler(AbstractHTTPHandler):
  135. 1220
  136. Variables:
  137. self = <urllib2.HTTPHandler instance at 0x807d8c488>
  138. req = <urllib2.Request instance at 0x807d8c320>
  139. ------------------------------------------------------------------------
  140. File: /usr/local/lib/python2.7/urllib2.py (Line: 382)
  141. Function: _call_chain
  142. 375 # Handlers raise an exception if no one else should try to handle
  143. 376 # the request, or return None if they can't but another handler
  144. 377 # could. Otherwise, they return the response.
  145. 378 handlers = chain.get(kind, ())
  146. 379 for handler in handlers:
  147. 380 func = getattr(handler, meth_name)
  148. 381
  149. 382 ==> result = func(*args)
  150. 383 if result is not None:
  151. 384 return result
  152. 385
  153. 386 def open(self, fullurl, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
  154. 387 # accept a URL or a Request object
  155. 388 if isinstance(fullurl, basestring):
  156. Variables:
  157. kind = 'http'
  158. chain =
  159. {'file': [<urllib2.FileHandler instance at 0x807d8c368>],
  160. 'ftp': [<urllib2.FTPHandler instance at 0x807d8c518>],
  161. 'http': [<urllib2.HTTPHandler instance at 0x807d8c488>],
  162. 'https': [<urllib2.HTTPSHandler instance at 0x807d8c5a8>],
  163. 'unknown': [<urllib2.UnknownHandler instance at 0x807d8c440>]}
  164. handlers = [<urllib2.HTTPHandler instance at 0x807d8c488>]
  165. self = <urllib2.OpenerDirector instance at 0x807d8c3f8>
  166. args = (<urllib2.Request instance at 0x807d8c320>,)
  167. meth_name = 'http_open'
  168. handler = <urllib2.HTTPHandler instance at 0x807d8c488>
  169. func =
  170. <bound method HTTPHandler.http_open of <urllib2.HTTPHandler instance at 0x807d8c488>>
  171. ------------------------------------------------------------------------
  172. File: /usr/local/lib/python2.7/urllib2.py (Line: 422)
  173. Function: _open
  174. 415 result = self._call_chain(self.handle_open, 'default',
  175. 416 'default_open', req)
  176. 417 if result:
  177. 418 return result
  178. 419
  179. 420 protocol = req.get_type()
  180. 421 result = self._call_chain(self.handle_open, protocol, protocol +
  181. 422 ==> '_open', req)
  182. 423 if result:
  183. 424 return result
  184. 425
  185. 426 return self._call_chain(self.handle_open, 'unknown',
  186. 427 'unknown_open', req)
  187. 428
  188. Variables:
  189. data = None
  190. self = <urllib2.OpenerDirector instance at 0x807d8c3f8>
  191. req = <urllib2.Request instance at 0x807d8c320>
  192. protocol = 'http'
  193. result = None
  194. ------------------------------------------------------------------------
  195. File: /usr/local/lib/python2.7/urllib2.py (Line: 404)
  196. Function: open
  197. 397
  198. 398 # pre-process request
  199. 399 meth_name = protocol+"_request"
  200. 400 for processor in self.process_request.get(protocol, []):
  201. 401 meth = getattr(processor, meth_name)
  202. 402 req = meth(req)
  203. 403
  204. 404 ==> response = self._open(req, data)
  205. 405
  206. 406 # post-process response
  207. 407 meth_name = protocol+"_response"
  208. 408 for processor in self.process_response.get(protocol, []):
  209. 409 meth = getattr(processor, meth_name)
  210. 410 response = meth(req, response)
  211. Variables:
  212. protocol = 'http'
  213. self = <urllib2.OpenerDirector instance at 0x807d8c3f8>
  214. req = <urllib2.Request instance at 0x807d8c320>
  215. meth_name = 'http_request'
  216. fullurl = <urllib2.Request instance at 0x807d8c320>
  217. timeout = 30
  218. meth =
  219. <bound method HTTPHandler.do_request_ of <urllib2.HTTPHandler instance at 0x807d8c488>>
  220. data = None
  221. processor = <urllib2.HTTPHandler instance at 0x807d8c488>
  222. ------------------------------------------------------------------------
  223. File: /usr/local/lib/python2.7/urllib2.py (Line: 127)
  224. Function: urlopen
  225. 120 __version__ = sys.version[:3]
  226. 121
  227. 122 _opener = None
  228. 123 def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
  229. 124 global _opener
  230. 125 if _opener is None:
  231. 126 _opener = build_opener()
  232. 127 ==> return _opener.open(url, data, timeout)
  233. 128
  234. 129 def install_opener(opener):
  235. 130 global _opener
  236. 131 _opener = opener
  237. 132
  238. 133 # do these error classes make sense?
  239. Variables:
  240. url = <urllib2.Request instance at 0x807d8c320>
  241. data = None
  242. timeout = 30
  243. ------------------------------------------------------------------------
  244. File: /opt/noc/lib/daemon/configuration.py (Line: 80)
  245. Function: get_config
  246. 73 url = self.url
  247. 74 if self.last:
  248. 75 url += "?last=%s" % self.last
  249. 76 req = urllib2.Request(url)
  250. 77 if self.auth:
  251. 78 req.add_header("Authorization", self.auth)
  252. 79 try:
  253. 80 ==> resp = urllib2.urlopen(req, timeout=self.timeout)
  254. 81 except urllib2.URLError, why:
  255. 82 logger.error("Cannot get config from %s: %s" % (
  256. 83 self.url, why))
  257. 84 return None
  258. 85 try:
  259. 86 data = json_decode(resp.read())
  260. Variables:
  261. url = 'http://127.0.0.1:8000/pm/probe/default/0/config/'
  262. self = <ConfigurationThread(default, started daemon 34465945600)>
  263. req = <urllib2.Request instance at 0x807d8c320>
  264. ------------------------------------------------------------------------
  265. File: /opt/noc/lib/daemon/configuration.py (Line: 141)
  266. Function: run
  267. 134
  268. 135 def run(self):
  269. 136 logger.info("Starting configuration thread")
  270. 137 while not self.to_shutdown:
  271. 138 try:
  272. 139 t0 = time.time()
  273. 140 interval = self.interval
  274. 141 ==> config = self.get_config()
  275. 142 if config:
  276. 143 self.apply_config(config)
  277. 144 elif config is None:
  278. 145 interval = self.failed_interval
  279. 146 t = time.time()
  280. 147 nt = t0 + interval
  281. Variables:
  282. self = <ConfigurationThread(default, started daemon 34465945600)>
  283. interval = 300
  284. t0 = 1411382064.557319
  285. ------------------------------------------------------------------------
  286. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement