I have set up WSO2 API Manager and set up an API. Tried to invoke it via APIM console itself .But it says NO response from client.
I enabled log4j.logger.org.apache.synapse.transport.http.wire=DEBUG and found out the below error in the 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
Can someone please help?
As per the last comment, I believe your issue will be fixed by the answer given in Error while trying to connect to the endpoint. Cannot borrow client for ssl
Related
Using WSO2 EI 6.4.0 to send a SOAP message with wsp:Policy wsu:Id="SigOnly" works fine when the HTTP response code is 200. The signature is well checked and message flow can continue.
When the response is a SOAP fault with the response code 500, the initiating request sent to EI keeps hanging. The Send mediator doesn't receive any exception so I cannot handle it (what I would like to report it to the caller) in the sequence flow, even in a faultSequence. I just get this error in my logs: Caused by: org.apache.ws.security.WSSecurityException: The signature or decryption was invalid.
I really don't understand why - in this fault situation - the signature or decryption could be invalid while it is valid with non faulty SOAP responses. I don't see differences between the soap headers structure (fault vs. non-fault), it seems to me only the body is different:
<soapenv:Body wsu:Id="id-1-2b51dae55e169f7625472a2369df8671" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>Message bcd45e75-b778-4fe1-83fb-ea97e4015sss failed : VALI-0100 - Validation of request message failed : org.xml.sax.SAXParseException; cvc-enumeration-valid: Value 'Q1andQ2' is not facet-valid with respect to enumeration '[Q1, Q2, Q1+Q2, SO]'. It must be a value from the enumeration., org.xml.sax.SAXParseException; cvc-type.3.1.3: The value 'Q1andQ2' of element 'v21:codeQ' is not valid.
</faultstring>
<faultactor>
...
And the full exception:
[2021-02-09 17:37:01,216] [EI-Core] ERROR - AxisEngine The signature or decryption was invalid org.apache.axis2.AxisFault: The signature or decryption was invalid
at org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThrowAxisFault(RampartReceiver.java:194)
at org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:96)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:263)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.ws.security.WSSecurityException: The signature or decryption was invalid
at org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:703)
at org.apache.ws.security.processor.SignatureProcessor.handleToken(SignatureProcessor.java:124)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:332)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:249)
at org.apache.rampart.RampartEngine.process(RampartEngine.java:221)
at org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:93)
... 9 more
[2021-02-09 17:37:01,220] [EI-Core] ERROR - ClientWorker Fault processing response message through Axis2 org.apache.axis2.AxisFault: The signature or decryption was invalid
at org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThrowAxisFault(RampartReceiver.java:194)
at org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:96)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:263)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.ws.security.WSSecurityException: The signature or decryption was invalid
Any help should be appreciated to tell me what am I to do to be able to get the fault reported up to the mediator level so I could manage the flow.
This issue seems to be a bug in WSO2 EI 6.4.0. Please refer to issue #4155 for more details
I am configuring Apache DS user store in WSO2 3.0.0. All the user store configuration I have given in deployment.toml file. But while starting the server it is giving the below error. After searching that looks like this error is coming as is enable in api-manager.xml, but I am not able to disable it from deployment.toml. Can anyone help me with the configuration I should provide in deployment.toml to make it disabled. Also from the error log it seems like server is also searching for JMS but not enable. Please help me with this also. Error given below:
[2020-01-28 18:39:57,261] WARN - DataEndpointGroup No receiver is reachable at reconnection, will try to reconnect every 30 sec
[2020-01-28 18:39:57,263] INFO - DataBridge user admin connected
[2020-01-28 18:39:57,269] ERROR - AuthenticationServiceImpl Invalid User : admin
[2020-01-28 18:39:57,270] ERROR - DataEndpointConnectionWorker Error while trying to connect to the endpoint. Cannot borrow client for ssl://<local_machine_ip>:9711.
org.wso2.carbon.databridge.agent.exception.DataEndpointLoginException: Cannot borrow client for ssl://<local_machine_ip>:9711.
at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:145) ~[org.wso2.carbon.databridge.agent_5.2.12.jar:?]
at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.run(DataEndpointConnectionWorker.java:59) [org.wso2.carbon.databridge.agent_5.2.12.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_112]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_112]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]
Caused by: org.wso2.carbon.databridge.agent.exception.DataEndpointLoginException: Error while trying to login to data receiver :/<local_machine_ip>:9711
at org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint.login(BinaryDataEndpoint.java:50) ~[org.wso2.carbon.databridge.agent_5.2.12.jar:?]
at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:139) ~[org.wso2.carbon.databridge.agent_5.2.12.jar:?]
... 6 more
Caused by: org.wso2.carbon.databridge.commons.exception.AuthenticationException: org.wso2.carbon.identity.authentication.AuthenticationException: Invalid User : admin
at sun.reflect.GeneratedConstructorAccessor269.newInstance(Unknown Source) ~[?:?]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_112]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_112]
at org.wso2.carbon.databridge.agent.endpoint.binary.BinaryEventSender.processResponse(BinaryEventSender.java:163) ~[org.wso2.carbon.databridge.agent_5.2.12.jar:?]
at org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint.login(BinaryDataEndpoint.java:44) ~[org.wso2.carbon.databridge.agent_5.2.12.jar:?]
at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:139) ~[org.wso2.carbon.databridge.agent_5.2.12.jar:?]
... 6 more
Please Note: I am running WSO2 3.0.0 in local windows machine for POC.
Thanks,
Surodip
This is the configuration to disable data publishing to the traffic manager, and the JMS listener.
[apim.throttling]
enable_data_publishing = false
enable_decision_connection = false
I've been following this link from wso2 documentation in order to enable non blocking local transport for my project, but after restarting the server I'm unable to log in the management console.
In the console, I have the following error output:
[2017-04-18 11:55:56,039] [] INFO - HTTPSender Unable to sendViaPost to url[https://10.1.2.68:9443/services/AuthenticationAdmin]
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
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:649)
at org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.createSocket(TLSProtocolSocketFactory.java:193)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:659)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
...
Can anyone shed a light on what is wrong with my configuration? I have followed the doc instructions step by step.
There were some port issues in EI 600 and please use EI 610 [1]. It working properly with local transport scenario. And please use these documentations [2, 3] as EI having some directory changes.
[1]https://docs.wso2.com/display/EI610/About+this+Release
[2]https://docs.wso2.com/display/EI610/Local+Transport
[3]https://docs.wso2.com/display/EI610/Sample+268%3A+Proxy+Services+with+the+Local+Transport
I'm using WSO2 ESB and I created a custom proxy service with a WSDL. I defined the InSequence in line as a log mediator defined the endpoint as a Address endpoint and defined the OutSequence as Send mediator when I try the service I got this error:
<TryitProxyError xmlns:h="http://wso2.org/ns/TryitProxy" h:status="SOAP envelope error">org.apache.axis2.AxisFault: Transport error: 412 Error: Precondition Failed</TryitProxyError>
How can I fix this error please? I have no idea. Thanks :)
org.apache.axis2.AxisFault
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at consultardatosmaestros.CU677ConsultarDatosMaestrosServiceMessageReceiverInOut.fromOM(CU677ConsultarDatosMaestrosServiceMessageReceiverInOut.java:599)
at consultardatosmaestros.CU677ConsultarDatosMaestrosServiceMessageReceiverInOut.invokeBusinessLogic(CU677ConsultarDatosMaestrosServiceMessageReceiverInOut.java:44)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:403)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at consultardatosmaestros.CU677ConsultarDatosMaestrosServiceMessageReceiverInOut.fromOM(CU677ConsultarDatosMaestrosServiceMessageReceiverInOut.java:472)
We are trying to do a poc in wso2 esb to invoke our BE service which is ws-security enabled. We have setup a pass thru proxy in wso2 and configured the endpoint according to www.soasecurity.org. However, we keep getting the below error when trying to use the pass thru proxy. Please advise if we are doing anything wrong...
ERROR - Axis2Sender Unexpected error during sending message out
rg.apache.axis2.AxisFault: Unsupported SignedSupportingToken : "{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken"
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:76)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:426)
at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:185)
at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:481)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:57)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:342)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:329)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:173)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.apache.rampart.RampartException: Unsupported SignedSupportingToken : "{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken"
at org.apache.rampart.builder.TransportBindingBuilder.build(TransportBindingBuilder.java:103)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:140)
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
... 20 more
What is the security policy you are using to secure the BE service?
Seems like the ESB cannot understand the security policy that is being used for the BE service.
Follow the blog and you will be able to resolve your concern.
Manisha