No service corosync

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

No service corosync

Postby adriend » Jun 29th, '12, 20:02

Hi,

I have two servers on Mageia2. I want to make a cluster whith this two servers, but there isn't heartbeat package on Mageia2 and compilation not work.

I decided to use pacemaker and corosync (recommanded by the Wiki).

I found a tuto here:

http://kaivanov.blogspot.fr/2012/01/bui ... maker.html

but [root@node1 ~]# /etc/init.d/corosync start doesn't exists.

Can I configure a cluster on Mageia2 servers ?

srv01 - 192.168.56.201
srv02 - 192.168.56.202

future node cluster - 192.168.56.200

Help ?

Code: Select all
[root@srv01 ~]# cat /etc/corosync/service.d/pcmk
service {
# Load the Pacemaker Cluster Resource Manager
name: pacemaker
ver: 1
}
END


Code: Select all
[root@srv01 ~]# cat /etc/corosync/corosync.conf
# Please read the corosync.conf.5 manual page
totem {
        version: 2

        # cypto_cipher and crypto_hash: Used for mutual node authentication.
        # If you choose to enable this, then do remember to create a shared
        # secret with "corosync-keygen".
        crypto_cipher: none
        crypto_hash: none

        # interface: define at least one interface to communicate
        # over. If you define more than one interface stanza, you must
        # also set rrp_mode.
        interface {
                # Rings must be consecutively numbered, starting at 0.
                ringnumber: 0
                # This is normally the *network* address of the
                # interface to bind to. This ensures that you can use
                # identical instances of this configuration file
                # across all your cluster nodes, without having to
                # modify this option.
                bindnetaddr: 192.168.56.0
                # However, if you have multiple physical network
                # interfaces configured for the same subnet, then the
                # network address alone is not sufficient to identify
                # the interface Corosync should bind to. In that case,
                # configure the *host* address of the interface
                # instead:
                # bindnetaddr: 192.168.1.1
                # When selecting a multicast address, consider RFC
                # 2365 (which, among other things, specifies that
                # 239.255.x.x addresses are left to the discretion of
                # the network administrator). Do not reuse multicast
                # addresses across multiple Corosync clusters sharing
                # the same network.
                mcastaddr: 226.94.1.1
                # Corosync uses the port you specify here for UDP
                # messaging, and also the immediately preceding
                # port. Thus if you set this to 5405, Corosync sends
                # messages over UDP ports 5405 and 5404.
                mcastport: 4000
                # Time-to-live for cluster communication packets. The
                # number of hops (routers) that this ring will allow
                # itself to pass. Note that multicast routing must be
                # specifically enabled on most network routers.
                ttl: 1
        }
}

logging {
        # Log the source file and line where messages are being
        # generated. When in doubt, leave off. Potentially useful for
        # debugging.
        fileline: off
        # Log to standard error. When in doubt, set to no. Useful when
        # running in the foreground (when invoking "corosync -f")
        to_stderr: no
        # Log to a log file. When set to "no", the "logfile" option
        # must not be set.
        to_logfile: yes
        logfile: /var/log/cluster/corosync.log
        # Log to the system log daemon. When in doubt, set to yes.
        to_syslog: yes
        # Log debug messages (very verbose). When in doubt, leave off.
        debug: off
        # Log messages with time stamps. When in doubt, set to on
        # (unless you are only logging to syslog, where double
        # timestamps can be annoying).
        timestamp: on
        logger_subsys {
                subsys: QUORUM
                debug: off
        }
}

quorum {
        # Enable and configure quorum subsystem (default: off)
        # see also corosync.conf.5 and votequorum.5
        #provider: corosync_votequorum
}


Code: Select all
[root@srv01 ~]# cat /etc/hosts
# generated by drakconnect
127.0.0.1 srv01
127.0.0.1 localhost
192.168.56.201 srv01
192.168.56.202 srv02


Code: Select all
[root@srv01 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:6F:A9:B2 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3716 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2043 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          RX bytes:3294737 (3.1 MiB)  TX bytes:129927 (126.8 KiB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:01:78:F7 
          inet adr:192.168.56.201  Bcast:192.168.56.255  Masque:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:44683 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49746 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          RX bytes:12051365 (11.4 MiB)  TX bytes:12141238 (11.5 MiB)

lo        Link encap:Boucle locale 
          inet adr:127.0.0.1  Masque:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:60795 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60795 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          RX bytes:6361744 (6.0 MiB)  TX bytes:6361744 (6.0 MiB)



Code: Select all
[root@srv02 init.d]# cat /etc/hosts
# generated by drakconnect
127.0.0.1 srv02
127.0.0.1 localhost
192.168.56.202 srv02
192.168.56.201 srv01


Code: Select all
[root@srv02 init.d]# ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:BB:1F:B1 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24586 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12869 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          RX bytes:21699955 (20.6 MiB)  TX bytes:739329 (722.0 KiB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:3C:0A:22 
          inet adr:192.168.56.202  Bcast:192.168.56.255  Masque:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:48752 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47413 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          RX bytes:12567115 (11.9 MiB)  TX bytes:11844533 (11.2 MiB)

lo        Link encap:Boucle locale 
          inet adr:127.0.0.1  Masque:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:64203 errors:0 dropped:0 overruns:0 frame:0
          TX packets:64203 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          RX bytes:6710173 (6.3 MiB)  TX bytes:6710173 (6.3 MiB)
adriend
 

Re: No service corosync

Postby doktor5000 » Jun 29th, '12, 23:15

Well, we have corosync and pacemaker packaged, why not use those?
As as we switched to systemd, you may want to try
Code: Select all
systemctl start corosync.service

You may also want to take a look at f.ex. http://fedoraproject.org/wiki/SysVinit_ ... Cheatsheet
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18016
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: No service corosync

Postby adriend » Jun 29th, '12, 23:46

Hi,

Thanks, it works.... the service start.

But After:

Image

Can you help me?

Edit:

When I do systemctl restarts corosync.service on srv02, on srv01 log say:

Code: Select all
Jun 28 21:34:54 [3183] srv01 corosync notice  [TOTEM ] A processor joined or left the membership and a new membership was formed.
Jun 28 21:34:54 [3183] srv01 corosync notice  [MAIN  ] Completed service synchronization, ready to provide service.
Jun 28 21:34:55 [3183] srv01 corosync notice  [TOTEM ] A processor joined or left the membership and a new membership was formed.
Jun 28 21:34:55 [3183] srv01 corosync notice  [MAIN  ] Completed service synchronization, ready to provide service.


And after, when i do /etc/init.d/pacemaker start on srv02, on srv01 log say:

Code: Select all
Jun 28 21:35:03 [3220] srv01 stonith-ng:     info: crm_new_peer:        Node srv02 now has id: 3392710848
Jun 28 21:35:03 [3220] srv01 stonith-ng:     info: crm_new_peer:        Node 3392710848 is now known as srv02
Jun 28 21:35:03 [3219] srv01        cib:     info: crm_new_peer:        Node srv02 now has id: 3392710848
Jun 28 21:35:03 [3219] srv01        cib:     info: crm_new_peer:        Node 3392710848 is now known as srv02
adriend
 

Re: No service corosync

Postby isadora » Jun 30th, '12, 07:36

Of course, i don't want to steal the topic, but i found following:
http://snozberry.org/blog/2012/05/02/co ... -centos-6/

Maybe it gives you some hands-on into configuring corosync. :)
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2763
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: No service corosync

Postby adriend » Jun 30th, '12, 14:42

Hi,

isadora, i follow your link but when i do:

crm configure property stonith-enabled=false

This command line not work:

Code: Select all
[root@srv01 corosync]# crm configure property stonith-enabled=false
Call cib_replace failed (-41): Remote node did not respond
<null>
ERROR: could not replace cib
INFO: offending xml: <configuration>
        <crm_config>
                <cluster_property_set id="cib-bootstrap-options">
                        <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="false"/>
                </cluster_property_set>
        </crm_config>
        <nodes/>
        <resources/>
        <constraints/>
</configuration>


The two firewall are disabled.


Code: Select all
[root@srv01 adrien]# cat /etc/corosync/corosync.conf

aisexec {
        user:   root
        group:  root
}

# Please read the corosync.conf.5 manual page
totem {
        version: 2

        crypto_cipher: none
        crypto_hash: none

        interface {
                ringnumber: 0
                bindnetaddr: 192.168.56.0
                mcastport: 5405
                ttl: 1
        }
        transport: udpu
}

logging {
        fileline: off
        to_logfile: yes
        to_syslog: yes
        debug: on
        logfile: /var/log/cluster/corosync.log
        debug: off
        timestamp: on
        logger_subsys {
                subsys: QUORUM
                debug: off
        }
}

nodelist {
        node {
                ring0_addr: 192.168.56.201
        }
        node {
                ring0_addr: 192.168.56.202
        }
}

quorum {
        # Enable and configure quorum subsystem (default: off)
        # see also corosync.conf.5 and votequorum.5
        #provider: corosync_votequorum
}


I do not know how the corosync.conf file must be configured
adriend
 

Re: No service corosync

Postby isadora » Jun 30th, '12, 15:42

Found some link where someone ran into the same problems, it seems:
http://lists.linux-ha.org/pipermail/lin ... 42407.html

Looks like his configuration is a bit different.
Hope it brings you in some good direction.
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2763
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: No service corosync

Postby adriend » Jun 30th, '12, 18:12

Hi,

Thanks, It works on CentOS Server (try in Virtual Machines, with this same tutorial).

I will try to copy the corosync.conf and modify IP address.
adriend
 

Re: No service corosync

Postby adriend » Jun 30th, '12, 21:15

Code: Select all
[root@srv02 corosync]# crm configure property stonith-enabled=false
Call cib_replace failed (-41): Remote node did not respond
<null>
ERROR: could not replace cib
INFO: offending xml: <configuration>
        <crm_config>
                <cluster_property_set id="cib-bootstrap-options">
                        <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="false"/>
                </cluster_property_set>
        </crm_config>
        <nodes/>
        <resources/>
        <constraints/>
</configuration>


Not Work. I copy the corosync.conf and service.d/pcmk files, and i use the same tutorial but it not works!

Code: Select all
[root@info01 adrien]# cat /etc/corosync/corosync.conf
aisexec {
        user:   root
        group:  root
}

# Please read the corosync.conf.5 manual page
compatibility: whitetank

totem {
        version: 2
        secauth: off
        interface {
                member {
                        memberaddr: 192.168.56.201
                }
                member {
                        memberaddr: 192.168.56.202
                }
                ringnumber: 0
                bindnetaddr: 192.168.56.0
                mcastport: 5405
                ttl: 1
        }
        transport: udpu
}

logging {
        fileline: off
        to_logfile: yes
        to_syslog: yes
        debug: on
        logfile: /var/log/cluster/corosync.log
        debug: off
        timestamp: on
        logger_subsys {
                subsys: AMF
                debug: off
        }
}




[root@info01 adrien]# cat /etc/corosync/service.d/pcmk
service {
name:   pacemaker
ver:    1
}




Which software use for clustering on Mageia OS ?
adriend
 

Re: No service corosync

Postby doktor5000 » Jul 1st, '12, 14:56

The question is, for what do you want to use that cluster, and which application/ressource should switchover if one cluster node fails?
Apart from that, in my opinion, if you can't even setup such a cluster following tutorials and googling, maybe you should get some help from some local, who did similar stuff before. As otherwise, what will you do if there are problems with cluster switchover, fencing problems, split-brain syndrom or if STONITH does not work?

BTW: STONITH is one of the coolest and most-easily-memorable acronyms i've encountered so far: Shoot The Other Node In The Head
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18016
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: No service corosync

Postby adriend » Jul 2nd, '12, 17:19

Hi,

I would like use a cluster for an Intranet website in my company.

The Intranet use apache, and Mysql for news in the company (a CMS) , and i would like extend the Intranet to Internet (with an Internet Website with a domainname).

Thanks.
adriend
 

Re: No service corosync

Postby doktor5000 » Jul 2nd, '12, 17:41

What would be the main use case, failover cluster or load-balancing cluster? And how business critical is everything running on that apache&mysql that you want to set up an such a cluster for that? Currently sounds like cracking a nut with a sledgehammer.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18016
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: No service corosync

Postby adriend » Jul 2nd, '12, 18:06

Hi,

I wanted to find this type of operation to put in place after a business application based on a web interface (ERP).

Understand and implement on a small application to set up after large-scale thereafter.

Thanks!
adriend
 

Re: No service corosync

Postby adriend » Jul 4th, '12, 23:38

Hi,

I'm still stuck, it's still not working. Nobody has tried to implement this system?

Thanks
adriend
 


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron