Welcome! Log In Create A New Profile

Advanced

srv_is_up : unable to find server.

Posted by Brent Clark 
Brent Clark
srv_is_up : unable to find server.
June 05, 2018 01:30PM
Good day Guys

I am at a total loss, and Im hoping someone on this list, would be so
kind to review my setup.

I am trying to get haproxy to monitor redis / sentinel. But I keep getting.

[WARNING] 155/110602 (309) : config : log format ignored for frontend
'ft_redis' since it has no log address.
[ALERT] 155/110602 (309) : parsing
[/usr/local/etc/haproxy/haproxy.cfg:29] : unable to find server
'10.42.131.120' in proxy 'bk_redis', referenced in arg 1 of ACL keyword
'srv_is_up' in proxy 'bk_redis'.
[ALERT] 155/110602 (309) : parsing
[/usr/local/etc/haproxy/haproxy.cfg:30] : unable to find server
'10.42.40.236' in proxy 'bk_redis', referenced in arg 1 of ACL keyword
'srv_is_up' in proxy 'bk_redis'.
[ALERT] 155/110602 (309) : parsing
[/usr/local/etc/haproxy/haproxy.cfg:31] : unable to find server
'10.42.224.133' in proxy 'bk_redis', referenced in arg 1 of ACL keyword
'srv_is_up' in proxy 'bk_redis'.
[ALERT] 155/110602 (309) : Fatal errors found in configuration.

What I cant understand is, I changed to ips as opposed to hostnames. But
haproxy still cant  see the peer.

Here is my configuration file.
https://pastebin.com/raw/DGTsNRDs

If someone can assist it would be appreciated.

Kind Regards

Brent Clark
Lukas Tribus
Re: srv_is_up : unable to find server.
June 05, 2018 01:50PM
On 5 June 2018 at 13:18, Brent Clark <[email protected].com> wrote:
> Good day Guys
>
> I am at a total loss, and Im hoping someone on this list, would be so kind
> to review my setup.
>
> I am trying to get haproxy to monitor redis / sentinel. But I keep getting.
>
> [WARNING] 155/110602 (309) : config : log format ignored for frontend
> 'ft_redis' since it has no log address.
> [ALERT] 155/110602 (309) : parsing [/usr/local/etc/haproxy/haproxy.cfg:29] :
> unable to find server '10.42.131.120' in proxy 'bk_redis', referenced in arg
> 1 of ACL keyword 'srv_is_up' in proxy 'bk_redis'.
> [ALERT] 155/110602 (309) : parsing [/usr/local/etc/haproxy/haproxy.cfg:30] :
> unable to find server '10.42.40.236' in proxy 'bk_redis', referenced in arg
> 1 of ACL keyword 'srv_is_up' in proxy 'bk_redis'.
> [ALERT] 155/110602 (309) : parsing [/usr/local/etc/haproxy/haproxy.cfg:31] :
> unable to find server '10.42.224.133' in proxy 'bk_redis', referenced in arg
> 1 of ACL keyword 'srv_is_up' in proxy 'bk_redis'.
> [ALERT] 155/110602 (309) : Fatal errors found in configuration.
>
> What I cant understand is, I changed to ips as opposed to hostnames. But
> haproxy still cant see the peer.
>
> Here is my configuration file.
> https://pastebin.com/raw/DGTsNRDs
>
> If someone can assist it would be appreciated.

I don't understand what it is you are trying to achieve, none of what
you configured makes sense to me.

Can you elaborate what you expect haproxy to do and why you need all
those backends and use-server directives?


Regards,
Lukas
Jerome Magnin
Re: srv_is_up : unable to find server.
June 05, 2018 02:00PM
Hi Brent,

On Tue, Jun 05, 2018 at 01:18:36PM +0200, Brent Clark wrote:
> Good day Guys
>
> I am at a total loss, and Im hoping someone on this list, would be so kind
> to review my setup.
>
> I am trying to get haproxy to monitor redis / sentinel. But I keep getting.
>
> [WARNING] 155/110602 (309) : config : log format ignored for frontend
> 'ft_redis' since it has no log address.
> [ALERT] 155/110602 (309) : parsing [/usr/local/etc/haproxy/haproxy.cfg:29] :
> unable to find server '10.42.131.120' in proxy 'bk_redis', referenced in arg
> 1 of ACL keyword 'srv_is_up' in proxy 'bk_redis'.
> [ALERT] 155/110602 (309) : parsing [/usr/local/etc/haproxy/haproxy.cfg:30] :
> unable to find server '10.42.40.236' in proxy 'bk_redis', referenced in arg
> 1 of ACL keyword 'srv_is_up' in proxy 'bk_redis'.
> [ALERT] 155/110602 (309) : parsing [/usr/local/etc/haproxy/haproxy.cfg:31] :
> unable to find server '10.42.224.133' in proxy 'bk_redis', referenced in arg
> 1 of ACL keyword 'srv_is_up' in proxy 'bk_redis'.
> [ALERT] 155/110602 (309) : Fatal errors found in configuration.
>
> What I cant understand is, I changed to ips as opposed to hostnames. But
> haproxy still cant  see the peer.
>
> Here is my configuration file.
> https://pastebin.com/raw/DGTsNRDs
>
> If someone can assist it would be appreciated.
>

srv_is_up takes an optionnal backend name and a mandatory server name as
argument. server name is the second argument on a server line, it does not have
to be a (resolvable) fqdn.

example:

use-server redis-server-0 if { srv_is_up(10.42.131.120/sentinel0) } ...

I'm not sure I understand what you want to do, though.

--
Jérôme
Brent Clark
Re: srv_is_up : unable to find server.
June 05, 2018 02:00PM
Thanks Jerome

I just see this setup goes in line with that you are saying.

https://yemaosheng.com/2016/04/haproxy-cfg-for-redis-sentinel/

Thanks so much for replying.

Regards

Brent


On 05/06/2018 13:49, Jerome Magnin wrote:
> Hi Brent,
>
> On Tue, Jun 05, 2018 at 01:18:36PM +0200, Brent Clark wrote:
>> Good day Guys
>>
>> I am at a total loss, and Im hoping someone on this list, would be so kind
>> to review my setup.
>>
>> I am trying to get haproxy to monitor redis / sentinel. But I keep getting.
>>
>> [WARNING] 155/110602 (309) : config : log format ignored for frontend
>> 'ft_redis' since it has no log address.
>> [ALERT] 155/110602 (309) : parsing [/usr/local/etc/haproxy/haproxy.cfg:29] :
>> unable to find server '10.42.131.120' in proxy 'bk_redis', referenced in arg
>> 1 of ACL keyword 'srv_is_up' in proxy 'bk_redis'.
>> [ALERT] 155/110602 (309) : parsing [/usr/local/etc/haproxy/haproxy.cfg:30] :
>> unable to find server '10.42.40.236' in proxy 'bk_redis', referenced in arg
>> 1 of ACL keyword 'srv_is_up' in proxy 'bk_redis'.
>> [ALERT] 155/110602 (309) : parsing [/usr/local/etc/haproxy/haproxy.cfg:31] :
>> unable to find server '10.42.224.133' in proxy 'bk_redis', referenced in arg
>> 1 of ACL keyword 'srv_is_up' in proxy 'bk_redis'.
>> [ALERT] 155/110602 (309) : Fatal errors found in configuration.
>>
>> What I cant understand is, I changed to ips as opposed to hostnames. But
>> haproxy still cant  see the peer.
>>
>> Here is my configuration file.
>> https://pastebin.com/raw/DGTsNRDs
>>
>> If someone can assist it would be appreciated.
>>
> srv_is_up takes an optionnal backend name and a mandatory server name as
> argument. server name is the second argument on a server line, it does not have
> to be a (resolvable) fqdn.
>
> example:
>
> use-server redis-server-0 if { srv_is_up(10.42.131.120/sentinel0) } ...
>
> I'm not sure I understand what you want to do, though.
>
Brent Clark
Re: srv_is_up : unable to find server.
June 05, 2018 02:40PM
Thanks for replying

Im trying to get haproxy to monitor redis-sentinel / redis and see which
one redis instance is the master so that traffic is sent there.
As originally, per this example
https://www.haproxy.com/blog/haproxy-advanced-redis-health-check/ (See
the comment January 7, 2018 at 6:52)

Regards

Brent


On 05/06/2018 13:43, Lukas Tribus wrote:
> On 5 June 2018 at 13:18, Brent Clark <[email protected]> wrote:
>> Good day Guys
>>
>> I am at a total loss, and Im hoping someone on this list, would be so kind
>> to review my setup.
>>
>> I am trying to get haproxy to monitor redis / sentinel. But I keep getting.
>>
>> [WARNING] 155/110602 (309) : config : log format ignored for frontend
>> 'ft_redis' since it has no log address.
>> [ALERT] 155/110602 (309) : parsing [/usr/local/etc/haproxy/haproxy.cfg:29] :
>> unable to find server '10.42.131.120' in proxy 'bk_redis', referenced in arg
>> 1 of ACL keyword 'srv_is_up' in proxy 'bk_redis'.
>> [ALERT] 155/110602 (309) : parsing [/usr/local/etc/haproxy/haproxy.cfg:30] :
>> unable to find server '10.42.40.236' in proxy 'bk_redis', referenced in arg
>> 1 of ACL keyword 'srv_is_up' in proxy 'bk_redis'.
>> [ALERT] 155/110602 (309) : parsing [/usr/local/etc/haproxy/haproxy.cfg:31] :
>> unable to find server '10.42.224.133' in proxy 'bk_redis', referenced in arg
>> 1 of ACL keyword 'srv_is_up' in proxy 'bk_redis'.
>> [ALERT] 155/110602 (309) : Fatal errors found in configuration.
>>
>> What I cant understand is, I changed to ips as opposed to hostnames. But
>> haproxy still cant see the peer.
>>
>> Here is my configuration file.
>> https://pastebin.com/raw/DGTsNRDs
>>
>> If someone can assist it would be appreciated.
> I don't understand what it is you are trying to achieve, none of what
> you configured makes sense to me.
>
> Can you elaborate what you expect haproxy to do and why you need all
> those backends and use-server directives?
>
>
> Regards,
> Lukas
Sorry, only registered users may post in this forum.

Click here to login