I tried to send this message to the users mailing list but it didn't show up so I'll try posting here.
I am having a problem trying to get a Glassfish cluster working on 2 nodes. Any suggestions will be welcomed. I must be missing something.
I’ve been using Glassfish for about a year but certainly no expert. I followed the tutorial to setup a one machine cluster and I was able to create the cluster and to get it to work using Apache 2.2 as a load balancer.
I am using Ubuntu 9.10, and downloaded Glassfish 2.1.1.
I also looked at this tutorial for clustering machines
http://www.randombugs.com/java/glassfish/how-to-install-and-configure-a-glassfish-cluster.html.
I am using VirtualBox and I have created another Ubuntu 9.10 node as a virtual machine. I installed Glassfish there and set up the machines so they see each other on a network.
My main Ubuntu host is referred to as doal-mainhost, and my virtual machine node is doal-sechost.
I have Glassfish with “domain1” running on my Ubuntu host (doal-mainhost) and I created a node agent, cluster, and instance with the following commands.
asadmin create-node-agent --user admin --passwordfile ~/passwordfile.txt --agentdir=/usr/local/cluster/glassfish/nodeagents --host doal-mainhost --port 4848 agent-mainhost
asadmin create-cluster --user admin --passwordfile ~/passwordfile.txt --host doal-mainhost --port 4848 xmach-cluster
asadmin create-instance --user admin --passwordfile ~/passwordfile.txt --host doal-mainhost --port 4848 --nodeagent agent-mainhost --cluster xmach-cluster instance-mainhost
I set up the JDBC resources for the new cluster xmach-cluster and everything looks good. The node agent and instance is running.
On the virtual machine (doal-sechost) I set up another node agent and instance using these commands:
asadmin create-node-agent --user admin --passwordfile ~/passwordfile.txt --agentdir=/usr/local/cluster/glassfish/nodeagents --host doal-mainhost --port 4848 agent-sechost
asadmin create-instance -t=false -e=true --user admin --passwordfile ~/passwordfile.txt --host doal-mainhost --port 4848 --nodeagent agent-sechost --cluster xmach-cluster instance-sechost
When I try to start the node agent with the following command:
asadmin start-node-agent --user admin --passwordfile ~/passwordfile.txt --agentdir=/usr/local/cluster/glassfish/nodeagents --syncinstances=true agent-sechost
It tells me “Node Agent agent-sechost failed to startup. Please check the server log for more details. CLI137 Command start-node-agent failed.”
The end of the server log is below. To make sure this virtual machine can connect to the host I open a browser on doal-sechost and enter
http://doal-mainhost:4848/. This gets me the login page and I’m able to log in and look at the configurations on domain1.
I don’t need anything more than a node agent running on the secondary node do I? I appreciate any insight. Thanks
Server.log for nodeagent agent-sechost:
[#|2010-04-27T15:12:47.512-0700|INFO|sun-appserver2.1|javax.ee.enterprise.system.nodeagent|_ThreadID=10;_ThreadName=main;|NAGT0004:Starting Node Agent...|#]
[#|2010-04-27T15:12:47.528-0700|CONFIG|sun-appserver2.1|javax.ee.enterprise.system.nodeagent|_ThreadID=10;_ThreadName=main;|DAS url = service:jmx:rmi:///jndi/rmi://doal-mainhost:8686/management/rmi-jmx-connector|#]
[#|2010-04-27T15:12:47.529-0700|CONFIG|sun-appserver2.1|javax.ee.enterprise.system.nodeagent|_ThreadID=10;_ThreadName=main;|NodeAgent url = service:jmx:rmi_jrmp://0.0.0.0:44193|#]
[#|2010-04-27T15:12:47.640-0700|INFO|sun-appserver2.1|javax.ee.enterprise.system.nodeagent|_ThreadID=10;_ThreadName=main;|NAGT0025:The node agent could not configure logging levels. Default logging level will be used.|#]
[#|2010-04-27T15:12:47.640-0700|INFO|sun-appserver2.1|javax.ee.enterprise.system.nodeagent|_ThreadID=10;_ThreadName=main;|NAGT0038:Executing Synchronization for node-agent With DAS|#]
[#|2010-04-27T15:12:56.750-0700|SEVERE|sun-appserver2.1|javax.ee.enterprise.system.nodeagent|_ThreadID=10;_ThreadName=main;|NAGT0035:The NodeAgent failed to complete the intial synchronization with the DAS. Please make sure the DAS is running and is accessible from the NodeAgents server|#]
[#|2010-04-27T15:12:58.757-0700|WARNING|sun-appserver2.1|javax.ee.enterprise.system.nodeagent|_ThreadID=10;_ThreadName=main;|NAGT0013:Stopping Node Agent...|#]
Doal Miller
Sr. Software Engineer
[Message sent by forum member 'doal']
http://forums.java.net/jive/thread.jspa?messageID=399423