App Engine – 在/ _ah / openid_verify上发生间歇性500错误

使用Google openidlogin我的应用程序时,出现间歇性错误。

他们发送的链接是http://www.example.com/_ah/login_redir?claimid=www.google.com/accounts/o8/id&continue=http://www.example.com/login2?returl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8

然后当他们授予访问我的应用程序,有时有一个500错误的url: http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343 : http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343 continue= http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343 : http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343 returl% http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343 http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343

500错误甚至不出现在我的日志中。 这似乎发生了约5-10%的login。

对于错误500意味着 – 找不到页面/ ID /密码

同样,您需要再次使用openID进行检查,或者仅为相同的testing目的创build一个Google ID

在你的service()方法中,通过包装你的doGet()来捕获和输出exception,如下所示:

 . . . try { doGet(request,response); } catch (Throwable e) { writer.println("<pre>"); e.printStackTrace(writer); writer.println("</pre>"); } . . . 

看到我的答案在这里: https : //stackoverflow.com/a/21083255/1615845

此处有缺陷: https : //code.google.com/p/googleappengine/issues/detail? id = 3589