AW: [Linux-HA] Tomcat times out
Ehlers, Kolja
ehlers at clinresearch.com
Mon Jul 7 08:18:48 MDT 2008
what I probably could do to have my 9 tomcat instances on both nodes is
create another 9 resources. Then apply to the first ones a rule to only run
on node1 and to the other to stay on node2. Is this the proper way to do
this?
For explanation: I will be using the apache_jk to balance the load to the
different tomcat workers and this will only work if all tomcats run on both
nodes.
Thanks
Kolja
-----Ursprungliche Nachricht-----
Von: linux-ha-bounces at lists.linux-ha.org
[mailto:linux-ha-bounces at lists.linux-ha.org]Im Auftrag von Ehlers, Kolja
Gesendet: Montag, 7. Juli 2008 15:57
An: linux-ha at lists.linux-ha.org
Betreff: AW: [Linux-HA] Tomcat times out
Thank you Michael for the very detailed help. Its working pretty okay now
still I have one more question.
I am running Apache and one virtual ip adress in one group now and 9 tomcat
instances ungrouped. I want heartbeat to start and monitor the apache/ip
group on only one node and all tomcats on both nodes. So if apache or the ip
fails merge the ip and apache to the other node, the tomcats are already
started there.
I guess for the tomcat instances it is an active/active configuration and
for the apache/ip group an active passive. I read here
http://www.linux-ha.org/GettingStartedV2/TwoApaches that there is not much
to do for an active/active configuration but to make groups.
My resources look like this now:
Resource Group: group_1
IPaddr_192_168_11_25 (ocf::heartbeat:IPaddr): Started
www1test
apache_2 (ocf::heartbeat:apache): Started www1test
tomcat_21 (ocf::heartbeat:tomcat): Started www1test
tomcat_22 (ocf::heartbeat:tomcat): Started www1test
tomcat_22sdb (ocf::heartbeat:tomcat): Started www1test
tomcat_30 (ocf::heartbeat:tomcat): Started www1test
tomcat_34 (ocf::heartbeat:tomcat): Started www1test
tomcat_35 (ocf::heartbeat:tomcat): Started www1test
tomcat_36 (ocf::heartbeat:tomcat): Started www2test
tomcat_37 (ocf::heartbeat:tomcat): Started www2test
tomcat_38 (ocf::heartbeat:tomcat): Started www2test
So im guessing I still have not configured it correctly. I want it to look
like this:
Resource Group: group_1
IPaddr_192_168_11_25 (ocf::heartbeat:IPaddr): Started
www1test
apache_2 (ocf::heartbeat:apache): Started www1test
tomcat_21 (ocf::heartbeat:tomcat): Started www1test
tomcat_21 (ocf::heartbeat:tomcat): Started www2test
tomcat_22 (ocf::heartbeat:tomcat): Started www1test
tomcat_22 (ocf::heartbeat:tomcat): Started www2test
tomcat_22sdb (ocf::heartbeat:tomcat): Started www1test
tomcat_22sdb (ocf::heartbeat:tomcat): Started www2test
...
or is this not possible?
Thanks again
-----Ursprungliche Nachricht-----
Von: linux-ha-bounces at lists.linux-ha.org
[mailto:linux-ha-bounces at lists.linux-ha.org]Im Auftrag von Michael Alger
Gesendet: Montag, 7. Juli 2008 11:58
An: General Linux-HA mailing list
Betreff: Re: [Linux-HA] Tomcat times out
On Mon, Jul 07, 2008 at 11:40:06AM +0200, Ehlers, Kolja wrote:
>
> I have a general question about bash programming since yet I am
> not too familiar with it. The isrunning_tomcat() function in the
> tomcat ocf keeps returning an error code. This is the function:
>
> if wget -O /dev/null $RESOURCE_STATUSURL 2>/dev/null; then
> return $OCF_SUCCESS
> fi
> return $OCF_ERR_GENERIC
>
> The problem is the if condition keeps returning false. I just dont
> get this part:
>
> wget -O /dev/null $RESOURCE_STATUSURL 2>/dev/null;
>
> What does especially the 2 mean? I know that wget tries to connect
> to the statusurl, but the wget responds is directed to dev/null so
> how can this be true or false?
The 2> part is redirecting file descriptor 2 (stderr) to /dev/null,
which hides the status messages as well as any error messages.
The actual file download is output to /dev/null as well (via -O).
The return code is whatever wget exit()s to the system with. You can
look at it in the shell with $?.
e.g.
$ true ; echo $?
0
$ false ; echo $?
1
So to test wget, you can work out what $RESOURCE_STATUSURL is,
and then run:
wget -O /dev/null http://whatever/the/status/url/is.jsp
echo $?
The 'echo $?' should output 0 if the service is available. Anything
else will be evaluated as "false".
_______________________________________________
Linux-HA mailing list
Linux-HA at lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Geschdftsf|hrung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Kvln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.
_______________________________________________
Linux-HA mailing list
Linux-HA at lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.
More information about the Linux-HA
mailing list