Peer not authenticated exception while consuming https REST service

為{幸葍}努か 提交于 2019-12-12 06:24:26

问题


I have created REST services using RESTEasy and generated certificate using openssl and configured with https from this JBoss link. When I try to consume the service like this,

ClientRequest request = new ClientRequest("https://localhost:8443/services/users");
request.accept(MediaType.APPLICATION_XML);
ClientResponse<Result> response = request.post(Status.class);

I got "Peer not authenticated" exception. In google I saw this error and people suggested to use Apache Http Client. But I am using RESTeasy client to consume the service. How I can avoid this error?


回答1:


The Nexus OSS behavior was inconsistent. First I thought this is due to permission settings. So I ran the tomcat as Admin, but still got the same error. Spent lots of time and no clue. Moved to use Archiva for maven repo. Dont take me wrong, Nexus OSS UI is much much better than Archiva. But Archiva is working without any problem.

After 6 months again tried to setup Nexus OSS with new version. Still same error. This is something how Nexus OSS connects to internet. Finally changed the Nexus OSS network connection settings. Configured the proxy & NTLM authentication. After that it is working fine.

Still its a mistery why nexus oss didnt work with default configuration while archiva works.



来源:https://stackoverflow.com/questions/11629698/peer-not-authenticated-exception-while-consuming-https-rest-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!