2016-12-28 121 views
0

我已經設置了WSO2 API Manager並設置了一個API。試圖通過APIM console本身調用它,但它表示沒有來自客戶的迴應。WSO2 APIM API調用錯誤

我啓用了log4j.logger.org.apache.synapse.transport.http.wire=DEBUG並在wso2-apigw-errors.log中發現了以下錯誤。

2016-12-28 17:10:08,725 [-] [DataBridge-ConnectionService-tcp://192.168.1.33:9620-pool-7-thread-1] ERROR DataEndpointConnectionWorker Error while opening socket to 192.168.1.33:9720. Connection refused: connect 
org.wso2.carbon.databridge.agent.exception.DataEndpointException: Error while opening socket to 192.168.1.33:9720. Connection refused: connect 
    at org.wso2.carbon.databridge.agent.endpoint.binary.BinarySecureClientPoolFactory.createClient(BinarySecureClientPoolFactory.java:58) 
    at org.wso2.carbon.databridge.agent.client.AbstractClientPoolFactory.makeObject(AbstractClientPoolFactory.java:39) 
    at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1212) 
    at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:92) 
    at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.run(DataEndpointConnectionWorker.java:43) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 
Caused by: java.net.ConnectException: Connection refused: connect 
    at java.net.DualStackPlainSocketImpl.connect0(Native Method) 
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) 
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) 
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) 
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) 
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) 
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 
    at java.net.Socket.connect(Socket.java:589) 
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:656) 
    at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:415) 
    at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88) 
    at org.wso2.carbon.databridge.agent.endpoint.binary.BinarySecureClientPoolFactory.createClient(BinarySecureClientPoolFactory.java:53) 
    ... 9 more 
2016-12-28 17:10:08,725 [-] [DataBridge-ConnectionService-tcp://192.168.1.33:9620-pool-7-thread-1] ERROR DataEndpointConnectionWorker Error while trying to connect to the endpoint. Cannot borrow client for ssl://192.168.1.33:9720 
org.wso2.carbon.databridge.agent.exception.DataEndpointAuthenticationException: Cannot borrow client for ssl://192.168.1.33:9720 
    at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:100) 
    at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.run(DataEndpointConnectionWorker.java:43) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 
Caused by: org.wso2.carbon.databridge.agent.exception.DataEndpointException: Error while opening socket to 192.168.1.33:9720. Connection refused: connect 
    at org.wso2.carbon.databridge.agent.endpoint.binary.BinarySecureClientPoolFactory.createClient(BinarySecureClientPoolFactory.java:58) 
    at org.wso2.carbon.databridge.agent.client.AbstractClientPoolFactory.makeObject(AbstractClientPoolFactory.java:39) 
    at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1212) 
    at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:92) 
    ... 6 more 

有人可以幫忙嗎?

+0

給出的答案是固定連接日誌,是關係到數據發佈者的東西。如果您啓用了連線日誌請求並且回覆將打印爲博客http://mytecheye.blogspot.com/2013/09/wso2-esb-all-about-wire-logs.html – Jenananthan

+0

您可以請問什麼是日誌文件名稱? – Jocket

+0

我看到的主要錯誤信息是 TID:[-1] [] [2016-12-28 22:14:14,246]錯誤{org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker} - 嘗試連接到端點。不能借用客戶端SSL://192.168.1.36:9711 {} org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker org.wso2.carbon.databridge.agent.exception.DataEndpointAuthenticationException:不能借客戶端SSL:/ /192.168.1.36:9711 – Jocket

回答

0

按照最後的評論,我相信您的問題將通過Error while trying to connect to the endpoint. Cannot borrow client for ssl

+0

我現在沒有錯誤..但我得到的響應機構爲空... 理想情況下,服務應該返回一個JSON .. 響應正文 無內容 – Jocket

+0

我會檢查這個我自己..我想想一些參數,我必須添加和驗證.. – Jocket

+0

如果捲曲的作品,但API控制檯不,它可以是一個證書問題。將URL複製到瀏覽器並接受證書。然後在API控制檯中再次嘗試。 – Bee