still having some trouble with associations...

59 views
Skip to first unread message

Tom Lee

unread,
Sep 1, 2011, 8:40:48 PM9/1/11
to superfa...@googlegroups.com
Hi Donny -- I'm still fiddling around with the code, getting myself familiar with it.  I've been loading the old and new testament to test the app -- it really is blazingly fast -- but I continue to have trouble with the associations method.  I've been trying to run /association/1/ (I loaded both documents as doctype 1, docid 1 and 2 respectively).  But this produces
500 Internal Server Error (logic error)
The debug output is not tremendously helpful, unfortunately:
2011-09-01T19:38:24.807487-05:00: [INFO]:  Response Time: 0.0001 secs
2011-09-01T19:38:24.808223-05:00: [INFO]: (127.0.0.1:64226): GET /association/1/ HTTP/1.1: 0
2011-09-01T19:38:24.808579-05:00: [INFO]: disconnecting: expr=127.0.0.1:64226
2011-09-01T19:38:24.894733-05:00: [INFO]: connected: expr=127.0.0.1:64368
2011-09-01T19:38:24.906719-05:00: [INFO]:  Response Time: 0.0001 secs
2011-09-01T19:38:24.907171-05:00: [INFO]: (127.0.0.1:64368): GET /favicon.ico HTTP/1.1: 200
Based on our last conversation I understood the association method to be working, but not to have its output formatted in an optimal way. But perhaps I didn't grasp what you were saying.  Could you clarify, or suggest what I might be able to do to get past this kind of error?
Tom

Donovan Hide

unread,
Sep 2, 2011, 7:48:39 AM9/2/11
to superfa...@googlegroups.com
Hi Tom,

the selective association by document type is not implemented yet, although all the internal plumbing is there. It looks like you might have been visiting:


in the browser, which is why you are getting the error, needs to be a POST to trigger the task. I've updated the repo with a better example in ./scripts/gutenberg.sh which is now documented at the bottom of the README. Give it a go!

cd superfastmatch
git pull
make
./superfastmatch -debug -reset -window_size 30

in another window:

./scripts/gutenberg.sh

Worth reading the bit in the README about setting the debug flag and monitoring the output with tail -f in another terminal window. The output of the association task is very useful to understand what is going on.

Let me know how you get on.

Cheers,
Donny.

Tom Lee

unread,
Sep 2, 2011, 11:55:19 AM9/2/11
to superfa...@googlegroups.com
Ah! I had been looking at the specification document but missed that POST and GET behaved differently for the /association/ URL. Excellent, thanks for the clarification.  I'll give this a try in a moment.  

From the TODO I take it that JSON output is still yet to be implemented -- is that right?

Donovan Hide

unread,
Sep 2, 2011, 12:01:23 PM9/2/11
to superfa...@googlegroups.com
Hi Tom,

yes the JSON is still not implemented. Working on getting the paging done correctly for all the pages at the moment, which is the final piece before the JSON templates can be easily done.

Did you get the gutenberg example to work ok? It's quite interesting the amount of Little Dorrit that is from the Bible!!!

Cheers,
Donny.

Tom Lee

unread,
Sep 2, 2011, 12:34:19 PM9/2/11
to superfa...@googlegroups.com
I'm seeing some strange behavior with this example.  Consider the following console output.  In between executions of gutenberg.sh I restarted the server (with the -reset switch).  As you'll see, most of the documents fail to load -- but not the same ones each time! The web interface confirms that Little Dorrit made it one time, and Bleak House the next.  Sometimes they all fail.  Any ideas?

(superfastmatch)toms-macbook:scripts thomaslee$ ./gutenberg.sh 
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
<!DOCTYPE html> 
<html>
<body>
<h1><a href="/queue/1/">Queue Item: 1</a></h1>
<p>Queued <a href="/document/1/3/">Document(1,3)</a> for insertion into index</p>
</body>
</html>400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
<!DOCTYPE html> 
<html>
<body>
<h1><a href="/queue/2/">Queue Item: 2</a></h1>
<p>Queued <a href="/document/1/11/">Document(1,11)</a> for insertion into index</p>
</body>
</html>500 Internal Server Error (logic error)
(superfastmatch)toms-macbook:scripts thomaslee$ ./gutenberg.sh 
<!DOCTYPE html> 
<html>
<body>
<h1><a href="/queue/1/">Queue Item: 1</a></h1>
<p>Queued <a href="/document/1/1/">Document(1,1)</a> for insertion into index</p>
</body>
</html>400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
400 Bad Request (receiving data failed)
<!DOCTYPE html> 
<html>
<body>
<h1><a href="/queue/2/">Queue Item: 2</a></h1>
<p>Queued <a href="/document/1/11/">Document(1,11)</a> for insertion into index</p>
</body>
</html>500 Internal Server Error (logic error)
(superfastmatch)toms-macbook:scripts thomaslee$ 

Donovan Hide

unread,
Sep 2, 2011, 12:40:34 PM9/2/11
to superfa...@googlegroups.com
Hi Tom,

it's a bug with Kyoto Tycoon's handling of the EXPECT HTTP header which curl uses automatically. Have pushed the fix which overrides curl's default. I might have to write a bugfix for Kyoto Tycoon to get that one fixed!

git pull

and it should now work.

Cheers,
Donny.

Tom Lee

unread,
Sep 2, 2011, 12:42:32 PM9/2/11
to superfa...@googlegroups.com
Excellent! The loading now works, but I'm afraid the final response (to the "curl -X POST 127.0.0.1:8080/association") is still "500 Internal Server Error (logic error)".

Donovan Hide

unread,
Sep 2, 2011, 12:45:33 PM9/2/11
to superfa...@googlegroups.com
Oops, missed out header for the association POST.

git pull

again!

Tom Lee

unread,
Sep 2, 2011, 1:27:48 PM9/2/11
to superfa...@googlegroups.com
says I'm already up to date...

Donovan Hide

unread,
Sep 2, 2011, 1:33:09 PM9/2/11
to superfa...@googlegroups.com
... sorry, hopping between two computers, the github trunk is a bit behind my local trunk, have pushed now. It's just the addition of:

-H "Expect:"

to each curl command to solve the bug.

Tom Lee

unread,
Sep 2, 2011, 1:34:58 PM9/2/11
to superfa...@googlegroups.com
Still no dice! Same 500 error. I'm going to hop on skype...
Reply all
Reply to author
Forward
0 new messages