WSO2 enterprise integrator 6.6.0 connection - close wait - wso2

I use wso2 enterprise integrator 6.6.0 on linux and i have problem when client(SAP) call https simple saop proxy service on ei( with header connection:close)
the processing will be successful and the client will receive a response with http status 200 but the connection is not close.
I see a lot of connections in the close_wait state on linux( netstat | grep CLOSE_WAIT)
CLOSE_WAIT its problem on server(wso2) and only solution is restart wso2 ei.
thanks

Inside of the in sequence you could drop that header using the header mediator.
<header name=”connection:close” scope="transport" action="remove"/>

Related

Is it possible to monitor/track the connection pooling from WSO2 server

We have recently changed the ldap connection to secured for WSO2 EI 6.4.0 integration and broker profiles.
The following are the configurations made in user-mgmt.xml file.
<UserStoreManager class="org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager">
<Property name="TenantManager">org.wso2.carbon.user.core.tenant.CommonHybridLDAPTenantManager</Property>
<Property name="ConnectionURL">ldaps://{URL}:636 </Property>
...
<Property name="ConnectionPoolingEnabled">true</Property>
wso2 integrator and broker profiles are configured as windows services using yajsw and so to enable connection pooling ,added a new configuration in wrapper.config file and restarted the service.
wrapper.java.additional.41 = -Dcom.sun.jndi.ldap.connect.pool.protocol=ssl
However,IT team found that the number of connection is high and looks like connection pooling is not working.
Is it possible to monitor/track the ldaps traffic from WSO2 server ?
In order to apply the connection pooling could you please try to add the following in the startup script (in the wrapper file)
ldap.connect.pool.maxsize=20

how does the http to websocket communication works in wso2 esb

how does the HTTP to web socket communication works in wso2 ESB. Is that a fire and forgot model or once it'll connect to backend(socket server) and it will keep receiving the data.

Unable to set the User-Agent as transport Header in WSO2 EI 6.1

I am trying to invoke an external REST service from WSO2 EI 6.1.
This REST service needs the transport header User-Agent to be set.
I used the below code to set the transport value but looks like WSO2 does not recognize it.
<header name="User-Agent" scope="transport" value="3PPUser/5.0/1.0"/>
I even tried changing the http.user.agent.preserve to true at passthru-http.properties, but no successs.
Not sure if I am missing something. Please help!
Thanks in advance !!

Capturing WSO2 DSS Service Errors in WSO2 ESB Proxy Service

Good Day!
I have a WSO2 ESB proxy service which is calling WSO2 DSS Service. It is inserting the data to mysql table. it is working as expected. but if there is any issue in the DSS Service, I am getting faults with different soap response formats. like
if the service is inactive or stopped, then getting response like
<soapenv:Body><soapenv:Reason xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">.......
if the service is facing issue while inserting the data, then getting response like
<soapenv:Body><axis2ns134:DataServiceFault xmlns:axis2ns134="http://ws.wso2.org/dataservice"><axis2ns134:current_params......
and some other cases getting different responses.
but is ESB, those errors are not capturing and not firing "faultsequence" even I explicitly set the below property
<property name="FORCE_ERROR_ON_SOAP_FAULT" value="true" scope="default" type="STRING"/>
Can you please guide me how to handle/catch those errors in ESB Proxy?
Thanks,
Vinoth
see if this documentation helps you.
https://docs.wso2.com/display/ESB490/Fault+Mediator
https://docs.wso2.com/display/ESB490/Error+Handling
Att;
Vitor Darela

WSO2 ESB Proxy to WSO2 IS RemoteUserStoreManagerService

I want to proxy RemoteUserStoreManagerService (exposed on WSO2 IS) over WSO2 ESB.
When I call getUserClaimValuesForClaims operation I get the response. I tested the WSO2 IS (connected to my Active Directory) for performance. I sent requests in 100 threads (each thread with 250ms delay) and it gave me an average response of 250ms (which is ok for me).
So I proxied the getUserClaimValuesForClaims operation using the Transformation proxy and it also worked. But during the performace testing (with the same or smaller load) I have got following errors and not all the messages have returned (on average 1 of 100 messages).
[2014-01-06 19:28:21,047] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:d2b85c03-beaf-409b-bf39-2e8143bd9e0b, Direction: response
[2014-01-06 19:28:38,441] ERROR - SourceHandler I/O error: An established connection was aborted by the software in your host machine
java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:202)
at sun.nio.ch.IOUtil.read(IOUtil.java:175)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:243)
at org.apache.http.nio.reactor.ssl.SSLIOSession.receiveEncryptedData(SSLIOSession.java:348)
at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:376)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady
[2014-01-06 19:29:14,051] WARN - TargetHandler http-outgoing-66: Connection time out while in state: REQUEST_DONE
[2014-01-06 19:29:14,061] WARN - EndpointContext Endpoint : AnonymousEndpoint will be marked SUSPENDED as it failed
[2014-01-06 19:29:15,041] WARN - EndpointContext Suspending endpoint : AnonymousEndpoint - last suspend duration was : 30000ms and current suspend duration is : 30000ms - Next retry after : Mon
[2014-01-06 19:29:14,451] WARN - SourceHandler Connection time out after request is read: http-incoming-57
I thing that it says, it timeouts on backend; but I get the response logged in faultSeuence.
I noticed that the problem is caused by the XSLT mediator in proxy implementation, because when I removed the xslt mediators the log is empty. I tried xquery and it was the same. Even the log mediator in outSequence causes this issues.
Here is my final Proxy.
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="GetUserProxy" transports="https http" startOnLoad="true" trace="disable">
<target>
<endpoint>
<address uri="https://localhost:9443/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap12Endpoint/"/>
</endpoint>
<inSequence/>
<outSequence>
<log/>
<send/>
</outSequence>
<faultSequence/>
</target>
</proxy>
When I remove the log mediator, the WARN messages disapears from log and ALL response messages are returned to SoapUI.
Could anybody tell me why it behaves this way?
Thank you very much.
David
RemoteUserStoreManagerService is an admin service. Therefore, you need to send Identity Server's user name/password in a basic authentication header or session cookie. I can not see setting of authorization headers in your proxy configuration such as following
<property expression="fn:concat('Basic ', base64Encode('username:password'))" name="Authorization" scope="transport"></property>
More details would be here. Also you need to create a message body to send to the "RemoteUserStoreManagerService" and read the response messages. These must be implemented using ESB configuration. However, you can write an custom ESB mediator to do this also. Sample java code to call this service can be found here. You can find the detail on writing custom mediator from here
We have figured out, that the problem is probably more general and doesn't relate only to WSO2 IS, because we have the same problem when similating the WSO2 IS service as SoapUI mock.
The problem is probably in HTTP-passthru transport in axis configuration, because when we switched to HTTP-NIO the problem disapears and it is even faster.
There is a post about performance tunnig that helped us.
Howevever, I would like to know what transport we should use in production or where the problem is. Because now it seems that we cannot use HTTP-passthru transport for production environment.
Is anyone experiencing this problem?
what are the versions of ESB and IS your working with..?
try to restart the ESB and call the Service again. Do remember call to Identity server is a secure call.