[arm-allstar] load balancing
David McGough
kb4fxc at inttek.net
Fri Feb 17 23:09:47 EST 2023
Hi Patrick,
I'll send you an update off-list.
73, David K4FXC
On Sat, 11 Feb 2023, Patrick Perdue via ARM-allstar wrote:
> An update to this:
By messing around with the order of a couple of things in the dial plan,
and fixing several errors. we now have working node balancing. What
doesn't work, though, is reporting of stats using the
balance_node_stats.sh script, and I don't understand the code enough to
know what's going on, or even if it really does work in the first place.
Also, Supermon, of course, shows all the individual nodes, which makes
it a little hard to track for some.
On 2/6/2023 10:21 AM, Patrick Perdue wrote:
> Hi:
>
> We are attempting to debug a setup that (mostly) follows the howto at
> HamVoIP for load balancing for a single public node, which also has a
> repeater directly attached to it. Not my setup, but if it were, I'd
> have the connections and repeater on separate Pi's. Anyway, the node
> is running on a Pi 4, and audio gets very choppy when the connection
> count reaches about 85 or so during a popular net, so we want to try
> load balancing to hopefully clean that up.
>
> Seems there are some errors in the examples in that document, a few
> cases of missing closing brackets and the like.
>
> https://www.hamvoip.org/howto/limiting_connections_and_balancing.pdf
>
> Once corrected, we now see this in the log.
>
>
> Â Â -- Executing [51018 at blacklist:1]
> NoOp("IAX2/123.123.123.123:4569-131", "57512") in new stack
> Â Â -- Executing [51018 at blacklist:2]
> GotoIf("IAX2/123.123.123.123:4569-131", "0?blocked") in new stack
> Â Â -- Executing [51018 at blacklist:3]
> Goto("IAX2/123.123.123.123:4569-131", "radio-secure|51018|1") in new
> stack
> Â Â -- Goto (radio-secure,51018,1)
> Â Â -- Executing [51018 at radio-secure:1]
> NoOp("IAX2/123.123.123.123:4569-131", "Date: 02/05/2023") in new stack
> Â Â -- Executing [51018 at radio-secure:2]
> NoOp("IAX2/123.123.123.123:4569-131", "Incoming node: 57512") in new
> stack
> Â Â -- Executing [51018 at radio-secure:3]
> Set("IAX2/123.123.123.123:4569-131", "i0=") in new stack
> Â Â -- Executing [51018 at radio-secure:4]
> Set("IAX2/123.123.123.123:4569-131", "i1=") in new stack
> Â Â -- Executing [51018 at radio-secure:5]
> Set("IAX2/123.123.123.123:4569-131", "i2=") in new stack
> Â Â -- Executing [51018 at radio-secure:6]
> Set("IAX2/123.123.123.123:4569-131", "i3=") in new stack
> [Feb 5 14:57:57] WARNING[6577]: ast_expr2.fl:407 ast_yyerror:
> ast_yyerror():Â syntax error: syntax error, unexpected '+', expecting
> $end; Input:
> Â +Â +Â +
> Â ^
> [Feb 5 14:57:57] WARNING[6577]: ast_expr2.fl:411 ast_yyerror: If you
> have questions, please refer to doc/channelvariables.txt in the
> asterisk source.
> Â Â -- Executing [51018 at radio-secure:7]
> Set("IAX2/123.123.123.123:4569-131", "Total=") in new stack
> [Feb 5 14:57:57] WARNING[6577]: ast_expr2.fl:407 ast_yyerror:
> ast_yyerror():Â syntax error: syntax error, unexpected '<', expecting
> $end; Input:
> Â < 204
> Â ^
> [Feb 5 14:57:57] WARNING[6577]: ast_expr2.fl:411 ast_yyerror: If you
> have questions, please refer to doc/channelvariables.txt in the
> asterisk source.
> Â Â -- Executing [51018 at radio-secure:8]
> GotoIf("IAX2/123.123.123.123:4569-131", "?51018|100:51018|30") in new
> stack
> Â Â -- Goto (radio-secure,51018,30)
> Â Â -- Executing [51018 at radio-secure:30]
> NoOp("IAX2/123.123.123.123:4569-131", "Too many connections to node
> 51018!") in new stack
> [Feb 5 14:57:57] WARNING[6577]: pbx.c:1832 pbx_extension_helper: No
> application '168505|X' for extension (radio-secure, 51018, 31)
> Â == Spawn extension (radio-secure, 51018, 31) exited non-zero on
> 'IAX2/123.123.123.123:4569-131'
> Â Â -- Hungup 'IAX2/123.123.123.123:4569-131'
>
> I think possibly what is happening is that a variable is null, and it
> breaks when it tried to add null to null. Could be wrong though.
>
> Here is the relevant part of the dialplan.
>
>
> [radio-secure]
>
> exten => 51018,1,NoOp(Date: ${STRFTIME(${EPOCH},,%m/%d/%Y)})
> exten => 51018,n,NoOp(Incoming node: ${CALLERID(number)})
> exten => 51018,n,Set(i0=${GLOBAL(LINKS1)})
> exten => 51018,n,Set(i1=${GLOBAL(LINKS2)})
> exten => 51018,n,Set(i2=${GLOBAL(LINKS3)})
> exten => 51018,n,Set(i3=${GLOBAL(LINKS4)})
>
> ;;; Calculate total connections.
> exten => 51018,n,Set(Total=$[${i0} + ${i1} + ${i2} + ${i3}])
> ;;; Compare total to 204 (200 plus 4 local virtual nodes)
> exten => 51018,n,GotoIf($[${total} < 204]?51018,100:51018,30)
>
> exten => 51018,30,NoOp(Too many connections to node 51018!)
> exten => 51018,n,168505|X
> Nodes 168500 through 168505 are defined in a custom file, which is
> referenced in rpt.conf with the relevant events as documented in the PDF.
>
>
> So... what is breaking things here?
>
> Thanks and 73
>
> N2DYI
>
>
_______________________________________________
ARM-allstar mailing list
ARM-allstar at hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
More information about the ARM-allstar
mailing list