LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-18-2010, 03:15 AM   #1
zdric83
LQ Newbie
 
Registered: May 2010
Posts: 5

Rep: Reputation: 0
[CentOs - Cluster Suite] It works for IP but not for Tomcat or Postgresql


Hello everybody!

At first sorry for my english which is not perfect

I have made a cluster between two server.

In luci I can see that my cluster is green and the two nodes to.
I have make an IP resource and associate it to a service : green : I can relocate the service from a node to the other one and the IP appears in the list of IP addresses

The problem is that I have made the same in order to configure tomcat and postgresql and it does not work...

I put my configuration only for ip and tomcat:

My host configuration:
Code:
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

10.0.0.1 server1.domain.com server1
10.0.0.2 server2.domain.com server2
My cluster configuration

Code:
<?xml version="1.0"?>
<cluster alias="my_cluster" config_version="21" name="my_cluster">
        <fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/>
        <clusternodes>
                <clusternode name="server1.domain.com" nodeid="1" votes="1">
                        <fence/>
                </clusternode>
                <clusternode name="server2.domain.com" nodeid="2" votes="1">
                        <fence/>
                </clusternode>
        </clusternodes>
        <cman expected_votes="1" two_node="1"/>
        <fencedevices/>
        <rm>
                <failoverdomains/>
                <resources>
                        <ip address="x.x.x.151" monitor_link="1"/>
                        <tomcat-5 catalina_base="/usr/share/tomcat5" catalina_options="" config_file="/etc/tomcat5/tomcat5.conf" name="tomcatres" shutdown_wait="30" tomcat_user="root"/>
                </resources>
                <service autostart="1" exclusive="0" name="ipservice" recovery="relocate">
                        <ip ref="x.x.x.151"/>
                </service>
                <service autostart="0" max_restarts="0" name="tomtom" recovery="restart" restart_expire_time="0">
                        <tomcat-5 ref="tomcatres"/>
                </service>
        </rm>
</cluster>
(I have tried with user tomcat but it's the same)

The error I obtain in the luci log is :

Code:
Tue May 18 10:07:40 2010 clurgmgrd[3878]:  Service service:tomtom is recovering
Tue May 18 10:07:40 2010 clurgmgrd[3878]:  Starting stopped service service:tomtom
Tue May 18 10:07:40 2010 clurgmgrd[3878]:  Stopping service service:tomtom
Tue May 18 10:07:40 2010 clurgmgrd[3878]:  start on tomcat-5 "tomcatres" returned 1 (generic error)
Tue May 18 10:07:40 2010 clurgmgrd[3878]:  #68: Failed to start service:tomtom; return value: 1
Tue May 18 10:07:40 2010 clurgmgrd: [3878]:  Checking Existence Of File /var/run/cluster/tomcat-5/tomcat-5:tomcatres.pid [tomcat-5:tomcatres] > Failed - File Doesn't Exist
Tue May 18 10:07:40 2010 clurgmgrd: [3878]:  Looking For IP Addresses [tomcat-5:tomcatres] > Failed - No IP Addresses Found
Tue May 18 10:07:40 2010 luci[4724]: Unable to retrieve batch 511027733 status from server1.domain.com:11111: module scheduled for execution
Tue May 18 10:07:41 2010 clurgmgrd[3878]:  Service service:tomtom is stopped
Tue May 18 10:07:41 2010 clurgmgrd[3878]:  #71: Relocating failed service service:tomtom
Tue May 18 10:07:46 2010 luci[4724]: Unable to retrieve batch 511027733 status from server1.domain.com:11111: clusvcadm start failed to start tomtom:
The first thing his that I do not understand why he search this PID file (I have the default tomcat configuration). The second one is the IP addresses not found...

FYI : when I start tomcat with "service tomcat start" it works

Thank you
 
Old 05-18-2010, 04:06 AM   #2
zdric83
LQ Newbie
 
Registered: May 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Ok it seems it works now :

Code:
<?xml version="1.0"?>
<cluster alias="mss_cluster" config_version="32" name="mss_cluster">
        <fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/>
        <clusternodes>
                <clusternode name="server1.domain.com" nodeid="1" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="humanfencing" nodename="server1.domain.com"/>
                                </method>
                        </fence>
                </clusternode>
                <clusternode name="server2.domain.com" nodeid="2" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="humanfencing" nodename="server2.domain.com"/>
                                </method>
                        </fence>
                </clusternode>
        </clusternodes>
        <cman expected_votes="1" two_node="1"/>
        <fencedevices>
                <fencedevice agent="fence_manual" name="humanfencing"/>
        </fencedevices>
        <rm>
                <failoverdomains>
                        <failoverdomain name="failoverDom" nofailback="0" ordered="0" restricted="0">
                                <failoverdomainnode name="server1.domain.com" priority="1"/>
                                <failoverdomainnode name="server2.domain.com" priority="1"/>
                        </failoverdomain>
                </failoverdomains>
                <resources>
                        <ip address="x.x.x.151" monitor_link="1"/>
                        <tomcat-5 catalina_base="/usr/share/tomcat5" config_file="/etc/tomcat5/tomcat5.conf" name="tomcat5" shutdown_wait="30" tomcat_user="root"/>
                </resources>
                <service autostart="1" domain="failoverDom" exclusive="0" name="ipservice" recovery="relocate">
                        <ip ref="x.x.x.151">
                                <tomcat-5 ref="tomcat5"/>
                        </ip>
                </service>
        </rm>
</cluster>
I'll check and if all OK I close subject :-D
 
Old 05-18-2010, 06:23 AM   #3
zdric83
LQ Newbie
 
Registered: May 2010
Posts: 5

Original Poster
Rep: Reputation: 0
To resume with a failover domain it works for postgres but not for tomcat.
Tomcat is still relocate from a node to the other one...

Code:
<?xml version="1.0"?>
<cluster alias="mss_cluster" config_version="43" name="mss_cluster">
        <fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/>
        <clusternodes>
                <clusternode name="server1.domain.com" nodeid="1" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="humanfencing" nodename="server1.domain.com"/>
                                </method>
                        </fence>
                </clusternode>
                <clusternode name="server2.domain.com" nodeid="2" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="humanfencing" nodename="server2.domain.com"/>
                                </method>
                        </fence>
                </clusternode>
        </clusternodes>
        <cman expected_votes="1" two_node="1"/>
        <fencedevices>
                <fencedevice agent="fence_manual" name="humanfencing"/>
        </fencedevices>
        <rm>
                <failoverdomains>
                        <failoverdomain name="failoverDom" nofailback="1" ordered="0" restricted="0">
                                <failoverdomainnode name="server1.domain.com" priority="1"/>
                                <failoverdomainnode name="server2.domain.com" priority="1"/>
                        </failoverdomain>
                </failoverdomains>
                <resources>
                        <ip address="x.x.x.151" monitor_link="1"/>
                        <postgres-8 config_file="/var/lib/pgsql/data/postgresql.conf" name="postgresql" postmaster_user="postgres" shutdown_wait="30"/>
                        <tomcat-5 catalina_base="/usr/share/tomcat5" config_file="/etc/tomcat5/tomcat5.conf" name="tomcat5" shutdown_wait="30" tomcat_user="tomcat"/>
                </resources>
                <service autostart="1" domain="failoverDom" exclusive="0" name="ipservice" recovery="relocate">
                        <ip ref="x.x.x.151">
                                <tomcat-5 ref="tomcat5"/>
                        </ip>
                </service>
        </rm>
</cluster>
Any idea?
 
Old 05-20-2010, 04:39 AM   #4
zdric83
LQ Newbie
 
Registered: May 2010
Posts: 5

Original Poster
Rep: Reputation: 0
I still have this problem in catalina.out :

Code:
su: invalid option -- D
Try `su --help' for more information.
Maybe there is a problem with the configuration?

Thanks.
 
Old 05-20-2010, 08:02 AM   #5
zdric83
LQ Newbie
 
Registered: May 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Arf I have found.....

The problem comes from /usr/share/cluster/tomcat-5.sh :
they make this command :

Code:
su "$TOMCAT_USER" -c "$JAVA_HOME/bin/java" $JAVA_OPTS $OCF_RESKEY_catalina_options \
                -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
                -Dcatalina.base="$TOMCAT_gen_catalina_base" \
                -Dcatalina.home="$CATALINA_HOME" \
                -Djava.io.tmpdir="$CATALINA_TMPDIR" \
                org.apache.catalina.startup.Bootstrap "$@" start \
                >> "$TOMCAT_gen_catalina_base"/logs/catalina.out 2>&1 &
instead of :
Code:
su "$TOMCAT_USER" -c "$JAVA_HOME/bin/java $JAVA_OPTS $OCF_RESKEY_catalina_options -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH -Dcatalina.base=$TOMCAT_gen_catalina_base -Dcatalina.home=$CATALINA_HOME -Djava.io.tmpdir=$CATALINA_TMPDIR org.apache.catalina.startup.Bootstrap $@ start">>"$TOMCAT_gen_catalina_base"/logs/catalina.out 2>&1 &

Closed
Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cluster Suite - Red Hat and CentOS kopper27 Linux - Newbie 1 03-02-2010 03:46 AM
Cluster Suite on CentOS / Red Hat karlochacon Red Hat 2 08-17-2009 09:32 AM
comps.xml for centos cluster suite (csgfs) dxangel Linux - Software 2 05-06-2009 09:25 AM
Centos Cluster Suite tajamari Linux - Software 1 09-17-2008 01:29 AM
Redhat Cluster Suite on CentOS 5.2 - NFS Service Problem nepenthes9 Linux - Enterprise 2 09-15-2008 01:15 AM


All times are GMT -5. The time now is 09:04 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration