500 response listing a bucket with 2 keys

Bryan bryan at go-factory.net
Mon Aug 18 16:29:02 EDT 2014


Hi Everyone,

Getting a very interesting 500 error from the Riak HTTP API. I am using Riak 1.4.2:

curl http://localhost:8098/buckets/nodes/keys?keys=true

<html><head><title>500 Internal Server Error</title></head><body><h1>Internal Server Error</h1>The server encountered an error while processing this request:<br><pre>{error,{exit,{ucs,{bad_utf8_character_code}},
             [{xmerl_ucs,from_utf8,1,[{file,"xmerl_ucs.erl"},{line,185}]},
              {mochijson2,json_encode_string,2,
                          [{file,"src/mochijson2.erl"},{line,186}]},
              {mochijson2,'-json_encode_array/2-fun-0-',3,
                          [{file,"src/mochijson2.erl"},{line,157}]},
              {lists,foldl,3,[{file,"lists.erl"},{line,1197}]},
              {mochijson2,json_encode_array,2,
                          [{file,"src/mochijson2.erl"},{line,159}]},
              {mochijson2,'-json_encode_proplist/2-fun-0-',3,
                          [{file,"src/mochijson2.erl"},{line,167}]},
              {lists,foldl,3,[{file,"lists.erl"},{line,1197}]},
              {mochijson2,json_encode_proplist,2,
                          [{file,"src/mochijson2.erl"},{line,170}]}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine web server</ADDRESS></body></html>

We use the protocol buffer client to get data in. The data in question is a binary string of the nodes name:

term_to_binary(node())

I am able to get them out via the erlang riak client:

riakc_pb_socket:list_keys(S#state.riak_socketpid, <<“nodes”>>)

gives me:

{ok,[<<131,100,0,19,110,117,99,108,101,117,115,45,50,64,
       49,50,55,46,48,46,48,46,49>>,
     <<131,100,0,17,110,117,99,108,101,117,115,64,49,50,55,
       46,48,46,48,46,49>>]}

(nucleus at 127.0.0.1)2> binary_to_term(<<131,100,0,19,110,117,99,108,101,117,115,45,50,64,
(nucleus at 127.0.0.1)2>        49,50,55,46,48,46,48,46,49>>).
'nucleus-2 at 127.0.0.1'

I am looking through the console.log, but there is nothing but some bitbask merge messages.

Cheers,
Bryan


----

Bryan Hughes
Go Factory

http://www.go-factory.net

Connecting the Internet of Things

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20140818/5b644574/attachment.html>


More information about the riak-users mailing list