How to understand this Riak stacktrace?

一个人想着一个人 提交于 2020-01-17 03:51:05

问题


Can anyone help me solve this problem, I have the stacktrace of the problem, but can't understand what the trace actually means.

The error occurs when I try to retrieve all data from a bucket, in a Riak Database. And I am using java-riak-client library as the ORM. I can figure out that its a MapReduce problem, but other than that.....

Here below is the actual stacktrace, I actually could not figure out what error is it pointing to, and I tried to find out the record its displaying in error. @Update: Yes the record is there, when i CURL

com.basho.riak.client.RiakException: java.io.IOException: <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,
    {error,
        {case_clause,
            {error,
                {0,
                 [{module,riak_kv_mrc_map},
                  {partition,913438523331814323877303020447676887284957839360},
                  {details,
                      [{fitting,
                           {fitting,<0.21083.23>,#Ref<0.0.31.39954>,follow,1}},
                       {name,0},
                       {module,riak_kv_mrc_map},
                       {arg,{{jsfun,<<"Riak.mapValuesJson">>},none}},
                       {output,
                           {fitting,<0.21081.23>,#Ref<0.0.31.39954>,sink,
                               undefined}},
                       {options,
                           [{log,sink},
                            {trace,[error]},
                            {sink,
                                {fitting,<0.21081.23>,#Ref<0.0.31.39954>,
                                    sink,undefined}},
                            {sink_type,{fsm,10,infinity}}]},
                       {q_limit,64}]},
                  {type,forward_preflist},
                  {error,[preflist_exhausted]},
                  {input,
                      {ok,{r_object,<<"xxxx-users">>,
                              <<"xxxx@hotmail.com-userpass">>,
                              [{r_content,
                                   {dict,7,16,16,8,80,48,
                                       {[],[],[],[],[],[],[],[],[],[],[],[],
                                        [],[],[],[]},
                                       {{[],[],
                                         [[<<"Links">>]],
                                         [],[],[],[],[],[],[],
                                         [[<<"content-type">>,97,112,112,108,
                                           105,99,97,116,105,111,110,47,106,
                                           115,111,110],
                                          [<<"X-Riak-VTag">>,54,98,119,73,73,
                                           84,107,120,66,70,107,86,102,67,103,
                                           71,73,116,120,121,85,53]],
                                         [[<<"index">>]],
                                         [],
                                         [[<<"X-Riak-Last-Modified">>|
                                           {1407,514685,380030}]],
                                         [],
                                         [[<<"charset">>,117,116,102,45,56],
                                          [<<"X-Riak-Meta">>]]}}},
                                   <<"{\"identityId\":{\"userId\":\"xxxx@hotmail.com\",\"providerId\":\"userpass\"},\"firstName\":\"xx\",\"lastName\":\"xx\",\"fullName\":\"xx xx\",\"email\":\"xxxx@hotmail.com\",\"authMethod\":{\"method\":\"userPassword\"},\"passwordInfo\":{\"hasher\":\"bcrypt\",\"password\":\"$2a$10$Gm1VVCM09iyI7TQY7r8B7.Baa.YrtHHgREkQpTIH9ThyW4WzuUeJ.\"}}">>}],
                              [{<<35,9,254,249,83,228,76,146>>,
                                {1,63574733885}}],
                              {dict,1,16,16,8,80,48,
                                  {[],[],[],[],[],[],[],[],[],[],[],[],[],[],
                                   [],[]},
                                  {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],
                                    [[clean|true]],
                                    []}}},
                              undefined},
                          undefined}},
                  {modstate,
                      {state,
                          913438523331814323877303020447676887284957839360,
                          {fitting_details,
                              {fitting,<0.21083.23>,#Ref<0.0.31.39954>,
                                  follow,1},
                              0,riak_kv_mrc_map,
                              {{jsfun,<<"Riak.mapValuesJson">>},none},
                              {fitting,<0.21081.23>,#Ref<0.0.31.39954>,sink,
                                  undefined},
                              [{log,sink},
                               {trace,[error]},
                               {sink,
                                   {fitting,<0.21081.23>,#Ref<0.0.31.39954>,
                                       sink,undefined}},
                               {sink_type,{fsm,10,infinity}}],
                              64},
                          {jsfun,<<"Riak.mapValuesJson">>},
                          none}},
                  {stack,[]}]}}},
        [{riak_kv_wm_mapred,pipe_mapred_nonchunked,3,
             [{file,"src/riak_kv_wm_mapred.erl"},{line,180}]},
         {webmachine_resource,resource_call,3,
             [{file,"src/webmachine_resource.erl"},{line,183}]},
         {webmachine_resource,do,3,
             [{file,"src/webmachine_resource.erl"},{line,141}]},
         {webmachine_decision_core,resource_call,1,
             [{file,"src/webmachine_decision_core.erl"},{line,48}]},
         {webmachine_decision_core,decision,1,
             [{file,"src/webmachine_decision_core.erl"},{line,481}]},
         {webmachine_decision_core,handle_request,2,
             [{file,"src/webmachine_decision_core.erl"},{line,33}]},
         {webmachine_mochiweb,loop,1,
             [{file,"src/webmachine_mochiweb.erl"},{line,97}]},
         {mochiweb_http,parse_headers,5,
             [{file,"src/mochiweb_http.erl"},{line,180}]}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine web server</ADDRESS></body></html>
        at com.basho.riak.client.query.MapReduce.execute(MapReduce.java:81)
        at models.UserRecordsModel$.getAllUsers(UserRecordsModel.scala:131)
        at controllers.DataRetrieval$$anonfun$getRegisteredUserData$1.apply(DataRetrieval.scala:42)
        at controllers.DataRetrieval$$anonfun$getRegisteredUserData$1.apply(DataRetrieval.scala:38)
        at play.api.mvc.ActionBuilder$$anonfun$apply$10.apply(Action.scala:221)
        at play.api.mvc.ActionBuilder$$anonfun$apply$10.apply(Action.scala:220)
        at securesocial.core.SecureSocial$SecuredActionBuilder$$anonfun$2$$anonfun$apply$1.apply(SecureSocial.scala:117)
        at securesocial.core.SecureSocial$SecuredActionBuilder$$anonfun$2$$anonfun$apply$1.apply(SecureSocial.scala:113)
        at scala.Option.map(Option.scala:145)
        at securesocial.core.SecureSocial$SecuredActionBuilder$$anonfun$2.apply(SecureSocial.scala:113)
        at securesocial.core.SecureSocial$SecuredActionBuilder$$anonfun$2.apply(SecureSocial.scala:112)
        at scala.Option.flatMap(Option.scala:170)
        at securesocial.core.SecureSocial$SecuredActionBuilder.invokeSecuredBlock(SecureSocial.scala:112)
        at securesocial.core.SecureSocial$SecuredActionBuilder.invokeBlock(SecureSocial.scala:146)
        at play.api.mvc.ActionBuilder$$anon$1.apply(Action.scala:309)
        at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:109)
        at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:109)
        at play.utils.Threads$.withContextClassLoader(Threads.scala:18)
        at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:108)
        at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:107)
        at scala.Option.map(Option.scala:145)
        at play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:107)
        at play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:100)
        at play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:481)
        at play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:481)
        at play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:517)
        at play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:517)
        at play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$13.apply(Iteratee.scala:493)
        at play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$13.apply(Iteratee.scala:493)
        at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
        at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
        at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:42)
        at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.io.IOException: <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,
    {error,
        {case_clause,
            {error,
                {0,
                 [{module,riak_kv_mrc_map},
                  {partition,913438523331814323877303020447676887284957839360},
                  {details,
                      [{fitting,
                           {fitting,<0.21083.23>,#Ref<0.0.31.39954>,follow,1}},
                       {name,0},
                       {module,riak_kv_mrc_map},
                       {arg,{{jsfun,<<"Riak.mapValuesJson">>},none}},
                       {output,
                           {fitting,<0.21081.23>,#Ref<0.0.31.39954>,sink,
                               undefined}},
                       {options,
                           [{log,sink},
                            {trace,[error]},
                            {sink,
                                {fitting,<0.21081.23>,#Ref<0.0.31.39954>,
                                    sink,undefined}},
                            {sink_type,{fsm,10,infinity}}]},
                       {q_limit,64}]},
                  {type,forward_preflist},
                  {error,[preflist_exhausted]},
                  {input,
                      {ok,{r_object,<<"xxxx-users">>,
                              <<"xxxx@hotmail.com-userpass">>,
                              [{r_content,
                                   {dict,7,16,16,8,80,48,
                                       {[],[],[],[],[],[],[],[],[],[],[],[],
                                        [],[],[],[]},
                                       {{[],[],
                                         [[<<"Links">>]],
                                         [],[],[],[],[],[],[],
                                         [[<<"content-type">>,97,112,112,108,
                                           105,99,97,116,105,111,110,47,106,
                                           115,111,110],
                                          [<<"X-Riak-VTag">>,54,98,119,73,73,
                                           84,107,120,66,70,107,86,102,67,103,
                                           71,73,116,120,121,85,53]],
                                         [[<<"index">>]],
                                         [],
                                         [[<<"X-Riak-Last-Modified">>|
                                           {1407,514685,380030}]],
                                         [],
                                         [[<<"charset">>,117,116,102,45,56],
                                          [<<"X-Riak-Meta">>]]}}},
                                   <<"{\"identityId\":{\"userId\":\"xxxx@hotmail.com\",\"providerId\":\"userpass\"},\"firstName\":\"xx\",\"lastName\":\"xx\",\"fullName\":\"xx xx\",\"email\":\"xxxx@hotmail.com\",\"authMethod\":{\"method\":\"userPassword\"},\"passwordInfo\":{\"hasher\":\"bcrypt\",\"password\":\"$2a$10$Gm1VVCM09iyI7TQY7r8B7.Baa.YrtHHgREkQpTIH9ThyW4WzuUeJ.\"}}">>}],
                              [{<<35,9,254,249,83,228,76,146>>,
                                {1,63574733885}}],
                              {dict,1,16,16,8,80,48,
                                  {[],[],[],[],[],[],[],[],[],[],[],[],[],[],
                                   [],[]},
                                  {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],
                                    [[clean|true]],
                                    []}}},
                              undefined},
                          undefined}},
                  {modstate,
                      {state,
                          913438523331814323877303020447676887284957839360,
                          {fitting_details,
                              {fitting,<0.21083.23>,#Ref<0.0.31.39954>,
                                  follow,1},
                              0,riak_kv_mrc_map,
                              {{jsfun,<<"Riak.mapValuesJson">>},none},
                              {fitting,<0.21081.23>,#Ref<0.0.31.39954>,sink,
                                  undefined},
                              [{log,sink},
                               {trace,[error]},
                               {sink,
                                   {fitting,<0.21081.23>,#Ref<0.0.31.39954>,
                                       sink,undefined}},
                               {sink_type,{fsm,10,infinity}}],
                              64},
                          {jsfun,<<"Riak.mapValuesJson">>},
                          none}},
                  {stack,[]}]}}},
        [{riak_kv_wm_mapred,pipe_mapred_nonchunked,3,
             [{file,"src/riak_kv_wm_mapred.erl"},{line,180}]},
         {webmachine_resource,resource_call,3,
             [{file,"src/webmachine_resource.erl"},{line,183}]},
         {webmachine_resource,do,3,
             [{file,"src/webmachine_resource.erl"},{line,141}]},
         {webmachine_decision_core,resource_call,1,
             [{file,"src/webmachine_decision_core.erl"},{line,48}]},
         {webmachine_decision_core,decision,1,
             [{file,"src/webmachine_decision_core.erl"},{line,481}]},
         {webmachine_decision_core,handle_request,2,
             [{file,"src/webmachine_decision_core.erl"},{line,33}]},
         {webmachine_mochiweb,loop,1,
             [{file,"src/webmachine_mochiweb.erl"},{line,97}]},
         {mochiweb_http,parse_headers,5,
             [{file,"src/mochiweb_http.erl"},{line,180}]}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine web server</ADDRESS></body></html>
        at com.basho.riak.client.raw.http.ConversionUtil.convert(ConversionUtil.java:589)
        at com.basho.riak.client.raw.http.HTTPClientAdapter.mapReduce(HTTPClientAdapter.java:386)
        at com.basho.riak.client.query.MapReduce.execute(MapReduce.java:79)
        ... 36 more

回答1:


The stack trace is telling us that there was a case clause exception at line 180 of the fie riak_kv_wm_mapred.erl

The clause at that line is handling the responses for the pipe processing the map phase, which appears to be returning the error preflist_exhausted, which is not explicitly handled by the case statement.

That error usually indicates that one or more vnodes were overloaded or otherwise unavailable, and fallbacks had not yet started to take over their workload.

The affected partition was 913438523331814323877303020447676887284957839360, the console.log and error.log may have further details about what happened.



来源:https://stackoverflow.com/questions/25277718/how-to-understand-this-riak-stacktrace

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!