riak / riaksearch fails and returns with "badarg, universaltime_to_localtime" on any mapreduce function

A. Sebastian Dietzel sebastian at dubizzle.com
Tue Nov 23 05:42:31 EST 2010


Hi Dan,

the error I've been trying to fix for the past week wasn't riak's fault 
it's a bug in Erlang R13B04.
Sean helped me yesterday via IRC to get riak-search working on R14B 
which fixed it for me.

You can read more about that erlang bug on the erlang-bugs mailing list:
http://www.erlang.org/pipermail/erlang-bugs/2008-November/001077.html

Thanks guys.


Dan Reverri wrote:
> It looks like Riak is hitting this error when trying to jsonify the 
> metadata, specifically the "X-Riak-Last-Modified" header. The 
> timestamp in the header works out to be "Sun, 21 Nov 2010 07:28:05 
> GMT". Your system seems to be translating it to a date before 1970.
>
> Can you run the following Erlang code while attached to a running Riak 
> node?
> calendar:now_to_local_time({1290,324485,31243}).
>
>
> It should output something like:
>
> {{2010,11,20},{23,28,5}}
>
>
> Thanks,
> Dan
>
>
>
>
> Daniel Reverri
> Developer Advocate
> Basho Technologies, Inc.
> dan at basho.com <mailto:dan at basho.com>
>
>
> On Sun, Nov 21, 2010 at 2:10 AM, A. Sebastian Dietzel 
> <sebastian at dubizzle.com <mailto:sebastian at dubizzle.com>> wrote:
>
>     Hi,
>
>     I've trouble getting the mapreduce functions to work in riak and
>     riaksearch.
>     It fails with some sort of timestamp error, unfortunately I'm not
>     good enough in
>     Erlang to fix it, but I've attached the error logs and
>     riaksearch-admin status output - hope that helps.
>
>     So far, I've tried it on my local dev machine (osx -
>     riak/riaksearch source installation, tarball and github master
>     branch),
>     on centos 5.3 (github master) and on ubuntu,
>     the .deb packaged version on ubuntu works and doesn't fail in my
>     test cases.
>
>     The attached test is written in python based on the test cases in
>     the library
>     and utilizes the http client from the python library for riak.
>     But that shouldn't matter, it also fails via the pbc-python client
>     (I've attached logs for that as well),
>     as well as in ruby (using the official client) and via curl too.
>     I didn't attach any logs for ruby or curl, as they're similar to
>     the http based python client.
>
>     Since no one else is having these issues, I presume I'm doing
>     something wrong
>     but I don't know what exactly.
>
>     I'm running riak/riaksearch from the console like this:
>     ulimit -n 1024
>     $PATH_TO_RIAKS_SRC/rel/bin/riaksearch start
>
>     or for regular riak:
>     $PATH_TO_RIAK_SRC/rel/bin/riak start
>
>     This works and starts riak / riaksearch, but as soon as I start
>     doing anything mapreduce with the servers they fail with:
>
>     ...
>     {badarg,[{erlang,universaltime_to_localtime,[{{1969,12,31},{23,59,59}}]},{calendar,local_time_to_universal_time_dst,1}
>     ...
>
>     I'm using Erlang R13B04.
>
>     Please let me know if I can provide anything else to help solving
>     this issue.
>
>     Thank you in advance,
>     Sebastian
>     -- 
>     A. Sebastian Dietzel (el mariachi)
>     sebastian at dubizzle.com <mailto:sebastian at dubizzle.com>
>
>
>     _______________________________________________
>     riak-users mailing list
>     riak-users at lists.basho.com <mailto:riak-users at lists.basho.com>
>     http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>

-- 
A. Sebastian Dietzel (el mariachi)
sebastian at dubizzle.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20101123/04a7e3f7/attachment.html>


More information about the riak-users mailing list