2016-08-29 4 views
1

하나의 서버에 2 개의 keymanager 노드, 2 개의 pub-store 노드, 1 개의 게이트웨이 관리자 노드 및 2 개의 게이트웨이 작업자 노드를 배치하고로드 균형을 위해 nginx를 배포했습니다. 내가 응용 프로그램 액세스 토큰을 생성 할 때이 오류가 아래에보고 :WSO2 APIM 2.0 액세스 토큰을 생성 할 때 클러스터링 배포 문제

2016-08-29 03:10:59,558 [-] [http-nio-9443-exec-5] ERROR subscription-add:jag org.jaggeryjs.scriptengine.exceptions.ScriptException: Error while obtaining the application access token for the application:DefaultApplication 
2016-08-29 03:29:37,439 [-] [http-nio-9443-exec-45] ERROR AMDefaultKeyManagerImpl Error while creating tokens - sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) 
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) 
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) 
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) 
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509) 
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) 
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) 
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) 
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) 
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) 
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) 
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) 
    at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:533) 
    at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:401) 
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:178) 
    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) 
    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131) 
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610) 
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445) 
    at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863) 
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) 
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106) 
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) 
    at org.wso2.carbon.apimgt.impl.AMDefaultKeyManagerImpl.getNewApplicationAccessToken(AMDefaultKeyManagerImpl.java:360) 
    at org.wso2.carbon.apimgt.impl.APIConsumerImpl.renewAccessToken(APIConsumerImpl.java:867) 
    at org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.renewAccessToken(UserAwareAPIConsumer.java:36) 
    at org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_refreshToken(APIStoreHostObject.java:4120) 
... 
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387) 
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) 
    at sun.security.validator.Validator.validate(Validator.java:260) 
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) 
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) 
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) 
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491) 
    ... 90 more 
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
    at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) 
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) 
    at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) 
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382) 

과 술집 매장 노드에서, 나는 키 확인을 위해 WSClient을 사용

<AuthManager> 
    <!-- Server URL of the Authentication service --> 
    <ServerURL>https://km.devzone.com/services/</ServerURL> 
    <!-- Admin username for the Authentication manager. --> 
    <Username>${admin.username}</Username> 
    <!-- Admin password for the Authentication manager. --> 
    <Password>${admin.password}</Password> 
    <!-- Indicates whether the permissions checking of the user (on the Publisher and Store) should be done 
     via a remote service. The check will be done on the local server when false. --> 
    <CheckPermissionsRemotely>false</CheckPermissionsRemotely> 
</AuthManager> 

가능한 설정 문제가 무엇

를 사용?

답변

0

이것은 상점 신뢰 저장소에 keymanger 인증서가 없을 때 발생합니다. 이 문제를 해결하려면 Keymanager 노드의 jks 파일에서 공용 인증서를 내 보낸 다음 저장소 노드의 client-truststore.jks으로 가져옵니다.

+0

인증서를 가져온 후 "TID : [-1234] [] [2016-08-29 05 : 19 : 07,759] 정보 {org.wso2.carbon.core.internal.permission.update.PermissionUpdater} - 임차인 용 권한 캐시가 업데이트되었습니다. -1234 {org.wso2.carbon.core.internal.permission.update.PermissionUpdater} TID : [-1234] [] [2016-08-29 05 : 19 : 19,471] ERROR {JAGGERY. site.blocks.subscription.subscription-add.ajax.subscription-add : jag} - java.lang.RuntimeException : 토큰 엔드 포인트를 호출하는 중 오류가 발생했습니다. HTTP 오류 코드 : 500 {JAGGERY.site.blocks.subscription.subscription-add. ajax.subscription - 추가 : 재규어} "저장 페이지에서 –

+0

내 가게 액세스 토큰 생성기"컬 -k -d "grant_type = 암호 및 사용자 이름 = 사용자 이름 및 암호 = 암호"-H "권한 부여 : 기본 VFVQeHFJTTlHWjNEX0wxNU9FdTFjbzNScTdFYTpxZHZqZnBzdGRtMU0yWU5lYTYxZlZTamFmTzhh"은 https : //api.devzone . cs.com/token "을 참조하십시오. 여기서 https://api.devzone.cs.com/은 내 게이트웨이 작업 노드의로드 균형 URL입니다. 그리고 pub-store의 로그에서 자세한 오류 로그를 찾을 수 없습니다. –

+0

커맨드 라인에서 커맨드를 실행할 때 커튼이 작동합니까? – Bee