I use WSO2 ESB 4.7.0 and WSO2 BAM 2.4.0. And I use same server for them. when I made loading test for 200 concurrent thread, ESB unreachable state.
I use http-nio
<transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
<parameter name="port" locked="false">8280</parameter>
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor</parameter>
</transportReceiver>
for ESB Level Performance settings
# HTTP Sender thread pool parameters
snd_t_core=450
snd_t_max=500
snd_alive_sec=5
snd_qlen=-1
snd_io_threads=4
# HTTP Listener thread pool parameters
lst_t_core=450
lst_t_max=500
lst_alive_sec=5
lst_qlen=-1
lst_io_threads=4
is there a problem performance settings? or problem OS Level?
Related
When sending from ESB 4.9.0 API to RabbitMQ with this transport string:
<send>
<endpoint>
<address name="scalehouse_001_rabbitmq" trace="enable" uri="rabbitmq:/ScaleHouses?rabbitmq.server.host.name=localhost&rabbitmq.server.port=5672&rabbitmq.server.user.name=guest&rabbitmq.server.password=guest&rabbitmq.queue.name=scalehouse_001"/>
</endpoint>
</send>
I get this error:
java.lang.NullPointerException at org.apache.axis2.transport.rabbitmq.RabbitMQMessage.<init>(RabbitMQMessage.java:43) at org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendOverAMQP(RabbitMQSender.java:84) at org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendMessage(RabbitMQSender.java:72) at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) 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:542) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:79)
Does anyone have experience with RabbitMQ transport, and can provide insight into potential causes?
I think the issue is in your axis2.xml configuration. Please follow the below steps.
under the transport receivers section in axis2.xml, find the rabbitmq transport receiver and replace it with your configuration. A sample configuration is given here to help you.
<transportReceiver name="rabbitmq" class="org.apache.axis2.transport.rabbitmq.RabbitMQListener">
<parameter name="AMQPConnectionFactory" locked="false">
<parameter name="rabbitmq.server.host.name" locked="false">localhost</parameter>
<parameter name="rabbitmq.server.port" locked="false">5672</parameter>
<parameter name="rabbitmq.server.user.name" locked="false">guest</parameter>
<parameter name="rabbitmq.server.password" locked="false">guest</parameter>
<parameter name="rabbitmq.connection.retry.interval" locked="false">10000</parameter>
<parameter name="rabbitmq.connection.retry.count" locked="false">5</parameter>
</parameter>
</transportReceiver>
From above configuration WSO2 ESB can act as a RabbitMQ consumer. Then locate the transport sender element in axis2.xml for the rabbitmq and uncomment it. A sample configuration for rabbitmq sender is given below.
<transportSender name="rabbitmq" class="org.apache.axis2.transport.rabbitmq.RabbitMQSender"/>
After applying this line of code, WSO2 ESB can act as a RabbitMQ producer where it can produce messages to a given RabbitMQ queue or topic.
For more on this you can find here.
http://ravindraranwala.blogspot.com/2015/09/rabbitmq-transport-in-wso2-esb.html
Hi Followed the blog mentioned in SMS Transport sender in wso2 ESB and configured axis2.xml for transportSender and transportReceiver. I am able to send a message from ESB to SMPP simulator but I am unable to receive message from SMPP simulator to ESB.
In the SMPP Simulator, I tried by adding bot 't'/'r' to enable transmitter/receiver and also tried by giving tr assuming that it is for tranceiver in users.txt but still I am unable to get a response in ESB.
Could you please help in implementing SMPP -> ESB scenario. Any link that describes this procedure also helpful for me. ( I am unable to find such)
I am editing this to make my scenario more clear
My simulator is opensmpp-sim. I added the user details in user.txt as
name=esb
password=esb
timeout=unlimited
bound=t,r
I executed the simulator with port 2775.
In ESB, axis2.xml I gave the following configurations
Transport Receiver
<transportReceiver name="sms" class="org.apache.axis2.transport.sms.SMSMessageReciever">
<parameter name="systemType">cp</parameter>
<parameter name="systemId">esb</parameter>
<parameter name="password">esb</parameter>
<parameter name="host">192.168.0.2</parameter>
<parameter name="port">2775</parameter>
<parameter name="phoneNumber">94777179968</parameter>
</transportReceiver>
Transport Sender
<transportSender name="sms" class="org.apache.axis2.transport.sms.SMSSender">
<parameter name="systemType">cp</parameter>
<parameter name="systemId">esb</parameter>
<parameter name="password">esb</parameter>
<parameter name="host">127.0.0.1</parameter>
<parameter name="port">2775</parameter>
</transportSender>
Note: 192.168.0.2 = 127.0.0.1 = localhost
Scenarios
1. Sending a message from ESME (ESB) to SMSC (Simulator)
Sequence
<sequence xmlns="http://ws.apache.org/ns/synapse" name="TEST_SMS">
<send>
<endpoint key="SMSC"/>
</send>
</sequence>
Endpoint
sms://94777179968
I exposed this sequence as a REST API. When I send a message, the message reached Simulator but there is no response in return.
2. Sending a message from SMSC (Simulator) to ESMC (ESB)
From simulator when I send message, it reaches ESB. In debug mode the message is printed in ESB log. But I am unable to handle it. How can I configure proxy service/ sequence to get that message. My goal is to get that message and initiate a process.
Thanks in advance.
I have a service described with this WSDL. When its operation createService is invoked with this request everything is fine. For this service a proxy service has been made on WSO2 ESB 4.6.0. Here is WSDL generated by ESB for the proxy service. When I try to send the same request to the proxy service with soapUI the following error occurs:
The endpoint reference (EPR) for the Operation not found is
/services/test.testHttpSoap11Endpoint and the WSA Action = . If this
EPR was previously reachable, please contact the server administrator.
Sending this request's body with ESB's proxy service testing tool I have no problem. I think it's because this tool uses WS-Addressing to send it. The request is also sent smoothly with soapUI if endpoint URL is appended by ?createRequest. According to this article a cause of the problem is SOAPMessageBodyBasedDispatcher. For some reason it doesn't recognize target operation by QName of the first child of the SOAP body element. But I can't understand why SOAPMessageBodyBasedDispatcher screws up in my case. Any ideas?
The main difference among WSO2 ESB 4.6.0 and earlier versions is WSO2 ESB 4.6.0 enable Passthrough Transport (PTT) by default. PTT is used to achieve very high performance boost in WSO2 ESB you can find some numbers here http://wso2.org/library/articles/2013/01/esb-performance-65.
The main problem with your use case is it expect SOAPMessageBodyBasedDispatcher to dispatch operation name. SOAPMessageBodyBasedDispatcher build the message and use first child's local name for dispatching this operation is considered as very costly and hence for the moment not supported in PPT. For the time being you can send expected SOAPAction as a HTTP header to get rid of this issue. In this thread I have provided few other solutions Error accesing published WS proxy in WSO2 ESB 4.6: EPR not found
Changing httpGetProcessor won't help here you have to change transportSender and transportReceiver configuration. You can comment out existing PTT transportSender/transportReceiver and uncomment NHTTP transportSender/transportReceiver configurations on axis2.xml file.
This is what you have on ESB 4.6.0
<transportSender name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpSender">
<parameter name="non-blocking" locked="false">true</parameter>
</transportSender>
<transportReceiver name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpListener">
<parameter name="port" locked="false">8280</parameter>
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.PassThroughNHttpGetProcessor</parameter>
</transportReceiver>
What you need is
<transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
<parameter name="port" locked="false">8280</parameter>
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor</parameter>
<parameter name="disableRestServiceDispatching" locked="false">true</parameter>
</transportReceiver>
<transportSender name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
<parameter name="non-blocking" locked="false">true</parameter>
</transportSender>
I installed a fresh WSO2 ESB version 4.2.3 (last stable up to now) and I configured the JMS transport in the axis2.xml file as following:
<!-- Configuration for JBoss 4.2.2 GA MQ -->
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="SMSOUTQueueConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.jnp.interfaces.NamingContextFactory</parameter>
<parameter name="java.naming.factory.url.pkgs" locked="false">org.jboss.naming:org.jnp.interfaces</parameter>
<parameter name="java.naming.provider.url" locked="false">jnp://192.168.10.125:1100</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">ConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.Destination" locked="true">queue/SMSOUTQueue</parameter>
</parameter>
</transportReceiver>
Immediately after, during the startup an error has been found:
15:09:16,585 INFO [STDOUT] 15:09:16,585 ERROR [BaseUtils] JNDI lookup of name ConnectionFactory returned a org.jboss.mq.SpyConnectionFactory while a interface javax.jms.ConnectionFactory was expected
15:09:16,587 INFO [STDOUT] 15:09:16,585 ERROR [ListenerManager] Couldn't initialize the jmstransport listener
org.apache.axis2.transport.base.BaseTransportException: JNDI lookup of name ConnectionFactory returned a org.jboss.mq.SpyConnectionFactory while a interface javax.jms.ConnectionFactory was expected
at org.apache.axis2.transport.base.BaseUtils.handleException(BaseUtils.java:167)
at org.apache.axis2.transport.jms.JMSUtils.lookup(JMSUtils.java:522)
at org.apache.axis2.transport.jms.JMSConnectionFactory.<init>(JMSConnectionFactory.java:92)
at org.apache.axis2.transport.jms.JMSConnectionFactoryManager.loadConnectionFactoryDefinitions(JMSConnectionFactoryManager.java:58)
at org.apache.axis2.transport.jms.JMSConnectionFactoryManager.<init>(JMSConnectionFactoryManager.java:45)
at org.apache.axis2.transport.jms.JMSListener.doInit(JMSListener.java:58)
at org.apache.axis2.transport.base.AbstractTransportListenerEx.init(AbstractTransportListenerEx.java:62)
at org.apache.axis2.engine.ListenerManager.init(ListenerManager.java:84)
at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:386)
at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:273)
at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:117)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:916)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
I found a lot of posts where people say to remove the ...WEB-INF/lib/geronimo-jms_1.1_spec-1.1.0.wso2v1.jar, because otherwise synapse doesn't work with any external JMS broker (I found same answer also for Mule ESB), but for me this solution doesn't work.
The problem is very similar to this link.
Any help is very appreciated. Thanks a lot in advance.
This is a bit late reply. But I also encountered same error and able to fix.When trying to connect to a JMS queue deployed in a JBoss Server from WSO2 ESB 4.6.0 and even with removing the jar geronimo-jms_1.1_spec-1.1.0.wso2v1.jar,your mentioned issue was not fixed.
The reason for that is,in your added jboss related jars to ESB/repository/components/lib,there are some other jars,exposing the implementation for javax.jms.. For example in my case there were two additional jars called jboss-j2ee.jar and jbossall-client.jar exposing javax.jms.. What I did was I opened the two jars and removed the exposing package part of javax.jms.* from both.Then the issue was fixed.
Thanks;
I am working on WSO2 ESB 4.0.3 on Mac 10.7.4.
I am trying to set up 2 HTTP transport listners in axis2.xml as follows
<transportReceiver name="http-default" class="org.wso2.carbon.core.transports.http.HttpTransportListener">
<!--
Uncomment the following if you are deploying this within an application server. You
need to specify the HTTP port of the application server
-->
<parameter name="port">8580</parameter>
<!--
Uncomment the following to enable Apache2 mod_proxy. The port on the Apache server is 80
in this case.
-->
<!--<parameter name="proxyPort">80</parameter>-->
</transportReceiver>
<transportReceiver name="http-default" class="org.wso2.carbon.core.transports.http.HttpsTransportListener">
<!--
Uncomment the following if you are deploying this within an application server. You
need to specify the HTTPS port of the application server
-->
<parameter name="port">8543</parameter>
<!--
Uncomment the following to enable Apache2 mod_proxy. The port on the Apache server is 443
in this case.
-->
<!--<parameter name="proxyPort">443</parameter>-->
</transportReceiver>
<transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
<parameter name="port" locked="false">8280</parameter>
<parameter name="non-blocking" locked="false">true</parameter>
<!--parameter name="bind-address" locked="false">hostname or IP address</parameter-->
<!--parameter name="WSDLEPRPrefix" locked="false">https://apachehost:port/somepath</parameter-->
<parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor</parameter>
<!--<parameter name="priorityConfigFile" locked="false">location of priority configuration file</parameter>-->
</transportReceiver>
<!-- the non blocking https transport based on HttpCore + SSL-NIO extensions -->
<transportReceiver name="https" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSSLListener">
<parameter name="port" locked="false">8243</parameter>
<parameter name="non-blocking" locked="false">true</parameter>
<!--parameter name="bind-address" locked="false">hostname or IP address</parameter-->
<!--parameter name="WSDLEPRPrefix" locked="false">https://apachehost:port/somepath</parameter-->
<!--<parameter name="priorityConfigFile" locked="false">location of priority configuration file</parameter>-->
<parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor</parameter>
<parameter name="keystore" locked="false">
<KeyStore>
<Location>repository/resources/security/wso2carbon.jks</Location>
<Type>JKS</Type>
<Password>wso2carbon</Password>
<KeyPassword>wso2carbon</KeyPassword>
</KeyStore>
</parameter>
<parameter name="truststore" locked="false">
<TrustStore>
<Location>repository/resources/security/client-truststore.jks</Location>
<Type>JKS</Type>
<Password>wso2carbon</Password>
</TrustStore>
</parameter>
<!--<parameter name="SSLVerifyClient">require</parameter>
supports optional|require or defaults to none -->
</transportReceiver>
I have configured correspoding senders as well.
Question is, is it possible to define 2 HTTP transport receivers in axis2.xml?
When I try to start the ESB it does not allow me define 2 HTTP transport receivers. I want to use NIO transport receiver for some services and default HTTP transport receiver for other services. This is because some services deployed in WSO2 ESB do the authentication with Directory Services using cookies set by some other process. Cookies are in HTTPServletRequest object and it is only available if I DO NOT use NIO transport and use the default HTTP transport receivers.
Please help.
thanks
Abhijit
you should be able to define two transport receivers in ESB you need to give different names for transport (eg. http1, http2). For an example for all proxy services you should be able to use the available 9763 http port.
However there is a problem with defining two transport senders. you can define two transport senders like http1 and http2. But the problem comes when giving the http location. for an example we axis2 infer the transport with the url. So when we say http:// then it takes the sender as http. since this protocol names are well defined then it can not pick transport senders when you use non standard name.