简体   繁体   English

Android Amazon Web Services无法执行HTTP请求:sdb.amazonaws.com

[英]Android Amazon Web Services Unable to execute HTTP request: sdb.amazonaws.com

I have been getting the following errors when saving to the amazon SimpleDB. 保存到Amazon SimpleDB时出现以下错误。

My code (taken from amazon tutorial): 我的代码(摘自Amazon教程):

Account.getSimpleDB().createDomain(new CreateDomainRequest(Account.getDomain()));

The Account class methods (getSimpleDB() and getDomain() I've tested and work. The problem is most certainly taking place in the amazon methods of createDomain() or CreateDomainRequest() Account类方法(我已经测试并工作的getSimpleDB()和getDomain()。问题肯定是发生在createDomain()或CreateDomainRequest()的亚马逊方法中

The Errors: 错误:

01-30 13:35:54.645: E/AndroidRuntime(595): com.amazonaws.AmazonClientException: Unable to execute HTTP request: sdb.amazonaws.com
01-30 13:35:54.645: E/AndroidRuntime(595):  at com.amazonaws.http.AmazonHttpClient.executeHelper(Unknown Source)
01-30 13:35:54.645: E/AndroidRuntime(595):  at com.amazonaws.http.AmazonHttpClient.execute(Unknown Source)
01-30 13:35:54.645: E/AndroidRuntime(595):  at com.amazonaws.services.simpledb.AmazonSimpleDBClient.invoke(Unknown Source)
01-30 13:35:54.645: E/AndroidRuntime(595):  at com.amazonaws.services.simpledb.AmazonSimpleDBClient.createDomain(Unknown Source)
01-30 13:35:54.645: E/AndroidRuntime(595):  at com.zbien.pizza.Account.save(Account.java:72)
01-30 13:35:54.645: E/AndroidRuntime(595):  at com.zbien.pizza.Account$1.run(Account.java:231)
01-30 13:35:54.645: E/AndroidRuntime(595): Caused by: java.net.UnknownHostException: sdb.amazonaws.com
01-30 13:35:54.645: E/AndroidRuntime(595):  at java.net.InetAddress.lookupHostByName(InetAddress.java:497)
01-30 13:35:54.645: E/AndroidRuntime(595):  at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
01-30 13:35:54.645: E/AndroidRuntime(595):  at java.net.InetAddress.getAllByName(InetAddress.java:256)
01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359)
01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
01-30 13:35:54.645: E/AndroidRuntime(595):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
01-30 13:35:54.645: E/AndroidRuntime(595):  ... 6 more

What is very strange to me is that sometimes I run the code it works, but other times, it doesn't. 对我来说很奇怪的是,有时我运行的代码可以运行,但是有时却不能。 It seems maybe that if I change wireless networks then it stops working, though I am not sure about that theory. 似乎我更改了无线网络后,它却停止工作了,尽管我不确定该理论。 I have tested the code on my actual phone and never found an issue, but running it on my 2.3.3 emulator sometimes I get the following errors... but not always. 我已经在实际的电话上测试了代码,但从未发现问题,但是在2.3.3模拟器上运行它有时会出现以下错误……但并非总是如此。 Lastly, I do have the INTERNET android permission and I do currently have a working wireless connection. 最后,我确实具有INTERNET android权限,并且我目前具有正常的无线连接。

Any ideas? 有任何想法吗? Thanks in advance... 提前致谢...

In your client configuration, if your service is regional, I think you need to set the endpoint desired. 在您的客户端配置中,如果您的服务是区域性的,那么我认为您需要设置所需的端点。 Did you set the end point ? 您设定终点了吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 com.amazonaws.AmazonClientException:无法执行HTTP请求:对等方未通过身份验证 - com.amazonaws.AmazonClientException: Unable to execute HTTP request: peer not authenticated com.amazonaws.SdkClientException:无法执行 HTTP 请求:getSessionToken 中的 sts.amazonaws.com - com.amazonaws.SdkClientException : Unable to execute HTTP request: sts.amazonaws.com in GetSessionToken SQS Java 客户端异常 - com.amazonaws.SdkClientException:无法执行 HTTP 请求:权限被拒绝:连接 - SQS Java client exception - com.amazonaws.SdkClientException: Unable to execute HTTP request: Permission denied: connect Amazon Web Service DynamoDB错误com.amazonaws.auth.AWSCredentials - Amazon Web Service DynamoDB Error com.amazonaws.auth.AWSCredentials Web应用程序中的亚马逊AWS,InstantiationError:com.amazonaws.handlers.b - amazon AWS in web app, InstantiationError: com.amazonaws.handlers.b com.amazonaws.services.s3.model.AmazonS3Exception:Forbidden(Service:Amazon S3; Status Code:403; Error Code:403 Forbidden; Request ID:XXXXXXXX) - com.amazonaws.services.s3.model.AmazonS3Exception: Forbidden (Service: Amazon S3; Status Code: 403; Error Code: 403 Forbidden; Request ID: XXXXXXXX) 在 Amazon EMR 上使用 Hadoop / s3 “无法执行 HTTP 请求:管道损坏” - "Unable to execute HTTP Request: Broken Pipe" with Hadoop / s3 on Amazon EMR 无法初始化类com.amazonaws.services.sqs.AmazonSQSClient - Could not initialize class com.amazonaws.services.sqs.AmazonSQSClient 错误:包com.amazonaws.services.dynamodbv2不存在? - error: package com.amazonaws.services.dynamodbv2 does not exist? 错误ClassNotFoundException:com.amazonaws.services.s3.model.S3ObjectInputStream - Error ClassNotFoundException: com.amazonaws.services.s3.model.S3ObjectInputStream
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM