I've built a cluster on Glassfish administred via SSH, where there are 2 instances. I deployed an application that shows the "Session id".
This application has in the web.config:
<distributable/>
And in the sun-web.xml:
<session-config>
<cookie-properties>
<property name="cookieDomain" value="compute.amazonaws.com"/>
</cookie-properties>
</session-config>
I enabled "Availability" in Edit Application.
But when I access the 2 web app versions I see different session ids.
Can anyone help me?
EDIT: As some users noticed, in EC2 is not supported multicast. A solution comes with Glassfish v3.1.2, that allows two other different ways to discover a cluster when multicasting is not permitted (by listing instances ip or making it auto-generate the list). Here's specified how to start a cluster in a non-multicasting environment: Administering Glassfish Server Clusters
Read the High Availability Administration Guide for v3.1.2, specifically section "Discovering a Cluster When Multicast Transport Is Unavailable". Haven't tried it yet, but looking forward. Cheers!
First thing to try would be trying to validate if the multicast works on your your setup, use below asadmin command.
asadmin validate-multicast
You can checkout this simple Youtube Video about how to do that
http://www.youtube.com/watch?v=sJTDao9OpWA
In case Multicast does not work, you may want to try the non multicast option that is supported on Recent release of Glassfish 3.1.2
The release notes say that it supports non multicast clustering
New Support for non-Multicast clustering. GlassFish High-Availability
clustering is now possible in environments where multicast is
disabled.
I was not able to find any documentation that provides steps for setting up the non Multicast cluster. There may be one for the enterprise support customers.
As some users noticed, in EC2 is not supported multicast. A solution comes with Glassfish v3.1.2, that allows two other different ways to discover a cluster when multicasting is not permitted (by listing instances ip or making it auto-generate the list). Here's specified how to start a cluster in a non-multicasting environment: Administering Glassfish Server Clusters
Related
Our app is based on Java Spring boot. And we totally based on Google cloud, where we have dynamic IP and our serve isntance will work behind Elastic load balance, where an instance may get spawned and get killed based on server resource consumptions.
None we these server instance can be assumed to have static IP.
Looking for solution to connect different server instance with dynamic IP on Google Cloud.
Since 3.6, Hazelcast offers Discovery SPI to integrate external discovery mechanisms into the system. As a result there are many discovery plugins and you can implement your own. See the list of your options here. Kubernetes might be helpful in your case.
Some additional info from what Sertug said,
There is also a Google Compute SPI that might be helpful, you can check it out here:
https://github.com/hazelcast/hazelcast-gcp
Also, here's a blog post (a little old but still valid):
https://blog.hazelcast.com/hazelcast-discovery-spi
Related: How connect to Hortonworks sandbox Hbase using Java Client API
I currently make a proof of concept using the Hortonworks Sandbox in a VM. However, I fail at properly configuring the client (outside the VM, but on the same computer). I looked for documentation as to how a client needs to be configured, but didn't find one.
I need client configuration for accessing HBase and MapReduce, but most appreciated would be a documentation that lists configuration for clients to all parts of the sandbox.
It is actually even more stupid than I would have expected. It seems that not all necessary ports are forwarded by default, it is necessary to add them all in the VM configuration.
I succesfully followed the guides on http://docs.wso2.org/display/Cluster/Clustering+Application+Server and have deployed an scenario of one ELB 2.1.0 balancing and connecting the nodes as follows:
- One machine with the ELB, Manager and Worker node
- Another physical different machine with another worker node
All the managing on the ELB and manager and workers seems to be fine, for the logs and the console show every member connecting to each other, and so.
My problem is that if I configure the "proxyPort" properties on the Catalina-server.xml of the Manager and the workers node, I can't connect trhough the ports on the ELB 8280 or 8243, because I am obtaining a blank page (if i try to use the manager administration console) or a blank webserver response (if I try to consume any webservice through the ELB port).
If I don't configure the proxyPorts properties on each node, and point to each IP and port separately, I can successfully use the manager console, and consume the WebServices on each worker node as I expected but...of course, this way I am not having Load Balance and High Availability.
Sorry to bother you because I'm new at this matters, but I searched the internet all around and have found how to fix problems all the way through this point I'm in... It seems that the problem should only be at some transportation level configuration on the axis2.xml of some node, or maybe the fact our network is behind a proxy had something to be...don't know.
¿Anybody could give any advice? Versions are: WSAS 5.2.0 and ELB 2.1.0.
We have found now, that working with previous versions (with Tribes and not Hazelcast as the clustering class), WSAS 5.1.0 and ELB 2.0.3, and not changing the parameter on the Axis2.xml file in the ELB (leaving as it comes, being different than the domain established in the loadbalancer.cfg and the domain in the Axis2.xml of the Workers and Managers), it works well. But, if we don't change the on the axis2.xml working with the 5.2.0 and 2.1.0 versions, trying to replicate the status we have with the previous version, the ELB doesn't realice that a manager and worker are connecting to him (we can't see anything on the ELB logs when launching the manager and Worker), so I suppose in this case the clustering is not working, and for it to work properly, we need to set the in the Axis2.xml of the loadbalancer the same as in the loadbalancer.conf and in the axis2.xml of the rest of nodes in the cluster.
We need to deploy this for testing and valoration purposes on a customer and we would like to understand or to know if there is something wrong with the last versions, or this is just a lack of knowledge for our part, case when we will need the help of this forum :).
In this link you could find the configuration files involved in the ELB 2.1.0 and Manager WSAS 5.2.0 issue: http://www.dravencrow.com/varios/configuration_files.rar
Thank you very much in advance
Just for the sake of others with the same problem, we finally worked this out. It seems that with the newest versions of ELB (2.1.0) you need to stablish the port where to listen to other members in the "loadbalancer.conf" level, with the property "group_mgt_port", which did not comes as default in the file from the release of ELB 2.1.0. Also, the domain fixed in the Axis2.xml of the ELB level must be totally different from the domain fixed in the rest of Axis2.xml files of other nodes (and from the domain in the loadbalancer.conf itself). With this setup, the last version of ELB and AS works fine taking care of connections between each other, and the proxyports works as well connecting to manager and workers throug the elb port 8243. Thank you very much for your patience and apologies for bothering you....it's really difficult find some reliable documentation on the last versions of each product in the WSO2 suite, for the most of the info available is spreaded through different blogs and forums. Regards
I worked over the last weeks with wso2 products using some of the tutorials which were posted on the wso2 site.
Unfortunately I only found tutorials, where all the products run on the same machine.
What do I have to do, if I want to run the products on different machines. I want a configuration where:
- ESB runs on machine 1
- AS and GREG run onmachine 2
- Proxy-services in the ESB or a web servcie in AS are invoked from machine 3
I run these examples on some macs, I think the main problem are the ports which are used. Can somebody help me with the configuration?
Can you elaborate your configurarion problem?
With this configuration you have to be sure that from one server you can ping the another servers and that in each server you have the ports 9443 and 9763 (by default) open to the network. this is the only requirement you need.
What you are trying is nothing new. In a typical production deployment each of the servers run in their own physical/virtual machines.
when you are calling a service, you calling an endpoint uniquely identified by IP address:port/contextPath
If the setup is in the same local machine the IP address would be 'localhost'.
First you have to learn the tcp/ip basics, the question is not related to wso2 servers IMHO.
Situation
I have a windows service which I would like to make highly available.
I have two unclustered servers (Windows server 2003 standard edition).
The question is:
What options do I have to make my service highly available in an automated way?
I can think of the asymmetric master-slave option which consists of keeping the service running on both machines with a communication heartbeat between them so one acts as the master and the slave takes over automatically whenever the master does not respond.
Do you know any other ways to implement this?
note: Please don't point me to this answer, I do NOT/won't/can't have clusters.
If you're windows service is hosting a web/wcf service, you can configure your client to have a primary service url and a secondary service url. Then you can modify the client connection logic to use the secondary service when connection to the primary service fails.
You can do this transparently by adding a router service which will do the logic above. Basically proxying the operations for whichever service it is connected to. But this adds another point of failure, the router service.
The simplest i cant think of is to make sure to set the service recovery options on your windows service/s. Something like this http://code.google.com/p/daemoniq/wiki/WindowsServiceRecoveryOptions
HTH
I suggest checking MS Patterns and Practices web site, there you could find advice on this topic (for example http://msdn.microsoft.com/en-us/library/ms998414.aspx)