[arm-allstar] load balancing
David McGough
kb4fxc at inttek.net
Mon Feb 6 10:29:04 EST 2023
Hi Patrick,
That Howto is severely outdated (I should probably pull it down until
update). Also, some updated scripts need to be pushed out for public
release---this code has been running well for a year now on several very
large hubs.
I'll follow up with you.
73, David K4FXC
On Mon, 6 Feb 2023, Patrick Perdue via ARM-allstar 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