Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javax.net.ssl.SSLException-java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty #244

Open
ChenGuop opened this issue Dec 24, 2024 · 0 comments

Comments

@ChenGuop
Copy link

ChenGuop commented Dec 24, 2024

人脸搜索异常-服务是通过docker 部署的:
Dockerfile:

FROM openjdk:8-jre-alpine
MAINTAINER ChenGuop
VOLUME /tmp
ADD *-1.0.0-SNAPSHOT.jar /app.jar
RUN sh -c 'touch /app.jar'
#ENV TZ=Asia/Shanghai
#镜像构建时间
RUN echo $(date) > /image_built_at

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
#EXPOSE 4030

ENTRYPOINT ["java","-XX:+UnlockExperimentalVMOptions","-XX:+UseCGroupMemoryLimitForHeap","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]

sdk pom

        <dependency>
            <groupId>com.tencentcloudapi</groupId>
            <artifactId>tencentcloud-sdk-java</artifactId>
            <version>3.0.70</version>
        </dependency>

重新构建镜像后就正常了,但是过段时间又会出现异常:
2024-12-24 08:42:15.768 ERROR 1 --- [nio-8356-exec-4] com.anzhong.common.face.CreateGroup : 人脸搜索

com.tencentcloudapi.common.exception.TencentCloudSDKException: javax.net.ssl.SSLException-java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at com.tencentcloudapi.common.http.HttpConnection.doRequest(HttpConnection.java:52) ~[tencentcloud-sdk-java-3.0.70.jar!/:na]
at com.tencentcloudapi.common.http.HttpConnection.postRequest(HttpConnection.java:98) ~[tencentcloud-sdk-java-3.0.70.jar!/:na]
at com.tencentcloudapi.common.AbstractClient.doRequest(AbstractClient.java:313) ~[tencentcloud-sdk-java-3.0.70.jar!/:na]
at com.tencentcloudapi.common.AbstractClient.internalRequest(AbstractClient.java:269) ~[tencentcloud-sdk-java-3.0.70.jar!/:na]
at com.tencentcloudapi.iai.v20180301.IaiClient.SearchFaces(IaiClient.java:447) ~[tencentcloud-sdk-java-3.0.70.jar!/:na]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant