ldirectord setup

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ldirectord setup

Ariel-41
I'm starting a new LVS-DR setup with ldirectord but am unable to get it working.  I started with trying to set up a single director server with a single real server.

My ldirectord.cf:
------------------
checktimeout=8
checkinterval=5
autoreload=yes
logfile="/var/log/ldirectord.log"
quiescent=no
fork=yes

virtual = xx.xx.xx.xx:80
        fallback = 127.0.0.1:80 gate    # if no real servers are available
        real = 10.0.0.2:80 gate 10        # weight of 10
        scheduler = wrr                          # weighted round robin
        persistent = 7200
        protocol = tcp
        service = http
        request = "test.php"
        receive = "Success"
        checktype = negotiate
------------------

The director starts up fine, I see no errors in the logfile:
------------------
[Thu May 19 15:24:37 2011|ldirectord.cf|21532] Killing child tcp:xx.xx.xx.xx:80 (PID=21538)
[Thu May 19 15:24:37 2011|ldirectord.cf|21532] Changed virtual server: xx.xx.xx.xx:80
[Thu May 19 15:24:37 2011|ldirectord.cf|21532] Restored real server: 10.0.0.2:80 (xx.xx.xx.xx:80) (Weight set to 10)
[Thu May 19 15:24:38 2011|ldirectord.cf|21532] Child not running for tcp:xx.xx.xx.xx:80, spawning
[Thu May 19 15:24:38 2011|ldirectord.cf|21532] Spawned child tcp:xx.xx.xx.xx:80 PID=22592
[Thu May 19 15:24:46 2011|ldirectord.cf|22593] Invoking ldirectord invoked as: /usr/sbin/ldirectord /etc/ldirectord.cf restart
[Thu May 19 15:24:46 2011|ldirectord.cf|21532] Killing child tcp:xx.xx.xx.xx:80 PID=22592
[Thu May 19 15:24:46 2011|ldirectord.cf|21532] Purged real server (stop): 10.0.0.2:80 (xx.xx.xx.xx:80)
[Thu May 19 15:24:46 2011|ldirectord.cf|21532] Purged virtual server (stop): xx.xx.xx.xx:80
[Thu May 19 15:24:46 2011|ldirectord.cf|21532] Linux Director Daemon terminated on signal: TERM
[Thu May 19 15:24:47 2011|ldirectord.cf|22593] Starting Linux Director v1.186-ha as daemon
[Thu May 19 15:24:47 2011|ldirectord.cf|22601] Added virtual server: xx.xx.xx.xx:80
[Thu May 19 15:24:47 2011|ldirectord.cf|22601] Added fallback server: 127.0.0.1:80 (xx.xx.xx.xx:80) (Weight set to 1)
[Thu May 19 15:24:47 2011|ldirectord.cf|22601] Child not running for tcp:xx.xx.xx.xx:80, spawning
[Thu May 19 15:24:47 2011|ldirectord.cf|22601] Spawned child tcp:xx.xx.xx.xx:80 PID=22607
[Thu May 19 15:24:47 2011|ldirectord.cf|22607] Resetting soft failure count: 10.0.0.2:80 (tcp:xx.xx.xx.xx:80)
[Thu May 19 15:24:47 2011|ldirectord.cf|22607] Added real server: 10.0.0.2:80 (xx.xx.xx.xx:80) (Weight set to 10)
[Thu May 19 15:24:47 2011|ldirectord.cf|22607] Deleted fallback server: 127.0.0.1:80 (xx.xx.xx.xx:80)
------------------

When why I try to send any traffic to the xx.xx.xx.xx IP address, it seems to go nowhere.  My real server never sees the incoming traffic (using tcpdump).  Using tcpdump on the ldirectord server shows that it is polling the "test.php" file successfully very often, but no further traffic is going out.

Results of:  ipvsadm -L
------------------
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  xx.xx.xx.xx wrr persistent 7200
  -> 10.0.0.2:www                      Route   10     0          0
------------------

When I try to curl xx.xx.xx.xx from anywhere else on the network, the InActConn increments (if I try it 12 times within a minute, it goes up to 12 InActConn's), but nothing is getting served, not even so much as an ACK-SYN comes back.

I am really stuck at this point and have no idea what to try, there seems to be very little documentation anywhere on how ldirectord actually works except the manpage.  All documentation online seems to be only about setting up clustering services like heartbeat/pacemaker/keepalived to manage director failover and nothing about actually setting up a working director.

Any suggestions for what to try next would be very welcome.
_______________________________________________
Linux-HA mailing list
[hidden email]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Reply | Threaded
Open this post in threaded view
|

Re: ldirectord setup

mike-761
On 11-05-19 04:41 PM, Ariel wrote:

> I'm starting a new LVS-DR setup with ldirectord but am unable to get it working.  I started with trying to set up a single director server with a single real server.
>
> My ldirectord.cf:
> ------------------
> checktimeout=8
> checkinterval=5
> autoreload=yes
> logfile="/var/log/ldirectord.log"
> quiescent=no
> fork=yes
>
> virtual = xx.xx.xx.xx:80
>          fallback = 127.0.0.1:80 gate    # if no real servers are available
>          real = 10.0.0.2:80 gate 10        # weight of 10
>          scheduler = wrr                          # weighted round robin
>          persistent = 7200
>          protocol = tcp
>          service = http
>          request = "test.php"
>          receive = "Success"
>          checktype = negotiate
> ------------------
>
> The director starts up fine, I see no errors in the logfile:
> ------------------
> [Thu May 19 15:24:37 2011|ldirectord.cf|21532] Killing child tcp:xx.xx.xx.xx:80 (PID=21538)
> [Thu May 19 15:24:37 2011|ldirectord.cf|21532] Changed virtual server: xx.xx.xx.xx:80
> [Thu May 19 15:24:37 2011|ldirectord.cf|21532] Restored real server: 10.0.0.2:80 (xx.xx.xx.xx:80) (Weight set to 10)
> [Thu May 19 15:24:38 2011|ldirectord.cf|21532] Child not running for tcp:xx.xx.xx.xx:80, spawning
> [Thu May 19 15:24:38 2011|ldirectord.cf|21532] Spawned child tcp:xx.xx.xx.xx:80 PID=22592
> [Thu May 19 15:24:46 2011|ldirectord.cf|22593] Invoking ldirectord invoked as: /usr/sbin/ldirectord /etc/ldirectord.cf restart
> [Thu May 19 15:24:46 2011|ldirectord.cf|21532] Killing child tcp:xx.xx.xx.xx:80 PID=22592
> [Thu May 19 15:24:46 2011|ldirectord.cf|21532] Purged real server (stop): 10.0.0.2:80 (xx.xx.xx.xx:80)
> [Thu May 19 15:24:46 2011|ldirectord.cf|21532] Purged virtual server (stop): xx.xx.xx.xx:80
> [Thu May 19 15:24:46 2011|ldirectord.cf|21532] Linux Director Daemon terminated on signal: TERM
> [Thu May 19 15:24:47 2011|ldirectord.cf|22593] Starting Linux Director v1.186-ha as daemon
> [Thu May 19 15:24:47 2011|ldirectord.cf|22601] Added virtual server: xx.xx.xx.xx:80
> [Thu May 19 15:24:47 2011|ldirectord.cf|22601] Added fallback server: 127.0.0.1:80 (xx.xx.xx.xx:80) (Weight set to 1)
> [Thu May 19 15:24:47 2011|ldirectord.cf|22601] Child not running for tcp:xx.xx.xx.xx:80, spawning
> [Thu May 19 15:24:47 2011|ldirectord.cf|22601] Spawned child tcp:xx.xx.xx.xx:80 PID=22607
> [Thu May 19 15:24:47 2011|ldirectord.cf|22607] Resetting soft failure count: 10.0.0.2:80 (tcp:xx.xx.xx.xx:80)
> [Thu May 19 15:24:47 2011|ldirectord.cf|22607] Added real server: 10.0.0.2:80 (xx.xx.xx.xx:80) (Weight set to 10)
> [Thu May 19 15:24:47 2011|ldirectord.cf|22607] Deleted fallback server: 127.0.0.1:80 (xx.xx.xx.xx:80)
> ------------------
>
> When why I try to send any traffic to the xx.xx.xx.xx IP address, it seems to go nowhere.  My real server never sees the incoming traffic (using tcpdump).  Using tcpdump on the ldirectord server shows that it is polling the "test.php" file successfully very often, but no further traffic is going out.
>
> Results of:  ipvsadm -L
> ------------------
> IP Virtual Server version 1.2.1 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
>    ->  RemoteAddress:Port           Forward Weight ActiveConn InActConn
> TCP  xx.xx.xx.xx wrr persistent 7200
>    ->  10.0.0.2:www                      Route   10     0          0
> ------------------
>
> When I try to curl xx.xx.xx.xx from anywhere else on the network, the InActConn increments (if I try it 12 times within a minute, it goes up to 12 InActConn's), but nothing is getting served, not even so much as an ACK-SYN comes back.
>
> I am really stuck at this point and have no idea what to try, there seems to be very little documentation anywhere on how ldirectord actually works except the manpage.  All documentation online seems to be only about setting up clustering services like heartbeat/pacemaker/keepalived to manage director failover and nothing about actually setting up a working director.
>
> Any suggestions for what to try next would be very welcome.
> _______________________________________________
> Linux-HA mailing list
> [hidden email]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
>
You may be suffering from the arp problem. Put these entries in your
/etc/sysctl.conf file on the guest that is supposed to be accepting the
traffic - not the LVS server but the back end server.

net.ipv4.conf.eth0.arp_ignore = 1
net.ipv4.conf.eth0.arp_announce = 2
net.ipv4.conf.eth1.arp_ignore = 1
net.ipv4.conf.eth1.arp_announce = 2
#net.ipv4.conf.hsi0.arp_ignore = 1
#net.ipv4.conf.hsi0.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2

_______________________________________________
Linux-HA mailing list
[hidden email]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Reply | Threaded
Open this post in threaded view
|

Anyone successfully install PAcemaker/Corosync on Freebsd?

mike-761
Hi All,

just curious if anyone has had any luck at one point installing
Pacemaker and Corosync on FreeBSD.

I've run into an issue when running ./configure while trying to install
Corosync. The process craps out at nss with this error:
checking for nss... configure: error: in `/root/heartbeat/corosync-2.3.3':
configure: error: The pkg-config script could not be found or is too
old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.​
Alternatively, you may set the environment variables nss_CFLAGS
and nss_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

I've looked unsuccessfully for a package called pkg-config and nss
appears to be installed as you can see from this output:
root@wellesley:~/heartbeat/corosync-2.3.3 # pkg install nss
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (0 conflicting)
The most recent version of packages are already installed

Anyway - just looking for any suggestions. Hoping that perhaps someone
has successfully done this.

thanks in advance
-mgb
_______________________________________________
Linux-HA mailing list is closing down.
Please subscribe to [hidden email] instead.
http://clusterlabs.org/mailman/listinfo/users
_______________________________________________
[hidden email]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
Reply | Threaded
Open this post in threaded view
|

Re: Anyone successfully install PAcemaker/Corosync on Freebsd?

Timur I. Bakeyev
The real answer is that you possibly don't want to dive into that. FreeBSD
is not supported by pacemaker/corosync and, I don't think you'd like to do
the porting yourself.

The 'pkg-config' in FreeBSD was replaced by 'pkgconf', so you need to
install 'pkgconf' to get the desired binary. But that would be only the
beginning of a long journey...

You may take a look onto /usr/ports/sysutils/heartbeat as an older, but
ported variant of clustering software. Still, most of the code and OCF
resources are written with Linux in mind, so possibly won't work on FreeBSD.

Wish you good luck,
Timur Bakeyev.



On Sat, Dec 19, 2015 at 11:47 PM, mike <[hidden email]> wrote:

> Hi All,
>
> just curious if anyone has had any luck at one point installing Pacemaker
> and Corosync on FreeBSD.
>
> I've run into an issue when running ./configure while trying to install
> Corosync. The process craps out at nss with this error:
> checking for nss... configure: error: in `/root/heartbeat/corosync-2.3.3':
> configure: error: The pkg-config script could not be found or is too old.
> Make sure it
> is in your PATH or set the PKG_CONFIG environment variable to the full
> path to pkg-config.​
> Alternatively, you may set the environment variables nss_CFLAGS
> and nss_LIBS to avoid the need to call pkg-config.
> See the pkg-config man page for more details.
>
> I've looked unsuccessfully for a package called pkg-config and nss appears
> to be installed as you can see from this output:
> root@wellesley:~/heartbeat/corosync-2.3.3 # pkg install nss
> Updating FreeBSD repository catalogue...
> FreeBSD repository is up-to-date.
> All repositories are up-to-date.
> Checking integrity... done (0 conflicting)
> The most recent version of packages are already installed
>
> Anyway - just looking for any suggestions. Hoping that perhaps someone has
> successfully done this.
>
> thanks in advance
> -mgb
> _______________________________________________
> Linux-HA mailing list is closing down.
> Please subscribe to [hidden email] instead.
> http://clusterlabs.org/mailman/listinfo/users
> _______________________________________________
> [hidden email]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
_______________________________________________
Linux-HA mailing list is closing down.
Please subscribe to [hidden email] instead.
http://clusterlabs.org/mailman/listinfo/users
_______________________________________________
[hidden email]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
Reply | Threaded
Open this post in threaded view
|

Re: Anyone successfully install PAcemaker/Corosync on Freebsd?

Lars Ellenberg
In reply to this post by mike-761

Moving to [hidden email].

On Sat, Dec 19, 2015 at 06:47:54PM -0400, mike wrote:
> Hi All,
>
> just curious if anyone has had any luck at one point installing
> Pacemaker and Corosync on FreeBSD.

According to pacemaker changelog, at least
David Shane Holden <dpejesh@...> and Ruben Kerkhof <ruben@...>
have been submitting pull requests recently with freebsd compat fixes,
maybe they can help?

   Lars

> I've run into an issue when running ./configure while trying to
> install Corosync. The process craps out at nss with this error:
> checking for nss... configure: error: in `/root/heartbeat/corosync-2.3.3':
> configure: error: The pkg-config script could not be found or is too
> old. Make sure it
> is in your PATH or set the PKG_CONFIG environment variable to the full
> path to pkg-config.​
> Alternatively, you may set the environment variables nss_CFLAGS
> and nss_LIBS to avoid the need to call pkg-config.
> See the pkg-config man page for more details.
>
> I've looked unsuccessfully for a package called pkg-config and nss
> appears to be installed as you can see from this output:
> root@wellesley:~/heartbeat/corosync-2.3.3 # pkg install nss
> Updating FreeBSD repository catalogue...
> FreeBSD repository is up-to-date.
> All repositories are up-to-date.
> Checking integrity... done (0 conflicting)
> The most recent version of packages are already installed
>
> Anyway - just looking for any suggestions. Hoping that perhaps
> someone has successfully done this.
>
> thanks in advance
> -mgb

--
: Lars Ellenberg
: http://www.LINBIT.com
_______________________________________________
Linux-HA mailing list is closing down.
Please subscribe to [hidden email] instead.
http://clusterlabs.org/mailman/listinfo/users
_______________________________________________
[hidden email]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
Reply | Threaded
Open this post in threaded view
|

Re: Anyone successfully install PAcemaker/Corosync on Freebsd?

Ruben Kerkhof

> On 10 Feb 2016, at 09:47, Lars Ellenberg <[hidden email]> wrote:
>
>
> Moving to [hidden email].
>
> On Sat, Dec 19, 2015 at 06:47:54PM -0400, mike wrote:
>> Hi All,
>>
>> just curious if anyone has had any luck at one point installing
>> Pacemaker and Corosync on FreeBSD.
>
> According to pacemaker changelog, at least
> David Shane Holden <dpejesh@...> and Ruben Kerkhof <ruben@...>
> have been submitting pull requests recently with freebsd compat fixes,
> maybe they can help?
>
>   Lars
>
>> I've run into an issue when running ./configure while trying to
>> install Corosync. The process craps out at nss with this error:
>> checking for nss... configure: error: in `/root/heartbeat/corosync-2.3.3':
>> configure: error: The pkg-config script could not be found or is too
>> old. Make sure it
>> is in your PATH or set the PKG_CONFIG environment variable to the full
>> path to pkg-config.​
>> Alternatively, you may set the environment variables nss_CFLAGS
>> and nss_LIBS to avoid the need to call pkg-config.
>> See the pkg-config man page for more details.
>>
>> I've looked unsuccessfully for a package called pkg-config and nss
>> appears to be installed as you can see from this output:
>> root@wellesley:~/heartbeat/corosync-2.3.3 # pkg install nss
>> Updating FreeBSD repository catalogue...
>> FreeBSD repository is up-to-date.
>> All repositories are up-to-date.
>> Checking integrity... done (0 conflicting)
>> The most recent version of packages are already installed
>>
>> Anyway - just looking for any suggestions. Hoping that perhaps
>> someone has successfully done this.

For some reason pkg-config is called pkgconf on FreeBSD.
Latest master compiles fine now, you will need to do ./configure MAKE=gmake however.

>>
>> thanks in advance
>> -mgb
>
> --
> : Lars Ellenberg
> : http://www.LINBIT.com

Kind regards,

Ruben Kerkhof
_______________________________________________
Linux-HA mailing list is closing down.
Please subscribe to [hidden email] instead.
http://clusterlabs.org/mailman/listinfo/users
_______________________________________________
[hidden email]
http://lists.linux-ha.org/mailman/listinfo/linux-ha