Opened 9 years ago

Closed 9 years ago

#40 closed defect (fixed)

function.unlink: No such file or directory

Reported by: michiel Owned by: sander
Priority: major Milestone:
Component: Central server Keywords:
Cc: Time estimate:

Description

Crash of the factory after input from server.

send: "<?xml version='1.0'?>\n<methodCall>\n<methodName>jobs.poll</methodName>\n<params>\n<param>\n<value><string>Thor</string></value>\n</param>\n</params>\n</methodCall>\n"
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 09 Apr 2010 03:25:52 GMT
header: Server: Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.2.6-1+lenny6 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.9 OpenSSL/0.9.8g
header: X-Powered-By: PHP/5.2.6-1+lenny6
header: Set-Cookie: CAKEPHP=9de90bb3060d44309be17a37c0efbcd0; expires=Fri, 16 Apr 2010 03:25:53 GMT; path=/; secure
header: P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
header: Set-Cookie: CAKEPHP=9de90bb3060d44309be17a37c0efbcd0; expires=Fri, 16 Apr 2010 03:25:54 GMT; path=/; secure
header: Content-Length: 151
header: Connection: close
header: Content-Type: application/xml
body: '<?xml version="1.0" encoding="iso-8859-1"?>\n<methodResponse>\n<params>\n <param>\n <value>\n <string/>\n </value>\n </param>\n</params>\n</methodResponse>\n'
2010-04-09 05:32:02,341 DEBUG: No jobs found. Sleeping.
send: 'POST /xmlrpc HTTP/1.0\r\nHost: www.officeshots.org:443\r\nUser-Agent: xmlrpclib.py/1.0.1 (by www.pythonware.com)\r\nContent-Type: text/xml\r\nContent-Length: 157\r\n\r\n'
send: "<?xml version='1.0'?>\n<methodCall>\n<methodName>jobs.poll</methodName>\n<params>\n<param>\n<value><string>Thor</string></value>\n</param>\n</params>\n</methodCall>\n"
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 09 Apr 2010 03:26:55 GMT
header: Server: Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.2.6-1+lenny6 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.9 OpenSSL/0.9.8g
header: X-Powered-By: PHP/5.2.6-1+lenny6
header: Set-Cookie: CAKEPHP=512097a9a0840e4e3896b5bb9b95f45a; expires=Fri, 16 Apr 2010 03:26:56 GMT; path=/; secure
header: P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
header: Vary: Accept-Encoding
header: Content-Length: 7430
header: Connection: close
header: Content-Type: text/html
body: '\n<pre class="cake-debug">\n<a href=\'javascript:void(0);\' onclick=\'document.getElementById("CakeStackTrace1").style.display = (document.getElementById("CakeStackTrace1").style.display == "none" ? "" : "none")\'><b>Warning</b> (2)</a>: unlink(/home/www.officeshots.org/trunk/www/app/tmp/cache/cake_model_default_testsuites) [<a href=\'http://php.net/function.unlink\'>function.unlink</a>]: No such file or directory [<b>CORE/cake/libs/file.php</b>, line <b>292</b>]\n</pre>\n<div id="CakeStackTrace1" class="cake-stack-trace" style="display: none;"><a href=\'javascript:void(0);\' onclick=\'document.getElementById("CakeErrorCode1").style.display = (document.getElementById("CakeErrorCode1").style.display == "none" ? "" : "none")\'>Code</a><pre>unlink - [internal], line ??\nFile::delete() - CORE/cake/libs/file.php, line 292\nFileEngine::read() - CORE/cake/libs/cache/file.php, line 171\nCache::read() - CORE/cake/libs/cache.php, line 307\nDataSource::cacheDescription() - CORE/cake/libs/model/datasources/datasource.php, line 396\nDataS'
Traceback (most recent call last):

File "factory.py", line 223, in <module>

factory.run()

File "factory.py", line 208, in run

while self.loop():

File "factory.py", line 151, in loop

job = self.proxy.jobs.poll(self.name)

File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in call

return self.send(self.name, args)

File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in request

verbose=self.verbose

File "/usr/lib/python2.6/xmlrpclib.py", line 1253, in request

return self._parse_response(h.getfile(), sock)

File "/usr/lib/python2.6/xmlrpclib.py", line 1387, in _parse_response

p.feed(response)

File "/usr/lib/python2.6/xmlrpclib.py", line 601, in feed

self._parser.Parse(data, 0)

xml.parsers.expat.ExpatError?: junk after document element: line 5, column 0

Change History (4)

comment:1 Changed 9 years ago by michiel

send: 'POST /xmlrpc HTTP/1.0\r\nHost: www.officeshots.org:443\r\nUser-Agent: xmlrpclib.py/1.0.1 (by www.pythonware.com)\r\nContent-Type: text/xml\r\nContent-Length: 157\r\n\r\n'
send: "<?xml version='1.0'?>\n<methodCall>\n<methodName>jobs.poll</methodName>\n<params>\n<param>\n<value><string>Thor</string></value>\n</param>\n</params>\n</methodCall>\n"
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 09 Apr 2010 08:02:49 GMT
header: Server: Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.2.6-1+lenny6 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.9 OpenSSL/0.9.8g
header: X-Powered-By: PHP/5.2.6-1+lenny6
header: Set-Cookie: CAKEPHP=237f7bb64bb8ab882b4ff24b0a45f6b9; expires=Fri, 16 Apr 2010 08:02:50 GMT; path=/; secure
header: P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
header: Vary: Accept-Encoding
header: Content-Length: 7723
header: Connection: close
header: Content-Type: text/html
body: '\n<pre class="cake-debug">\n<a href=\'javascript:void(0);\' onclick=\'document.getElementById("CakeStackTrace1").style.display = (document.getElementById("CakeStackTrace1").style.display == "none" ? "" : "none")\'><b>Warning</b> (2)</a>: fopen(/home/www.officeshots.org/trunk/www/app/tmp/cache/cake_model_default_formats) [<a href=\'http://php.net/function.fopen\'>function.fopen</a>]: failed to open stream: No such file or directory [<b>CORE/cake/libs/file.php</b>, line <b>156</b>]\n</pre>\n<div id="CakeStackTrace1" class="cake-stack-trace" style="display: none;"><a href=\'javascript:void(0);\' onclick=\'document.getElementById("CakeErrorCode1").style.display = (document.getElementById("CakeErrorCode1").style.display == "none" ? "" : "none")\'>Code</a> | <a href=\'javascript:void(0);\' onclick=\'document.getElementById("CakeErrorContext1").style.display = (document.getElementById("CakeErrorContext1").style.display == "none" ? "" : "none")\'>Context</a><pre id="CakeErrorContext1" class="cake-context" style="display: none;">$mode\t'
Traceback (most recent call last):

File "factory.py", line 223, in <module>

factory.run()

File "factory.py", line 208, in run

while self.loop():

File "factory.py", line 151, in loop

job = self.proxy.jobs.poll(self.name)

File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in call

return self.send(self.name, args)

File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in request

verbose=self.verbose

File "/usr/lib/python2.6/xmlrpclib.py", line 1253, in request

return self._parse_response(h.getfile(), sock)

File "/usr/lib/python2.6/xmlrpclib.py", line 1387, in _parse_response

p.feed(response)

File "/usr/lib/python2.6/xmlrpclib.py", line 601, in feed

self._parser.Parse(data, 0)

xml.parsers.expat.ExpatError?: junk after document element: line 5, column 0

comment:2 Changed 9 years ago by michiel

send: 'POST /xmlrpc HTTP/1.0\r\nHost: www.officeshots.org\r\nUser-Agent: M2Crypto_XMLRPC/0.19.1 - xmlrpclib.py/1.0.1 (by www.pythonware.com)\r\nContent-Type: text/xml\r\nContent-Length: 157\r\n\r\n'
send: "<?xml version='1.0'?>\n<methodCall>\n<methodName>jobs.poll</methodName>\n<params>\n<param>\n<value><string>Thor</string></value>\n</param>\n</params>\n</methodCall>\n"
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 09 Apr 2010 10:38:15 GMT
header: Server: Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.2.6-1+lenny6 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.9 OpenSSL/0.9.8g
header: X-Powered-By: PHP/5.2.6-1+lenny6
header: Set-Cookie: CAKEPHP=3b4964f17f1ba658f4f6b140016e70ad; expires=Fri, 16 Apr 2010 10:38:15 GMT; path=/; secure
header: P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
header: Vary: Accept-Encoding
header: Connection: close
header: Content-Type: text/html
body: '\n<pre class="cake-debug">\n<a href=\'javascript:void(0);\' onclick=\'document.getElementById("CakeStackTrace1").style.display = (document.getElementById("CakeStackTrace1").style.display == "none" ? "" : "none")\'><b>Warning</b> (2)</a>: unlink(/home/www.officeshots.org/trunk/www/app/tmp/cache/cake_model_default_applications) [<a href=\'http://php.net/function.unlink\'>function.unlink</a>]: No such file or directory [<b>CORE/cake/libs/file.php</b>, line <b>292</b>]\n</pre>\n<div id="CakeStackTrace1" class="cake-stack-trace" style="display: none;"><a href=\'javascript:void(0);\' onclick=\'document.getElementById("CakeErrorCode1").style.display = (document.getElementById("CakeErrorCode1").style.display == "none" ? "" : "none")\'>Code</a><pre>unlink - [internal], line ??\nFile::delete() - CORE/cake/libs/file.php, line 292\nFileEngine::read() - CORE/cake/libs/cache/file.php, line 171\nCache::read() - CORE/cake/libs/cache.php, line 307\nDataSource::cacheDescription() - CORE/cake/libs/model/datasources/datasource.php, line 396\nDat'
Traceback (most recent call last):

File "factory.py", line 223, in <module>

factory.run()

File "factory.py", line 208, in run

while self.loop():

File "factory.py", line 151, in loop

job = self.proxy.jobs.poll(self.name)

File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in call

return self.send(self.name, args)

File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in request

verbose=self.verbose

File "/home/michiel/factory/src/transports/m2crypto.py", line 43, in request

return m2xmlrpclib.SSL_Transport.request(self, host, handler, request_body, verbose)

File "/usr/lib/pymodules/python2.6/M2Crypto/m2xmlrpclib.py", line 64, in request

return self.parse_response(h.getfile())

File "/usr/lib/python2.6/xmlrpclib.py", line 1361, in parse_response

return self._parse_response(file, None)

File "/usr/lib/python2.6/xmlrpclib.py", line 1387, in _parse_response

p.feed(response)

File "/usr/lib/python2.6/xmlrpclib.py", line 601, in feed

self._parser.Parse(data, 0)

xml.parsers.expat.ExpatError?: junk after document element: line 5, column 0

comment:3 Changed 9 years ago by michiel

  • Priority changed from minor to major

body: '\n<pre class="cake-debug">\n<a href=\'javascript:void(0);\' onclick=\'document.getElementById("CakeStackTrace1").style.display = (document.getElementById("CakeStackTrace1").style.display == "none" ? "" : "none")\'><b>Warning</b> (2)</a>: fopen(/home/www.officeshots.org/trunk/www/app/tmp/cache/cake_model_default_jobs) [<a href=\'http://php.net/function.fopen\'>function.fopen</a>]: failed to open stream: No such file or directory [<b>CORE/cake/libs/file.php</b>, line <b>156</b>]\n</pre>\n<div id="CakeStackTrace1" class="cake-stack-trace" style="display: none;"><a href=\'javascript:void(0);\' onclick=\'document.getElementById("CakeErrorCode1").style.display = (document.getElementById("CakeErrorCode1").style.display == "none" ? "" : "none")\'>Code</a> | <a href=\'javascript:void(0);\' onclick=\'document.getElementById("CakeErrorContext1").style.display = (document.getElementById("CakeErrorContext1").style.display == "none" ? "" : "none")\'>Context</a><pre id="CakeErrorContext1" class="cake-context" style="display: none;">$mode\t=\t"'
Traceback (most recent call last):

File "factory.py", line 223, in <module>

factory.run()

File "factory.py", line 208, in run

while self.loop():

File "factory.py", line 151, in loop

job = self.proxy.jobs.poll(self.name)

File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in call

return self.send(self.name, args)

File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in request

verbose=self.verbose

File "/home/michiel/factory/src/transports/m2crypto.py", line 43, in request

return m2xmlrpclib.SSL_Transport.request(self, host, handler, request_body, verbose)

File "/usr/lib/pymodules/python2.6/M2Crypto/m2xmlrpclib.py", line 64, in request

return self.parse_response(h.getfile())

File "/usr/lib/python2.6/xmlrpclib.py", line 1361, in parse_response

return self._parse_response(file, None)

File "/usr/lib/python2.6/xmlrpclib.py", line 1387, in _parse_response

p.feed(response)

File "/usr/lib/python2.6/xmlrpclib.py", line 601, in feed

self._parser.Parse(data, 0)

xml.parsers.expat.ExpatError?: junk after document element: line 5, column 0

comment:4 Changed 9 years ago by sander

  • Resolution set to fixed
  • Status changed from new to closed

This can happen sometimes when you are sending an XML request to the server just when it is refreshing it's model cache (i.e. after I made changes to the source code). I have updated the factory to catch and ignore these errors. Please update to r353.

Note: See TracTickets for help on using tickets.