-
1. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
rhusar Feb 10, 2010 9:54 AM (in response to naveenj)Hi Naveen,
can you please update mod_cluster to 1.0.3 GA and try again? This should have been fixed by this revision, see the Jira https://jira.jboss.org/jira/browse/JBPAPP-3337
Cheers
-
2. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
naveenj Feb 11, 2010 1:10 AM (in response to rhusar)Hi Radoslav,
Thanks for your reply.
I have tried version mod_cluster 1.0.3 GA, but still no luck. I believe I have done everything as described in the quick start quide.
Ok, let me ask you this: Will http://<ip>/ (Apache) redirect to http://<ip>:8080/ (JBoss) directly or is there some configuration we need to set?
-
3. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
jfclere Feb 11, 2010 3:28 AM (in response to naveenj)Accoding to http://community.jboss.org/servlet/JiveServlet/showImage/2-523153-1942/mod_cluster1.JPG
you have no application information. may be no application deployed or they are all in the excludedContexts property in mod-cluster-jboss-beans.xml.
You can also use the ProxyPass and ProxyPassMatch httpd directives if you want static mount.
-
4. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
ndhanks Feb 14, 2010 1:54 PM (in response to jfclere)I had similar problem but then noticed that ROOT was in the excludedContexts list. I removed ROOT and was able to send reqeusts to Jboss.
FYI: My jboss has my applicaiton at ROOT (/) not ROOT.war.
-
5. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
naveenj Feb 15, 2010 1:54 AM (in response to jfclere)Jean and Ned,Thanks so much!!!, You were right. Your inputs helped me.
After speding some time I finally figured it out. I added <depends>ModClusterService</depends> in jboss-beans.xml and tried to change the properties in HAModClusterConfig bean in mod-cluster-jboss-beans.xml and thats why it was not working.
So, I changed it to <depends>HAModClusterService</depends> and it worked. I now get the application when I run http://<ip>/mod_Cluster-manager and I am able to re-direct to JBoss.
I have 2 other questions:
1. I did notice, when I make the change, I need to wait ~20 sec for the application actually show up, till that time I get a "Server Temporarily Unavailable". Is this supposed to be like that?
2. Even if I exclude certain contexts in the excludedContexts property in mod-cluster-jboss-beans.xml, it still shows up.
Eg:
<property name="excludedContexts">${jboss.modcluster.excludedContexts:invoker,jbossws,jmx-console,juddi,web-console}</property>
this should not display the ROOT and admin-console, but when I check http://<ip>/, it redirects to the JBoss home page. Similarly with /admin-console.
I tried this on a Windows box.
On Linux I have some other issue. When I try http://<ip>/mod_cluster-manager, it shows the nodes and application perfectly, but http://<ip>/ gives me a 403 Forbidden. You don't have permission to access / on this server instead of redirecting to JBoss. Any idea why?
-
6. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
jfclere Feb 15, 2010 2:48 AM (in response to naveenj)"1. I did notice, when I make the change, I need to wait ~20 sec..."
That is normal httpd has to wait for the STATUS message from the node to be able to use it.
"2. Even if I exclude certain contexts in the excludedContexts ..."
That is normal once ROOT is not in the excludedContext all requests are forwarded to AS (having ROOT is mounting /).
"3. /mod_cluster-manager and 403
Please check your virtualHost configuration.
-
7. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
naveenj Feb 17, 2010 2:11 AM (in response to jfclere)Thanks Jean,
Reg 3. , I fixed it, but I came across another problem.
When I restart Apache with mod_cluster related modules enabled, I get the following error and my apache log /var/log/apache2/error.log reads like this.
[Tue Feb 16 23:07:34 2010] [emerg] create_mem_node /etc/apache2/logs/manager.node failed
Configuration Failed
[Wed Feb 17 01:25:24 2010] [emerg] create_mem_node /etc/apache2/logs/manager.node failed
Configuration Failed
[Wed Feb 17 01:30:32 2010] [emerg] create_mem_node /etc/apache2/logs/manager.node failed
Configuration Failed
[Wed Feb 17 01:45:58 2010] [emerg] create_mem_node /etc/apache2/logs/manager.node failed
Configuration Failed
[Wed Feb 17 01:46:31 2010] [emerg] create_mem_node /etc/apache2/logs/manager.node failed
Configuration Failed
[Wed Feb 17 01:46:59 2010] [emerg] create_mem_node /etc/apache2/logs/manager.node failed
Configuration Failed
[Wed Feb 17 01:47:02 2010] [emerg] create_mem_node /etc/apache2/logs/manager.node failed
Configuration Failed
[Wed Feb 17 01:47:05 2010] [emerg] create_mem_node /etc/apache2/logs/manager.node failed
Configuration FailedOS: Ubuntu Linux Server 9.10 i686
Apache: 2.2.12
mod_cluster: mod_cluster 1.0.3 GA - mod_cluster httpd dynamic libraries - linux2 x86
I searched and came across a similar JIRA - https://jira.jboss.org/jira/browse/MODCLUSTER-120
My question is: Does it affect mod cluster 1.0.3 GA, if yes, then do i install mod_cluster 1.1.0 Beta1, if No, then what could be the issue???
Note: I noticed that I do not have a problem in the following environment
OS: Ubuntu Server 8.10 Server x64
Apache: 2.2.9
mod_cluster: mod_cluster_1.0.3 GA - mod_cluster httpd dynamic libraries - linux2 x64
Thanks.
-
8. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
rhusar Feb 17, 2010 5:18 AM (in response to naveenj)Yes, it does affect 1.0.3 GA as well. The fix version is 1.1 CR1, so beta 1 wont have that fix. To workaround, in case of "[emerg] create_mem_node <node file path> failed" error please use "ipcrm -m" command and wait a few seconds before restarting httpd.
-
9. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
jfclere Feb 17, 2010 8:25 AM (in response to rhusar)Note you have to remove the unused shared memory via ipcrm -m key.
+++
[hudson@perf08 ~]$ ipcs | more
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x0101c7d5 82182144 hudson 600 10500 0
0x0101c7d7 82214913 hudson 600 7620 0+++
nattch 0 : they are unused. They could be removed.
ipcrm -m 82182144 (for example).
-
10. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
naveenj Feb 17, 2010 4:17 PM (in response to jfclere)Hi Radoslav and Jean,
I ran ipcs on my box.
naveen@db:/opt$ sudo ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 393216 naveen 600 393216 2 dest
0x00000000 425985 naveen 600 393216 2 dest
0x00000000 229378 naveen 600 393216 2 dest
0x00000000 262147 naveen 600 393216 2 dest
0x00000000 294916 naveen 600 393216 2 dest
0x00000000 327685 naveen 600 393216 2 dest
0x00000000 360454 naveen 600 393216 2 dest
0x00000000 458759 naveen 600 393216 2 dest
0x00000000 491528 naveen 600 393216 2 dest
0x00000000 4128777 naveen 600 393216 2 dest
0x00000000 5144586 naveen 600 3981312 2 dest
0x00000000 589835 naveen 600 393216 2 dest
0x00000000 622604 naveen 600 393216 2 dest
0x00000000 655373 naveen 600 393216 2 dest
0x00000000 688142 naveen 600 393216 2 dest
0x00000000 1769487 naveen 600 393216 2 dest
0x00000000 5013520 root 600 393216 2 dest
0x00000000 5046289 root 600 393216 2 dest
0x00000000 2261010 naveen 600 393216 2 dest
0x00000000 2326547 naveen 600 393216 2 dest
0x00000000 3768341 naveen 600 393216 2 dest
0x00000000 2097174 naveen 600 393216 2 dest
0x00000000 2129943 naveen 600 393216 2 dest
0x00000000 2883608 naveen 600 393216 2 dest
0x00000000 2916377 naveen 600 393216 2 dest
------ Semaphore Arrays --------
key semid owner perms nsems
------ Message Queues --------
key msqid owner perms used-bytes messagesSo, I dont see any nattch: 0.
I restarted Apache, but the apache error log still has the same error.
Any ideas what do to next.
Thanks.
-
11. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
jfclere Feb 18, 2010 3:58 AM (in response to naveenj)Check which process are using the shared memory, is it httpd? Do you still have running httpd process?
my guess is that your still have httpd process and the shared memory is still attached to them. You have probably to kill the process and clean the shared memory.
-
12. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
naveenj Feb 19, 2010 2:56 AM (in response to jfclere)Jean,
There are no httpd processes running.
Anyway, I went back to the box where it was running, i.e. Ubuntu Server x64. It seems to run
With respect to your suggestion to check the Virtual Host configuration. I checked it without mod_cluster and it works perfectly fine.
Virtual host config:
<VirtualHost 192.168.100.150:80>
# DocumentRoot /var/www/
<Directory />
Order deny,allow
Deny from all
Allow from 192.168.100.150
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
KeepAliveTimeout 60
MaxKeepAliveRequests 0
ManagerBalancerName mycluster
AdvertiseFrequency 5
</VirtualHost>Apache Log gives this error:
[Fri Feb 19 02:05:18 2010] [notice] Advertise initialized for process 4815
[Fri Feb 19 02:05:18 2010] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Fri Feb 19 02:05:24 2010] [error] [client 192.168.100.150] File does not exist: /htdocs
[Fri Feb 19 02:09:02 2010] [error] ajp_cping_cpong: apr_socket_recv failed
[Fri Feb 19 02:10:24 2010] [error] [client 192.168.100.150] client denied by server configuration: proxy:balancer://mycluster/
[Fri Feb 19 02:15:24 2010] [error] [client 192.168.100.150] client denied by server configuration: proxy:balancer://mycluster/
[Fri Feb 19 02:20:24 2010] [error] [client 192.168.100.150] client denied by server configuration: proxy:balancer://mycluster/
[Fri Feb 19 02:25:24 2010] [error] [client 192.168.100.150] client denied by server configuration: proxy:balancer://mycluster/
[Fri Feb 19 02:30:24 2010] [error] [client 192.168.100.150] client denied by server configuration: proxy:balancer://mycluster/
[Fri Feb 19 02:35:24 2010] [error] [client 192.168.100.150] client denied by server configuration: proxy:balancer://mycluster/
[Fri Feb 19 02:40:24 2010] [error] [client 192.168.100.150] client denied by server configuration: proxy:balancer://mycluster/Apache gives this error when i run http://<ip>/
Forbidden
You don't have permission to access / on this server.
There are no errors in JBoss.
Any idea why this is occuring...
Since this was working in Windows, I just copied jboss-beans.xml, mod-cluster-jboss-beans.xml, server.xml into Ubuntu, but this error still comes.
Note: http://<ip>/mod_cluster-manager displays the nodes as given below.
Any help will be greatly appreciated. Thanks.
-
13. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
jfclere Feb 19, 2010 3:22 AM (in response to naveenj)Again it must be a VirtualHost problem, may be the default host is used. -
14. Re: Redirect traffic to JBoss AS (Equivalent of JkMount of mod_jk)
naveenj Feb 20, 2010 2:44 AM (in response to jfclere)Jean,
I did not use default host, I created another host and tried, no luck... JBoss give me this error, no errors in apache. Any idea
2010-02-20 02:35:34,985 INFO [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) IO error sending command INFO to proxy 192.168.100.150:8082
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:209)
at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:202)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler$Proxy.getConnection(DefaultMCMPHandler.java:1139)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler$Proxy.getConnectionWriter(DefaultMCMPHandler.java:1164)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(DefaultMCMPHandler.java:774)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.sendRequest(DefaultMCMPHandler.java:884)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPHandler.java:465)
at org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler.status(DefaultMCMPHandler.java:446)
at org.jboss.modcluster.ha.HAModClusterService$ClusteredCatalinaEventHandler.updateClusterStatus(HAModClusterService.java:910)
at org.jboss.modcluster.ha.HAModClusterService$ClusteredCatalinaEventHandler.status(HAModClusterService.java:890)
at org.jboss.modcluster.ha.HAModClusterService$ClusteredCatalinaEventHandler.status(HAModClusterService.java:835)
at org.jboss.modcluster.CatalinaEventHandlerAdapter.lifecycleEvent(CatalinaEventHandlerAdapter.java:163)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1348)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1612)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1601)
at java.lang.Thread.run(Thread.java:619)