users@glassfish.java.net

how to setup the cluster and just the session replication with glassfish

From: <glassfish_at_javadesktop.org>
Date: Tue, 22 Apr 2008 11:23:43 PDT

Hi all,

  I was trying to setup the glassfish just with memory replication using the command line (without load balancing).
  I looked at "http://developers.sun.com/appserver/reference/techart/glassfishcluster/" but it didn't have much about the command line commands.
  I tried the tutorial: "https://glassfish.dev.java.net/javaee5/build/GlassFish_LB_Cluster.html" ignoring the steps of the load balancing. I'm using Netbeans IDE 6.0.1 which brings the glassfish and the sun-java6-jdk in the Ubuntu 8.04.
  I just installed the netbeans-6.0.1-ml-linux and tried to use the glassfish from there. I could not run the command "asant setup-one-machine-cluster" as described in the tutorial.

1- So Could you please help me or do you know another tutorial that is more suitable for my situation?
2- Is it possible to also replicate the database using the glassfish and the apache derby? I started to use the apache derby jdbc since it was defined by default and now it looks like it does not have the feature of the DB replication.

  My objective was to have 2 computers with the session replicated in such a way that If a person is accessing the webserver and one machine goes down, the service is still up.
  Thanks in advance!

I have just followed 3 steps until getting stuck:

1- ant -f setup-cluster.xml

2- cd ${glassfish.home}/bin

3- ./asadmin start-domain
>>output
>junqueira_at_junqueira-laptop:~/glassfish-v2ur1/bin$ ./asadmin start-domain
>Starting Domain domain1, please wait.
>Log redirected to /home/junqueira/glassfish-v2ur1/domains/domain1/logs/server.log.
>Apr 22, 2008 6:45:45 PM com.sun.jbi.installer.JBIComponentsConfigurator configure
>INFO: Configuring jbi components...
>Apr 22, 2008 6:45:48 PM com.sun.jbi.installer.JBIComponentsConfigurator configure
>INFO: OpenESB JBI Components Configuration Successful
>The operation CONFIGURE on the addon jbi_components_configurator is complete.
>Redirecting output to /home/junqueira/glassfish-v2ur1/domains/domain1/logs/server.log
>Domain domain1 is ready to receive client requests. Additional services are being started in background.
>Domain [domain1] is running [Sun Java System Application Server 9.1_01 (build b09d-fcs)] with its >configuration and logs at: [/home/junqueira/glassfish-v2ur1/domains].
>Admin Console is available at [http://localhost:4848].
>Use the same port [4848] for "asadmin" commands.
>User web applications are available at these URLs:
>[http://localhost:8080 https://localhost:8181 ].
>Following web-contexts are available:
>[/web1 /__wstx-services ].
>Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
>[service:jmx:rmi:///jndi/rmi://junqueira-laptop:8686/jmxrmi] for domain management purposes.
>Domain listens on at least following ports for connections:
>[8080 8181 4848 3700 3820 3920 8686 ].
>Domain does not support application server clusters and other standalone instances.

4- junqueira_at_junqueira-laptop:~/glassfish-v2ur1/samples/quickstart/clusterjsp$ /home/junqueira/glassfish-v2ur1/bin/asant setup-one-machine-cluster

junqueira_at_junqueira-laptop:~/glassfish-v2ur1/samples/quickstart/clusterjsp$ /home/junqueira/glassfish-v2ur1/bin/asant setup-one-machine-cluster
>Buildfile: build.xml

>build_cpath:

>init_common:

>envhost:

>readhost:

>sethost:

>envport:

>readport:

>setport:

>envuser:

>readuser:

>setuser:

>envpassword:

>readpassword:

>setpassword:

>envinstance:

>readinstance:

>setinstance:

>update_env:

>setup_env:

>checkPlatform:

>configUnix:
     [echo] on unix

>configWindows:

>init:

>create_cluster:
> [echo] Creating cluster cluster1
> [exec] This operation failed, because it could not be handled by this domain.
> [exec] An example of such an operation is creating application server >instances or clusters when they are not supported by the given domain.
> [exec] The actual error is: MBean instance not found: >com.sun.appserv:type=clusters,category=config
> [exec] CLI137 Command create-cluster failed.
> [exec] Result: 1
>
>create_nodeagent:
>
>build_cpath:
>
>init_common:
>
>envmasterpassword:
>
>readmasterpassword:
>
>setmasterpassword:
> [echo] Creating the node agent cluster1-nodeagent
> [exec] This operation failed, because it could not be handled by this domain.
> [exec] An example of such an operation is creating application server >instances or clusters when they are not supported by the given domain.
> [exec] The actual error is: MBean instance not found: >com.sun.appserv:type=node-agents,category=config
> [exec] CLI137 Command create-node-agent failed.
> [exec] Result: 1
>
>start_nodeagent:
>
>build_cpath:
>
>init_common:
>
>envmasterpassword:
>
>readmasterpassword:
>
>setmasterpassword:
> [echo] Start the node agent cluster1-nodeagent
> [exec] Node Agent cluster1-nodeagent does not exist in /home/junqueira/glassfish-v2ur1/nodeagents/cluster1-nodeagent. Use a different node agent >name or the --agentdir option.
> [exec] CLI137 Command start-node-agent failed.
> [exec] Result: 1
>
>create_instance1:
> [echo] Creating instance instance-ONE
> [exec] This operation failed, because it could not be handled by this domain.
> [exec] An example of such an operation is creating application server >instances or clusters when they are not supported by the given domain.
> [exec] The actual error is: Operation :createServerInstance is not found in >servers MBean.
> [exec] CLI137 Command create-instance failed.
> [exec] Result: 1
>
>create_instance2:
> [echo] Creating instance instance-TWO
> [exec] This operation failed, because it could not be handled by this domain.
> [exec] An example of such an operation is creating application server >instances or clusters when they are not supported by the given domain.
> [exec] The actual error is: Operation :createServerInstance is not found in >servers MBean.
> [exec] CLI137 Command create-instance failed.
> [exec] Result: 1

>setup-one-machine-cluster:
>
>BUILD SUCCESSFUL
[Message sent by forum member 'junkeira' (junkeira)]

http://forums.java.net/jive/thread.jspa?messageID=270610