Skip to main content

Clustering Glassfish

Please note these forums are being decommissioned and use the new and improved forums at
3 replies [Last post]
Joined: 2012-06-03

I can not start a remote instance of glassfish cluster,on Redhat 6

My config is as follows:

I have two machines, das_cluster and cluster_2 (with a machine for the database) with the following parameters:

for the config ssh user glassfish, I proceed as follow:

1-the generation of the key pair (public & private id_dsa) on the DAS machine:
[user glassfish @ das_cluster] ssh-keygen -t dsa
2-publishing the public key of the other instances:
[user glassfish @ das_cluster] scp ~/.ssh/ cluster_2:.ssh/authorized_keys
3-repeat the same procedure at each instance:
[user glassfish @ cluster_2] ssh-keygen -t dsa
[user glassfish @ cluster_2] scp ~/.ssh/ das_cluster:.ssh/authorized_keys
4-connect multimode apartir DAS:
[user @ glassfish das_cluster] asadmin
asadmin> setup-ssh das_cluster cluster_2

5-das machine : das_cluster, node-1,inst-1

/etc/hosts (das_cluster)

@ip_das Das_cluster localhost.localdomain localhost
::1 Das_cluster localhost6.localdomain6 localhost6
@ip_host_2 cluster_2
@ip_host_bd cluster_bdd

6-remote machine :cluster_2, node-2,inst-2

/etc/hosts (cluster_2) localhost.localdomain localhost
::1 cluster_2.localdomain6 localhost6
@ip_das Das_cluster
@ip_host_bd cluster_bdd
@ip_host_2 cluster_2.localdomain cluster_2

In the end all seems to work well but to my surprise when I try to start both instances via das, inst-1 start but inst-2 fails with the following message back:

inst-2: Could not start instance inst-2 on node 2 (cluster_2). Command failed on node 2 (cluster_2): CLI801 Instance is already synchronized There is a process already using the admin port 24848 -- it probably is another instance of a GlassFish server. Command start-local-instance failed. To complete this operation run the following command locally on host cluster_2 from the GlassFish install location /APP/glassfish3: asadmin start-local-instance --node 2 --sync normal inst-2 The command start-instance executed successfully for: inst-1 The command start-instance failed for: inst-2

And when I try to start the instance inst-2 localy on the remote machine,it's the same problem, knowing that there is no other process glassfish which is runing on this machine and I check it with the following commands:

ps aux | grep glassfish
netstat -aon | grep 4848
netstat -atunp | grep 24848
netstat -ln --program | grep 24848.

Thanks a lot for every one for the attention grant to this message and I will be attentive to your suggestions to solve this problem.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2013-01-17

lsof -i :24848

and see if some other process is listen at same port.
You could try find if some node is "stuck",
ps -ef | grep java | grep node*

Stop/kill any process, restart domain and try again.

Joined: 2005-10-31

Try running the following command on cluster_2:

nslookup `hostname`

If this fails, then that is the reason why the GlassFish instance would
not start there. Is hostname returning "cluster_2"?


Joined: 2012-06-03

[root@cluster_2 ~]# nslookup cluster_2
Server: @IP_SRV_DNS
Address: @IP_SRV_DNS#53

** server can't find cluster_2: SERVFAIL