有人可以帮我弄明白我的错吗?提前谢谢:)我试图在我的Mac OS X Yosemite上设置命令行工具(CLT)并收到错误消息。
我的问题似乎与下面链接中的问题类似,但不完全相同;我已经改变了#34; http"到" https"在安装CLT后的murk.properties文件中。
getBalance in Amazon Turk gives error
代码:这是我在终端中输入的内容(最初认为我的问题是Java位置):
$ export MTURK_CMD_HOME=/Applications/aws-mturk-clt-1.3.1
$ java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
$ which java
/usr/bin/java
$ export JAVA_HOME=/usr
$ cd /Applications/aws-mturk-clt-1.3.1/bin/
$ ./getBalance.sh
错误:这是我收到的错误消息的摘录
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
I/O exception (javax.net.ssl.SSLPeerUnverifiedException) caught when processing request: HTTPS hostname invalid: expected '176.32.98.23', received 'mechanicalturk.amazonaws.com'
Retrying request
I/O exception (javax.net.ssl.SSLPeerUnverifiedException) caught when processing request: HTTPS hostname invalid: expected '176.32.98.23', received 'mechanicalturk.amazonaws.com'
Retrying request
I/O exception (javax.net.ssl.SSLPeerUnverifiedException) caught when processing request: HTTPS hostname invalid: expected '176.32.98.23', received 'mechanicalturk.amazonaws.com'
Retrying request
An error occurred while fetching your balance: javax.net.ssl.SSLPeerUnverifiedException: HTTPS hostname invalid: expected '176.32.98.23', received 'mechanicalturk.amazonaws.com'
com.amazonaws.mturk.service.exception.InternalServiceException: javax.net.ssl.SSLPeerUnverifiedException: HTTPS hostname invalid: expected '176.32.98.23', received 'mechanicalturk.amazonaws.com'
at com.amazonaws.mturk.service.axis.AWSService.executeRequestMessage(AWSService.java:243)
at com.amazonaws.mturk.filter.FinalFilter.execute(FinalFilter.java:38)
at com.amazonaws.mturk.filter.Filter.passMessage(Filter.java:56)
at com.amazonaws.mturk.filter.ErrorProcessingFilter.execute(ErrorProcessingFilter.java:46)
at com.amazonaws.mturk.filter.Filter.passMessage(Filter.java:56)
at com.amazonaws.mturk.filter.RetryFilter.execute(RetryFilter.java:115)
at com.amazonaws.mturk.filter.Filter.passMessage(Filter.java:56)
at com.amazonaws.mturk.util.CLTExceptionFilter.sendMessage(CLTExceptionFilter.java:77)
at com.amazonaws.mturk.util.CLTExceptionFilter.execute(CLTExceptionFilter.java:62)
at com.amazonaws.mturk.service.axis.FilteredAWSService.executeRequests(FilteredAWSService.java:172)
at com.amazonaws.mturk.service.axis.FilteredAWSService.executeRequest(FilteredAWSService.java:152)
at com.amazonaws.mturk.service.axis.FilteredAWSService.executeRequest(FilteredAWSService.java:116)
at com.amazonaws.mturk.service.axis.RequesterServiceRaw.getAccountBalance(RequesterServiceRaw.java:1193)
at com.amazonaws.mturk.service.axis.RequesterService.getAccountBalance(RequesterService.java:922)
at com.amazonaws.mturk.cmd.GetBalance.getBalance(GetBalance.java:50)
at com.amazonaws.mturk.cmd.GetBalance.runCommand(GetBalance.java:41)
at com.amazonaws.mturk.cmd.AbstractCmd.run(AbstractCmd.java:148)
at com.amazonaws.mturk.cmd.GetBalance.main(GetBalance.java:28)
Caused by: javax.net.ssl.SSLPeerUnverifiedException: HTTPS hostname invalid: expected '176.32.98.23', received 'mechanicalturk.amazonaws.com'
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
mturk.properties文件
# -------------------
# ADVANCED PROPERTIES
# -------------------
#
# If you want to test your solution in the Amazon Mechanical Turk Developers Sandbox (http://sandbox.mturk.com)
# use the service_url defined below:
#service_url=https://mechanicalturk.sandbox.amazonaws.com/?Service=AWSMechanicalTurkRequester
# If you want to have your solution work against the Amazon Mechnical Turk Production site (http://www.mturk.com)
# use the service_url defined below:
SERVICE_URL = https://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester
# The settings below should only be modified under special circumstances.
# You should not need to adjust these values.
retriable_errors=Server.ServiceUnavailable,503
retry_attempts=6
retry_delay_millis=500'
答案 0 :(得分:0)
Guan,您是否尝试过使用早期版本的JDK(例如,JDK-1.5?)。我意识到它已经老了很多,但我很好奇它是否与在JDK 1.8上使用CLT有关。只是一个想法。
此外,如果我们能够看到turk.properties文件(请不要共享您的访问密钥或密钥),以确保端点格式正确,这将有所帮助。谢谢!