GeeCON Prague 2014*
The moose likes JBoss/WildFly and the fly likes JBoss clustering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss clustering" Watch "JBoss clustering" New topic
Author

JBoss clustering

Barani Kannan subramanian
Greenhorn

Joined: May 06, 2008
Posts: 14
Hi,

My JBoss cluster is not working and the below is the error. Please help me out to resolve this. The bolow is the apache logs. I am using JBoss 4.2.3 version. the nodes are running in 192.168.1.20:8080 and 192.168.1.21:8080 ports while using http://192.168.1.20:8080/jmx-console/ or http://192.168.1.21:8080/jmx-console/ , i am able to access the console but while using http://192.168.1.20:8089/jmx-console/ its not working. 8099 is the port where apache runs.



[Tue Jan 20 10:35:32 2009][537:1] [info] mod_jk.c (3018): mod_jk/1.2.27 initialized
[Tue Jan 20 10:35:32 2009][538:1] [warn] jk_map.c (410): The attribute 'worker.node1.cachesize' is deprecated - please check
the documentation for the correct replacement.
[Tue Jan 20 10:35:32 2009][538:1] [warn] jk_map.c (410): The attribute 'worker.node2.cachesize' is deprecated - please check
the documentation for the correct replacement.
[Tue Jan 20 10:35:32 2009][538:1] [info] mod_jk.c (3018): mod_jk/1.2.27 initialized
[Tue Jan 20 10:36:12 2009][539:1] [info] jk_connect.c (593): connect to 127.0.0.1:8009 failed (errno=146)
[Tue Jan 20 10:36:12 2009][539:1] [info] jk_ajp_common.c (922): Failed opening socket to (127.0.0.1:8009) (errno=146)
[Tue Jan 20 10:36:12 2009][539:1] [error] jk_ajp_common.c (1467): (globe1) connecting to backend failed. Tomcat is probably n
ot started or is listening on the wrong port (errno=146)
[Tue Jan 20 10:36:12 2009][539:1] [info] jk_ajp_common.c (2407): (globe1) sending request to tomcat failed (recoverable), bec
ause of error during request sending (attempt=1)

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

but while using http://192.168.1.20:8089/jmx-console/ its not working


What happens when you say it's not working? The logs that you posted is just INFO and WARN messages. How do you start the servers? And where are you trying to access that URL from? Is it the same system or is it from a different system?


[My Blog] [JavaRanch Journal]
Barani Kannan subramanian
Greenhorn

Joined: May 06, 2008
Posts: 14
Hi Jai,

Thanks for response. Its giving internel server error. I believe apache is searching in local host 8009 port but the JBoss servers are running in 192.168.1.20 and 192.168.1.21. The http port is 8080, i am seeing 8009 port also lisneing by some process for the boyh IPs. So i want to make apache to search for JBoss server in 192.168.1.20 and 192.168.1.21 instaed of localhost. i mentioned these IPs in worker.properties also. Please guide me.

Regards
Barani
Dan Allen
Author
Ranch Hand

Joined: Mar 05, 2003
Posts: 164
You need to bind to the port when you start jboss:

./bin/run.sh -c all -b 192.168.0.20


Dan Allen | http://mojavelinux.com | Author of Seam in Action - http://mojavelinux.com/seaminaction
Barani Kannan subramanian
Greenhorn

Joined: May 06, 2008
Posts: 14
Hi the nodes are running in 192.168.1.20:8080 and 192.168.1.21:8080 ports while using http://192.168.1.20:8080/jmx-console/ or http://192.168.1.21:8080/jmx-console/ , I am able to access the JBoss console.

But while using http://192.168.1.20:8089/jmx-console/ its not working. 8099 is the port where apache runs. If i run my any one of the JBoss in localhost then apache is communicating with JBoss and http://192.168.1.20:8089/jmx-console/ is working. So my conclusion is apache is trying to find only in localhost and its not using workers.properties file. I am not able to find from where its picking the localhost entry. Please help.


workers.properties

# Define list of workers that will be used
# for mapping requests
worker.list=loadbalancer,status

# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=8009
worker.node1.host=192.168.1.20
worker.node1.type=ajp13
worker.node1.lbfactor=1
worker.node1.cachesize=10

# Define Node2
# modify the host as your host IP or DNS name.
worker.node2.port=8009
worker.node2.host=192.168.1.21
worker.node2.type=ajp13
worker.node2.lbfactor=1
worker.node2.cachesize=10


# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=globe1,globe2
worker.loadbalancer.sticky_session=1


#worker.list=loadbalancer
# Status worker for managing load balancer
worker.status.type=status





mod-jk.conf

# Load mod_jk module
# Specify the filename of the mod_jk lib
LoadModule jk_module modules/mod_jk.so
JkShmFile logs/mod_jk.shm

# Where to find workers.properties
JkWorkersFile conf/workers.properties

# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info

# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

# JkOptions indicates to send SSK KEY SIZE
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"

# Mount your applications
#JkMount /application/* loadbalancer
JkMount /jmx-console loadbalancer
JkMount /jmx-console/* loadbalancer






httpd.conf


# Include mod_jk's specific configuration file
Include conf/mod-jk.conf





MOD-jk log


[Tue Jan 20 10:35:32 2009][537:1] [info] mod_jk.c (3018): mod_jk/1.2.27 initialized
[Tue Jan 20 10:35:32 2009][538:1] [warn] jk_map.c (410): The attribute 'worker.node1.cachesize' is deprecated - please check
the documentation for the correct replacement.
[Tue Jan 20 10:35:32 2009][538:1] [warn] jk_map.c (410): The attribute 'worker.node2.cachesize' is deprecated - please check
the documentation for the correct replacement.
[Tue Jan 20 10:35:32 2009][538:1] [info] mod_jk.c (3018): mod_jk/1.2.27 initialized
[Tue Jan 20 10:36:12 2009][539:1] [info] jk_connect.c (593): connect to 127.0.0.1:8009 failed (errno=146)
[Tue Jan 20 10:36:12 2009][539:1] [info] jk_ajp_common.c (922): Failed opening socket to (127.0.0.1:8009) (errno=146)
[Tue Jan 20 10:36:12 2009][539:1] [error] jk_ajp_common.c (1467): (globe1) connecting to backend failed. Tomcat is probably n
ot started or is listening on the wrong port (errno=146)
[Tue Jan 20 10:36:12 2009][539:1] [info] jk_ajp_common.c (2407): (globe1) sending request to tomcat failed (recoverable), bec
ause of error during request sending (attempt=1)
[Tue Jan 20 10:36:13 2009][539:1] [info] jk_connect.c (593): connect to 127.0.0.1:8009 failed (errno=146)
[Tue Jan 20 10:36:13 2009][539:1] [info] jk_ajp_common.c (922): Failed opening socket to (127.0.0.1:8009) (errno=146)
[Tue Jan 20 10:36:13 2009][539:1] [error] jk_ajp_common.c (1467): (globe1) connecting to backend failed. Tomcat is probably n
ot started or is listening on the wrong port (errno=146)
[Tue Jan 20 10:36:13 2009][539:1] [info] jk_ajp_common.c (2407): (globe1) sending request to tomcat failed (recoverable), bec
ause of error during request sending (attempt=2)
[Tue Jan 20 10:36:13 2009][539:1] [error] jk_ajp_common.c (2426): (globe1) connecting to tomcat failed.
[Tue Jan 20 10:36:13 2009][539:1] [info] jk_lb_worker.c (1347): service failed, worker globe1 is in error state
[Tue Jan 20 10:36:13 2009][539:1] [info] jk_connect.c (593): connect to 127.0.0.1:8009 failed (errno=146)
[Tue Jan 20 10:36:13 2009][539:1] [info] jk_ajp_common.c (922): Failed opening socket to (127.0.0.1:8009) (errno=146)
[Tue Jan 20 10:36:13 2009][539:1] [error] jk_ajp_common.c (1467): (globe2) connecting to backend failed.
Javid Jamae
Author
Ranch Hand

Joined: May 14, 2008
Posts: 198
Did you configure the jvmRoute in each Tomcat instance's server.xml file to have the node name?

Also try uncommenting the RequestDumperValve in server.xml to see if the request is even making it to Tomcat.


Author: JBoss in Action, javidjamae.com, @javidjamae on Twitter
Barani Kannan subramanian
Greenhorn

Joined: May 06, 2008
Posts: 14
Hi,

If i change one IP address to localhost in works.properties and run one JBoss instance in localhost then the apache is giving valid page. so the problem is in apache side only. apache is not picking workers.properties values and taking it as localhost from somewhere. What is the possiblities for this. Please advice.
jonnabhatla venkata
Greenhorn

Joined: Feb 10, 2009
Posts: 24
Barani Kannan subramanian wrote:Hi,

If i change one IP address to localhost in works.properties and run one JBoss instance in localhost then the apache is giving valid page. so the problem is in apache side only. apache is not picking workers.properties values and taking it as localhost from somewhere. What is the possiblities for this. Please advice.



Hi

I got the same issue but Issue got resolved
Please start your jboss instaces with the following command

run -c all -b youripaddress

ex:

run -c all -b 172.16.1.46

Previously it is not binding to the network thats why in localhost it is working fine
when comes to the ip's it is not work.
 
GeeCON Prague 2014
 
subject: JBoss clustering