gpt4 book ai didi

java - 尝试访问 AWS 服务时出现不支持的记录版本 Unknown-0.0 异常

转载 作者:行者123 更新时间:2023-12-01 17:23:05 27 4
gpt4 key购买 nike

在尝试访问一项 AWS 服务时,我收到以下证书错误。我在 Jetty 服务器上运行它。

我使用相同的设置创建了另一个 hello world 项目,它看起来工作正常吗?

为什么我会突然收到 - javax.net.ssl.SSLException: Unsupported record version Unknown-0.0 异常?

[java] software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: Unsupported record version Unknown-0.0
[java] at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:97)
[java] at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.handleThrownException(RetryableStage.java:136)
[java] at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.execute(RetryableStage.java:94)
[java] at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:62)
[java] at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:42)
[java] at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
[java] at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:57)
[java] at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:37)
[java] at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.executeWithTimer(ApiCallTimeoutTrackingStage.java:80)
[java] at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:60)
[java] at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:42)
[java] at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
[java] at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
[java] at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37)
[java] at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:26)
[java] at software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:240)
[java] at software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:96)
[java] at software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:120)
[java] at software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:73)
[java] at software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:44)
[java] at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:55)
[java] at software.amazon.codeguruprofilerjavaagent.sdkclientcopy.DefaultCodeGuruProfilerClient.configureAgent(DefaultCodeGuruProfilerClient.java:137)
[java] at software.amazon.codeguruprofilerjavaagent.CodeGuruProfilerSDKClient.configureAgent(CodeGuruProfilerSDKClient.java:55)
[java] at software.amazon.codeguruprofilerjavaagent.ProfilingCommand.refreshConfiguration(ProfilingCommand.java:246)
[java] at software.amazon.codeguruprofilerjavaagent.ProfilingCommand.runProfiler(ProfilingCommand.java:210)
[java] at software.amazon.codeguruprofilerjavaagent.Timer.time(Timer.java:69)
[java] at software.amazon.codeguruprofilerjavaagent.ProfilingCommand.run(ProfilingCommand.java:195)
[java] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[java] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
[java] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[java] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[java] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[java] at java.lang.Thread.run(Thread.java:748)
[java] Caused by: javax.net.ssl.SSLException: Unsupported record version Unknown-0.0
[java] at sun.security.ssl.InputRecord.checkRecordVersion(InputRecord.java:552)
[java] at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:565)
[java] at sun.security.ssl.InputRecord.read(InputRecord.java:529)
[java] at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
[java] at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
[java] at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
[java] at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
[java] at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396)
[java] at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355)
[java] at software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory.connectSocket(SdkTlsSocketFactory.java:113)
[java] at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
[java] at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

最佳答案

事实证明这是在我们的代码库中设置的,删除它解决了问题

System.setProperty("jsse.enableSNIExtension", "false")

把这行去掉就可以了。

关于java - 尝试访问 AWS 服务时出现不支持的记录版本 Unknown-0.0 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61255371/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com