Load Balance wso2 ESB - wso2

We have 2 WSO2 ESB nodes.
We have configured similar Proxy on both ESBs (i.e. both Proxy have same name, point to same WSDL and have no associated end points)
We want the client traffic to load balance across these 2 ESBs, using Apache Software load balancer.
However the issue is, The clients will be generating SOAP stubs from the Proxy WSDL and generally the Proxy WSDL has the Soap Address specified as the ESBHost:port/proxyName.. That will mean that requests from client will be going directly to the ESB from where they generated the stubs.
How can we overcome this ? i.e. force the clients to the load balancer hostname/ip ? Is there any configuration on ESB proxy to explicitly set the SoapAddress ... if that is available then we can have the Proxy WSDL define the SoapAddress as loadbalancerHost:port/proxyName
Thanks
Rajiv Patil

You can add following parameter to http and https transport receivers of WSO2 ESB .
<parameter name="WSDLEPRPrefix" locked="false">[load-balancer-url]</parameter>
For example:
<parameter name="WSDLEPRPrefix" locked="false">http://esb.cloud-test.wso2.com:8280</parameter>
You need to edit following file. <WSO2-ESB-HOME>repository/conf/axis2/axis2.xml
This step is necessary for configuring WSO2 ELB also. See following ELB doc for more information.
http://docs.wso2.org/wiki/pages/viewpage.action?pageId=26839403

Related

WSO2 EI: WSDL Not opening in the management console

WSDL 1.1 & WSDL 2.0 are not opening in the management console when I open the WSDL in the management console it shows This site can’t be reached error I don't know why this happening. So please help me to sort this out.
Note: No error throws in both carbon and wire logs
Thanks!
you have misconfiguration problem i think. becouse you have wso2 in AWS and this ip-10-50-11-169... is not a hostname or your ip adress.
Can you check your /etc/hosts on server? maybe you must change fqdn in aws account
or you can check wso2 hostname/ip adress configuration in axis2.xml <parameter name="WSDLEPRPrefix"..
You need to add the following property to your axis2.xml to pick the correct FQDN/Hostname when generating WSDL URLs. So add the Hostname you are using to access the services here or if you are using the same hostname used for management console add the hostname with the correct service port.(8280 or 8343)
<parameter name="WSDLEPRPrefix" locked="false">http://ei.wso2.com:80</parameter>
Refer to instructions here.
Also, make sure the FQDN is resolvable and your security groups are allowing access to relevant ports.

WSO2 Admin Console HTTP Access

I have been trying to configure the WSO2 Admin console for HTTP access and not HTTPS. I have a load balancer infant of my WSO2 ESB server that will terminate the inbound HTTPS connections and forward to the WSO2 server as HTTP.
I have tried various different configurations in the catalina-server.xml file without any success. It either does not work at all or when connecting using HTTP it simply redirects to HTTPS, even after removing the 'redirect' setting from the HTTP connector configuration.
I have spent several hours 'playing' and searching for something similar on the web to no avail.
Hopefully someone here has done something similar or can help.
Regards,
Graham
I'm using wso2 esb 4.8.1,Go to the following location in your esb carbon server ,
CARBON_HOME\repository\conf open carbon.xml file and uncomment the following line
<!-- Enable accessing Admin Console via HTTP -->
<EnableHTTPAdminConsole>true</EnableHTTPAdminConsole>
and you will have HTTP access to your wso2esb admin console. After enabling HTTP access, you can access the admin console via port 9763.

How to create data service with local transport using proxy?

I have created data service using WSO2 DSS which is called by proxy service.
Everything works smoothly, but this DSS service is also visible to internet.
Now I would like to hide this DSS so proxy service is so only way to use this service.
Proxy has security, logging etc.
As far as I understand local transport is good and efficient way to keep
traffic between services internal on WSO2.
Everything goes as expected but when I try to set WSDL URL or internal for proxy (which is DSS service WDSL) I get error "Unable to modify proxy service :: Unable to modify proxy service: mylogtest-ProxyServiceAdminProxyAdminException".
In log file there is error "Caused by: org.apache.synapse.SynapseException: Error building service from WSDL" and "Caused by: org.apache.axis2.AxisFault: there is no service with ports to pick".
I get this error when I have local transport only in DSS.
If I add http transport, everything works. Proxy has http and https transports.
Local transport works only inside a single JVM. I guess here you are running DSS and ESB separately i.e. with two jvm instances - if so it won't work. The solution is to install DSS features inside the ESB and then run it (without running the DSS separately). You can find the feature installation guide here: http://docs.wso2.org/display/Carbon420/Installing+Features+via+the+UI
I had incorrectly formed WSDL for proxy. Very novice error.

mule versioning on web service

I have the same mule webservice application with 2 different versions deployed on the same mule server. Let's call it MuleApp.1.0 and MuleApp.1.1. The flow is as simple as the example of webservice flow on mulesoft website. Their wsdl urls are different as:
http://www.myhost.com:25101/MuleApp.1.0/Service?wsdl
http://www.myhost.com:25101/MuleApp.1.1/Service?wsdl
Both of them are working as expected when the other is not deploying on the mule server. The issue happens when I having both of them deployed on the same mule server like what I used to do in WebLogic. Now I am able to access MuleApp.1.1, but when I tried to access MuleApp.1.0, I got the error as below
07-Mar-2013:14:52:57.142 VWILVM3667 [MuleApp.1.1].connector.http.mule.default.receiver.03
WARN org.mule.transport.http.HttpMessageReceiver NA
No receiver found with secondary lookup on connector: connector.http.mule.default with URI key: http://www.myhost.com:25101/MuleApp.1.0/Service
This is supposed to be a very common versionning case. What did I miss in my config?
You can't have two different applications sharing the same HTTP port in the same Mule instance.
So what probably happens is that MuleApp.1.0 doesn't deploy properly (check the logs), which is why there is no endpoint listening on /MuleApp.1.0.
Either:
Use a different port in the two apps,
Put both flows in a single app.
Create a frontal app that listens on port 25101 and both /MuleApp.1.0 and /MuleApp.1.1 paths and that dispatches requests to MuleApp.1.0 and MuleApp.1.1 on private ports (say 25102 and 25103).
I finally deployed my application on tomcat, and replaced http inbound endpoint with servlet inbound endpoint. I configure the web.xml with servlet class org.mule.transport.servlet.MuleReceiverServlet. Now I am able to deploy multiple applications on the same port.

WSO2 ESB -How to set HTTPS port for proxy services other than management console HTTPS port

I am using ESB 4.0.3 on Mac OSX 10.7.5.
Java version is
java version "1.6.0_35" /
Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811) /
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
In my axis2.xml I am using have following configuration for HTTPS transport listner
<transportReceiver name="https" class="org.wso2.carbon.core.transports.http.HttpsTransportListener">
<parameter name="port" locked="true">9443</parameter>
</transportReceiver>
In my mgt-transports.xml I have following configuration
<parameter name="port" locked="xsd:false">${Ports.ServletTransports.HTTPS}</parameter>
In my carbon.xml I have following configuration
<ServletTransports>
<HTTPS>9440</HTTPS>
<HTTP>9763</HTTP>
</ServletTransports>
How ever when I start the ESB the proxy / Data services on HTTPS port never listen to 9443 where as they listen on 9440 all the time.
How can I enable HTTPS port for the proxy and Data services different than the management console HTTPS port?
Please let me know.
thanks
Abhijit
Hi Nuwan
I am not using NHTTP transport. Please see the transportlistener class above. I am using servelet transport only for the ESB as my requirement is not to disturb existing HTTP client.
For servlet transport in ESB I would like to know if ADMIN UI port can be different than the ESB proxy services HTTPS port.
Please help.
Abhijit
Are mentioning about ESB proxy services ?, If so they do not listen to the servlet transport. They are working on NHHTP transport which you can configure. Please provide more information. whats the NHTTP ports in ESB ?
Regards,
/Nuwan
If you are using the servlet transport for ESB, the same port will be used by Admin Console UI. You cannot do anything for that, since there is only one Servlet transport Admin UI will also use that.
Regards,
/Nuwan