Bugs item #1899258, was opened at 2008-02-22 02:06 Message generated for change (Comment added) made by yingying You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1899258&group_id=56967
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: PF/runtime Group: (zombie: Pathfinder 0.20) Status: Open Resolution: None Priority: 6 Private: No Submitted By: marspluto (marspluto) Assigned to: Ying Zhang (yingying) Summary: PF: Error message with Administrative Console Initial Comment: When I go to web admin console at http://127.0.0.1:50001/admin/, I am getting this error (see the screenshot): http://tinypic.com/view.php?pic=1ttoxf&s=3 It also has been attached. This occurs when I click on "List Collections" and "List All Documents". I am also getting the error when I click on "Backup Database". To summarize, the web admin console is not working. Could someone provide a fix, because I need to backup my index. Thanks! jz ---------------------------------------------------------------------- >Comment By: Ying Zhang (yingying) Date: 2008-02-22 19:12 Message: Logged In: YES user_id=341633 Originator: NO After a lot of debugging, I found what is exactly happening, which is *very* strange. The reason that clicking on buttons like "list collections" and "list all documents" (which triggers an xrpc request message to be send to the xrpc server to execute the corresponding function) does not respond, is that the HTTP server (sttpd) hangs in trying to receive the complete request message send by the function xmlParserInputBufferCreateFilename() (in PFurlcache()). The error "could not load module" is given after the connection has expired. The syntax error "unexpected $end on line 1, column 0" is caused by that xmlParserInputBufferCreateFilename() is not able to retrieve the module file, which results in an emtpy string to be parsed. When xrpc server receives a request, e.g. "list collections", it first load the module in which the function "collections()" is defined. in my test case, it is: http://andorea.ins.cwi.nl:8080/admin/admin.xq Loading the module is done by the function xmlParserInputBufferCreateFilename (in PFurlcache(), in compiler.c), which sends an HTTP GET request to andorea.ins.cwi.nl:8080 to retrieve the module file. Since this is a file request, it is handled by the HTTP server (shttpd) itself (not by the xrpc server). What shttpd does is simple: buffer the full request message (i.e. the request message contains the chars '\n\r\n'), then handle it. But here, strange thing happens: it seems that the request sent by xmlParserInputBufferCreateFilename() is not complete/valid !? After shttd has tried to read the request message several times, the buffer still only contains: (gdb) p buf $21 = 0x2aaac0005258 "GET /admin/admin.xq HTTP/1.0\r\nHost: andorea.ins.cwi.nl:8080\r\nAccept-Encoding: gzip" Note that the message is not ended by '\r\n\r\n', according to HTTP 1.1 To prove that shttpd works, using wget to retrieve the same file from shttpd succeeds: $ wget http://andorea.ins.cwi.nl:8080/admin/admin.xq ... 18:41:36 (156.47 MB/s) - `admin.xq' saved [4950/4950] $ cat admin.xq module namespace admin = 'http://monetdb.cwi.nl/XQuery/admin/'; ... the request sent by wget is: (gdb) p buf $20 = 0x2aaac0005258 "GET /admin/admin.xq HTTP/1.0\r\nUser-Agent: Wget/1.10.2 (Red Hat modified)\r\nAccept: */*\r\nHost: andorea.ins.cwi.nl:8080\r\nConnection: Keep-Alive\r\n\r\n" which is obviously complete/correct. However, another HTTP server (e.g. www.cwi.nl) does not have any problem with the request message sent by xmlParserInputBufferCreateFilename(): $ cat test.xq import module namespace t = "http://www.monetdb.nl/basicfunctions" at "http://homepages.cwi.nl/~zhang/xrpc/basicfunctions.xq"; t:convert(23) $ mclient -lx test.xq 50.685330 For the query above, xmlParserInputBufferCreateFilename() is used to GET the file http://homepages.cwi.nl/~zhang/xrpc/basicfunctions.xq, which succeeded. But, if I change the query to use a module file served by my Apache Tomcat/5.5.9 server, the same problem occurs. mclient hangs for a while (note the time in the prompt), and gives the same error: $ cat test.xq (: import module namespace t = "http://www.monetdb.nl/basicfunctions" at "http://homepages.cwi.nl/~zhang/xrpc/basicfunctions.xq"; :) import module namespace t = "http://www.monetdb.nl/basicfunctions" at "http://andorea.ins.cwi.nl:8080/basicfunctions.xq"; t:convert(23) [Fri Feb 22 19:06:02 CET 2008] [andorea:/ufs/zhang] $ mclient -lx test.xq MAPI = [EMAIL PROTECTED]:50000 QUERY = (: ERROR = !parse error: syntax error, unexpected $end on line 1, column 0 !parse error: XQuery parsing failed !# halted in /ufs/zhang/monet/stable/pathfinder/compiler/parser/parser.y (PFparse), line 2902 !parse error: syntax error, unexpected $end on line 1, column 0 !parse error: error parsing module from http://andorea.ins.cwi.nl:8080/basicfunctions.xq !# halted in /ufs/zhang/monet/stable/pathfinder/compiler/parser/parser.y (parse_module), line 2939 [Fri Feb 22 19:06:23 CET 2008] [andorea:/ufs/zhang] $ The code in shttpd.c to hand file request hasn't been changed since 2006, and the admin page has workt before. So, am I able to conclude that: some thing is wrong with xmlParserInputBufferCreateFilename(), but maybe some HTTP server is not very strict with if the request message is correctly ended with a '\r\n\r\n'? Are we using a newer version of libxml2 and since when? Thanks in advance for any suggestions/comments, Jennie ---------------------------------------------------------------------- Comment By: Ying Zhang (yingying) Date: 2008-02-22 13:59 Message: Logged In: YES user_id=341633 Originator: NO Stefan, Thanks for the pictures. I now also get similar problem. I'm searching for the reason why it can't find the module. You are right, if it is used for such important task, it should be tested more often. Nightly test would be great, but I won't know how... I'm willing to test it manually before each release. ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-02-22 13:47 Message: Logged In: YES user_id=572415 Originator: NO File Added: Error3.png ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-02-22 13:46 Message: Logged In: YES user_id=572415 Originator: NO File Added: Error2.png ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-02-22 13:45 Message: Logged In: YES user_id=572415 Originator: NO Jennie, I currently only have the latest Stable (0.22) but not the former one (0.20) running. With the latest Stable, I get the following (virgin DB with 1 document loaded): - first click on "List Collections": No reaction - second click on "List Collections": Attached Error1.png - first click on "List All Documents": No reaction - second click on "List All Documents": Attached Error2.png - click on "Backup Database", fill in "Backup ID", click "Backup": Attached Error3.png ... I'm afraid, there is major need for testing this functionality --- preferably even automated (nightly!) testing, or mandatory "by hand" testing by a confirmed maintainer before each future release ... File Added: Error1.png ---------------------------------------------------------------------- Comment By: Ying Zhang (yingying) Date: 2008-02-22 12:57 Message: Logged In: YES user_id=341633 Originator: NO Sure, I'm looking at this problem. On my mac, I get neigher results nor error :( Stefan, if you use the admin page, will you get similar error? Jennie ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-02-22 07:14 Message: Logged In: YES user_id=572415 Originator: NO Jennie, could you please have a look at this one (possibly together with Peter)? In particular the backup functionality in MonetDB/XQuery 0.20 (and restore in 0.22) is required to keep existing databases when upgrading from 0.20 to 0.22. Thanks! Stefan ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1899258&group_id=56967 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Monetdb-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-bugs
