[RADIATOR] Radiator Crash. SQL Timeout.
Ricardo Martinez
rmartinez at redvoiss.net
Mon Dec 17 08:34:08 CST 2012
Hello list.
We’re experiencing several crashes of our Radius service and we don’t have
any clue why this could be happening.
We’re using an AuthBY SQL against an ORACLE database. We have 5 to 6 more
instances running in the same server without any problem, but two of them
are crashing once a day. This is part of the configuration file :
LogStdout
DbDir /usr/src/Radiator-4.9
LogDir /var/log/radiator
DictionaryFile %D/dictionary,%D/dictionary.sip,%D/dictionary.kamailio
AuthPort 1654
AcctPort
BindAddress XX.XX.XX.XX
# This will log at DEBUG level: very verbose
# User a lower trace level in production systems, typically use 3
Trace 3
LogMicroseconds
<Handler Request-Type = Access-Request, NAS-IP-Address=XX.XX.XX.130>
# Look up user details via SQL
<AuthBy GROUP>
AuthByPolicy ContinueUntilAccept
<AuthBy SQL>
DBSource dbi:Oracle:xxxxx
DBUsername raxxxxxx
DBAuth radxxxx
Timeout 2
FailureBackoffTime 60
SQLRetries 1
NoDefault
#Incluye Info de Anexo en CLI
AuthSelect select
'Routing:'||radiator.reemplazadominio(radiator.traduce('sip:'||a.numero||'@
sip1.hola.net', \
'sip:'||substr('%{Called-Station-Id}',nvl(length(b.adm_info),0)+1)),b.terminal_alias)||
\
';cli='||a.numero || fg.
glbl_pkg.dejanumeros('%{Calling-Station-Id}') ||
';cnam='||'%{Calling-Station-Id}'|| \
';rid=-1;expires=45;np_expires=15;maxcc='||b.canales from
fg.fc_mayo_numero a,fg.fc_mayo_gateway b, \
fg.fc_mayo_gateway_ip c where a.gate_cod=c.gate_cod and
b.gate_cod=a.gate_cod and c.ip='%{User-Name}' and \
a.orden=1 and b.mayo_esta_cod=1 and b.voiss_esta_cod=1 and
c.tipo_servicio=1
AuthColumnDef 0, h323-ivr-in, reply
</AuthBy>
<AuthBy SQL>
DBSource dbi:Oracle:xxxxx
DBUsername raxxxxxx
DBAuth radxxxx
Timeout 2
FailureBackoffTime 60
SQLRetries 1
NoDefault
AuthSelect select
'Routing:'||radiator.reemplazadominio(radiator.traduce('sip:'||a.numero||'@
sip2.hola.net', \
'sip:'||substr('%{Called-Station-Id}',nvl(length(b.adm_info),0)+1)),b.ras_address)||
\
';cli='||a.numero|| fg.
glbl_pkg.dejanumeros('%{Calling-Station-Id}')|| \
';cnam='||'%{Calling-Station-Id}'||';rid=-1;expires=45;np_expires=15;maxcc='||b.puertas
from fg.fc_gateway_numero a,fg.fc_gateway \
b,fg.fc_gateway_ip c where a.gate_cod=c.gate_cod and
b.gate_cod=a.gate_cod and c.ip='%{User-Name}' \
and b.admin_esta_cod=1 and a.orden=1 and c.tipo_servicio=1
AuthColumnDef 0, h323-ivr-in, reply
</AuthBy>
<AuthBy INTERNAL>
DefaultResult REJECT
</AuthBy>
</AuthBy>
PostAuthHook file:"%D/SCRIPT_POSTAUTHHOOK"
</Handler>
This is the debug before the crash :
Sun Dec 16 14:03:22 2012 764008: DEBUG: Handling with Radius::AuthGROUP:
Sun Dec 16 14:03:22 2012 764431: DEBUG: Handling with Radius::AuthSQL:
Sun Dec 16 14:03:22 2012 764774: DEBUG: Handling with Radius::AuthSQL:
Sun Dec 16 14:03:22 2012 765795: DEBUG: Query is: 'select
'Routing:'||radiator.reemplazadominio(radiator.traduce('sip:'||a.numero||'
@sip1.hola.net <http://sipmy.redvoiss.net>',
'sip:'||substr('1795#005625383191',nvl(length(b.adm_info),0)+1)),b.terminal_alias)||
';cli='||a.numero || fg.
glbl_pkg.dejanumeros('14802321589') || ';cnam='||'14802321589'||
';rid=-1;expires=45;np_expires=15;maxcc='||b.canales from fg.fc_may
o_numero a,fg.fc_mayo_gateway b, fg.fc_mayo_gateway_ip c where
a.gate_cod=c.gate_cod and b.gate_cod=a.gate_cod and c.ip='66.165.170.
214' and a.orden=1 and b.mayo_esta_cod=1 and b.voiss_esta_cod=1 and
c.tipo_servicio=1':
Sun Dec 16 14:03:24 2012 766859: ERR: Execute failed for 'select
'Routing:'||radiator.reemplazadominio(radiator.traduce('sip:'||a.nu
mero||'@sip1.hola.net <http://sipmy.redvoiss.net>',
'sip:'||substr('1795#005625383191',nvl(length(b.adm_info),0)+1)),b.terminal_alias)||
';cli='||a.numero
|| fg. glbl_pkg.dejanumeros('14802321589') || ';cnam='||'14802321589'||
';rid=-1;expires=45;np_expires=15;maxcc='||b.canales from fg
.fc_mayo_numero a,fg.fc_mayo_gateway b, fg.fc_mayo_gateway_ip c where
a.gate_cod=c.gate_cod and b.gate_cod=a.gate_cod and c.ip='66.1
65.170.214' and a.orden=1 and b.mayo_esta_cod=1 and b.voiss_esta_cod=1 and
c.tipo_servicio=1': SQL Timeout
And then the service crashes.
Could be a problem with the Select?, or maybe a bug for the Timeout?. I
have made the same configuration file in a lab enviroment, without the
“select” and if the database give me SQL Timeout it goes to the Next Policy
without any problem.
Radius Version : 4.9
Perl : perl5 (revision 5 version 10 subversion 1)
OS : CentOS 6.0
Kernel : 2.6.32-71.el6.x86_64
Hope someone could help me here.
Regards,
Ricardo Martinez.-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open.com.au/pipermail/radiator/attachments/20121217/5cd04649/attachment.html
More information about the radiator
mailing list