> 5 maj 2017 kl. 14:41 skrev Hiltjo Posthuma <[email protected]>:
>
> On Fri, May 05, 2017 at 12:30:56PM +0200, Maxim Bourmistrov wrote:
>>
>> Hey,
>> on OpenBSD 6.0-stable I have following configuration for relayd:
>>
>> ————snip———————
>> interval 10
>> timeout 1200
>> prefork 15
>> log all
>> ——————————————————
>>
>> Respective login.conf to spawn more relayd procs:
>>
>> relayd:\
>> :maxproc-max=31:\
>> :maxproc-cur=15:\
>> :openfiles=65536:\
>> :tc=daemon:
>>
>>
>> With config options above moved to a 6.1 creates following:
>>
>> relayd starts but brings up no more that 3 relay-processes.
>> Also after start up it refuses to do any checks configured (in my simple
>> test I used check tcp)
>>
>> [mxb-test]-[12:21:41]# relayctl sh su
>> Id Type Name Avlblty Status
>> 1 relay rabbitmq active
>> 1 table rabbitmqpool:5672 empty
>> 1 host 10.5.96.8 unknown
>> 2 table rabbitmqfallback:5672 empty
>> 2 host 10.5.96.9 unknown
>>
>>
>> Changing ’prefork’ from 15 to 3 makes it work.
>>
>> Is this a bug?
>>
>> Br
>>
>>
>>
>
> Hey,
>
> This is a random guess since you haven't posted the whole config, but I think
> it has bitten me too sometime:
>
> Do you have the global options such as prefork defined before your
> relays and routes or not?
>
> The order of the global options matter. If the global options are set after
> the table they are not initialized on the tables and can actually crash
> relayd.
> This is because the health checking uses a different prefork value and checks
> the "wrong" amount.
>
> I'm not sure, but I think it is not a bug: it is documented in relayd.conf(5).
>
> Thinking about it: would it be acceptable if `relayd -n` shows a warning if
> global options are defined in the wrong order? I can write the patch for it
> if it makes sense.
>
> I hope this helps you in some way,
>
> --
> Kind regards,
> Hiltjo
The whole config is like this:
include "/etc/pj/nz/akl1/shared/pf/int/networks"
include "/etc/pj/nz/akl1/shared/pf/int/common_tables"
interval 10
timeout 1000
prefork 3 #15
log all
#include "/etc/pj/shared/relayd/protocols"
tcp protocol tcp_proto {
tcp { nodelay, sack, socket buffer 65536, backlog 128 }
}
relay rabbitmq {
listen on 10.5.128.16 port 5674
# protocol tcp_proto
# session timeout 10800
forward to <rabbitmqpool> port 5672 mode roundrobin check tcp
forward to <rabbitmqfallback> port 5672 mode roundrobin check tcp
}
Tables are shared with PF so I don’t have to re-define those.
”common_tables” in config contains:
table <rabbitmqpool> { $RMQ1_VLAN302 }
table <rabbitmqfallback> { $RMQ2_VLAN302 }
I seems not be able to find a place in manage were it states that global
options need to go before
table definitions.
Note, config layout exactly the same which runs already on 6.0-stable.
My original question is why I can’t fork more than 3 procs any more
and why relayd starts then prefork > 3 and does not do a health check.
Br