iOS上的ElasticBeanstalk Token Vending

时间:2013-05-10 16:21:37

标签: ios amazon-web-services amazon-s3 elastic-beanstalk

我在使用弹性beanstalk托管的匿名自动售货机时遇到了麻烦。情况是我正在使用AWS为iOS提供的代码,但是为密码生成的密钥生成uid /密钥获得了500秒。豆茎日志似乎相当稀疏​​,但显示了500,所以他们至少在说话。

这个空指针异常似乎是唯一的详细错误,虽然我不确定它指向的是什么问题。

May 10, 2013 4:10:48 PM com.amazonaws.tvm.GetTokenServlet processRequest
INFO: processing request
May 10, 2013 4:10:48 PM com.amazonaws.tvm.anonymous.AnonymousTokenVendingMachine validateTokenRequest
FINE: Timestamp [ 2013-05-10T16%3A10%3A48Z ] is valid
May 10, 2013 4:10:48 PM com.amazonaws.tvm.anonymous.AnonymousTokenVendingMachine validateTokenRequest
FINE: Signature matched!!!
May 10, 2013 4:10:48 PM com.amazonaws.tvm.TemporaryCredentialManagement getTemporaryCredentials
SEVERE: Exception during getTemporaryCredentials
java.lang.NullPointerException
    at java.util.regex.Matcher.appendReplacement(Matcher.java:712)
    at java.util.regex.Matcher.replaceAll(Matcher.java:823)
    at java.lang.String.replaceAll(String.java:2201)
    at com.amazonaws.tvm.TemporaryCredentialManagement.getPolicyObject(TemporaryCredentialManagement.java:56)
    at com.amazonaws.tvm.TemporaryCredentialManagement.getTemporaryCredentials(TemporaryCredentialManagement.java:42)
    at com.amazonaws.tvm.anonymous.AnonymousTokenVendingMachine.getToken(AnonymousTokenVendingMachine.java:88)
    at com.amazonaws.tvm.GetTokenServlet.processRequest(GetTokenServlet.java:48)
    at com.amazonaws.tvm.RootServlet.doGet(RootServlet.java:38)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)
May 10, 2013 4:10:48 PM com.amazonaws.tvm.GetTokenServlet processRequest
SEVERE: Error generating session credentials for UID : 6c6feea6848c6ca41c4a9e427896dba9
May 10, 2013 4:10:48 PM com.amazonaws.tvm.GetTokenServlet processRequest

1 个答案:

答案 0 :(得分:0)

我知道这是一个有点老问题。但是我在环境中运行TVM时遇到了同样的问题(Amazon beanstalk微实例)一旦我重新启动beanstalk实例,这个问题就解决了。但是为了确保您没有再次收到此错误,您必须确保用于访问TVM的IAM用户的用户策略被复制到已部署的TVM中的“TokenVendingMachinePolicy.json”文件中应用。有关详细信息,请参阅http://aws.amazon.com/code/8872061742402990