[OpenSIPS-Users] CDRtool freeradius mysql error

osiris123d duane.larson at gmail.com
Mon Jan 18 05:39:36 CET 2010


I think the issue here is that OpenSIPS is never sending any data to
freeradius.  I do sniffs and all I see is that mediadispatcher is the only
one sending data to freeradius.  I am also able to manually create the
radacctXXXXXX by executing the Call procedure.

I think this might be the issue
modparam("aaa_radius", "radius_config",
"/usr/local/etc/opensips/radius/client.conf")
Your INSTALL.txt file  says to use
modparam("acc", "radius_config",      "/etc/opensips/radius/client.conf")
But I am using OpenSIPS 1.6 and radius_config no longer exists.  That is why
I initially used 
"aaa_radius", "radius_config"
but I think I am suppose to be using this instead
modparam("acc", "aaa_url",
"radius:/usr/local/etc/opensips/radius/client.conf")

When you guys tested and said everything was working fine for you what
modparam where you using to point OpenSIPS to the radius client config???

Hopefully this is my issue, but the only problem is that when I try to use
"aaa_url" I can't start Opensips because I get the following error


OpenSIPS:/var/log# more syslog
Jan 17 22:34:47 OpenSIPS opensips: INFO:core:init_tcp: using epoll_lt as the
TCP io watch method (auto detected)
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]: NOTICE:core:main:
version: opensips 1.6.0-notls (i386/linux)
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]: INFO:core:main:
using 32 Mb shared memory
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]: INFO:core:main:
using 1 Mb private memory per process
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]:
NOTICE:signaling:mod_init: initializing module ...
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]: INFO:sl:mod_init:
Initializing StateLess engine
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]: INFO:tm:mod_init:
TM - initializing...
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]: INFO:uac:mod_init:
initializing...
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]:
INFO:maxfwd:mod_init: initializing...
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]:
INFO:usrloc:ul_init_locks: locks array size 512
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]:
INFO:registrar:mod_init: initializing...
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]:
INFO:textops:mod_init: initializing...
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]: INFO:xlog:mod_init:
initializing...
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]: INFO:acc:mod_init:
initializing...
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]:
ERROR:core:aaa_prot_bind: <aaa_radius> has no bind api function
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]:
ERROR:acc:init_acc_aaa: AAA protocol bind failure
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]: ERROR:acc:mod_init:
failed to init radius
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]:
ERROR:core:init_mod: failed to initialize module acc
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]: ERROR:core:main:
error while initializing modules
Jan 17 22:34:47 OpenSIPS /usr/local/sbin/opensips[4772]:
NOTICE:presence:destroy: destroy module ...


I have removed the aaa_radius module completely because I figure its not
needed since the acc aaa_url modparam should do what I want it.



Adrian Georgescu wrote:
> 
> Can you paste your sql.conf file?
> 
> Adrian
> 
> On Jan 12, 2010, at 8:28 PM, osiris123d wrote:
> 
>>
>> I have read and re-installed CDRTool about 4 times and I don't think  
>> I am
>> missing anything in the INSTALL.txt file.  I apologize if you think  
>> I am
>> just brushing through the install and not actually trying to figure  
>> out the
>> issue before asking, but I have gone through the instructions many  
>> times and
>> the issue is not sticking out.  This is what I do to get Freeradius
>> installed and set up
>>
>>
>> Execute the following
>> 	apt-get install freeradius-xs freeradius-xs-mysql
>> 	mysqladmin -u root -p create radius
>> 	mysql -u root -p radius <
>> /var/www/CDRTool/setup/radius/OpenSIPS/radacct.mysql
>>
>> 	***********
>> 	At this point I do Option B instead of option A since I want "To
>> automatically create a table for each calendar month radacctYYYYMM"
>> 	instead of "To write data into one radacct table"
>> 	***********
>> 	cp /var/www/CDRTool/setup/radius/OpenSIPS/radius_accounting.conf
>> /etc/freeradius/sql.conf
>>
>>
>> Grant access to radius user to the radius database (I put in a bunch  
>> just to
>> troubleshoot that its not a permission issue)
>> 	GRANT ALL ON radius.*  TO radius at 12.*.*.218 IDENTIFIED by  
>> '**********';
>> 	GRANT ALL ON radius.*  TO radius at localhost IDENTIFIED by  
>> '**********';
>> 	GRANT ALL ON radius.*  TO radius at 66.*.*.14 IDENTIFIED by  
>> '**********';
>> 	GRANT ALL ON radius.*  TO radius at CDRTool.a.com IDENTIFIED by  
>> '**********';
>> 	GRANT ALL ON cdrtool.* TO locker at localhost IDENTIFIED by 'lockadm18';
>>
>> Execute the following
>> 	mysql -u root -p -h localhost radius <
>> /var/www/CDRTool/setup/radius/OpenSIPS/radius_accounting.proc
>>
>>
>>
>> Edit the following
>> 	nano /etc/freeradius/client.conf
>> 	client 66.*.*.14 {                    <----------- OpenSIPS Server
>>        	secret=YourSecret
>>        	nastype=other
>>        	shortname=sip
>> 	}
>>
>> 	client 66.*.*.13 {                    <----------- Mediaproxy Server
>>        	secret=YourSecret
>>        	nastype=other
>>        	shortname=mediaproxy
>> 	}
>>
>> 	client 12.*.*.218 {                    <----------- CDRTool Server
>>        	secret=YourSecret
>>        	nastype=other
>>        	shortname=radius
>> 	}
>>
>> 	
>> Edit the following
>> 	nano /etc/freeradius/sql.conf
>>    	driver                      = "rlm_sql_mysql"
>>    	server                      = "12.*.*.218"
>> <----------- CDRTool Server
>>    	login                       = "radius"
>>    	password                    = "**********"
>>    	radius_db                   = "radius"
>>
>>
>> Edit the following
>> 	nano /etc/freeradius/radiusd.conf
>> 	accounting {
>>        	detail
>>        	sql
>>        	ok   <----------The INSTALL.txt file doesn't mention  
>> anything about
>> the ok option, but your freeradius-xs package puts it here
>> 	}
>>
>> Edit the following
>> 	nano /etc/freeradius/proxy.conf
>> 	realm DEFAULT {
>>        	type            = radius
>>        	authhost        = 12.*.*.218:1812     <----------- CDRTool  
>> Server
>>        	accthost        = 12.*.*.218:1813     <----------- CDRTool  
>> Server
>>        	secret          = YourSecret
>>        	ldflag          = fail_over
>>        	nostrip
>> 	}
>>
>>
>>
>> Verify that /etc/freeradius/dictionary looks like this
>>
>> 	# standard radius dictionary
>> 	$INCLUDE        /usr/share/freeradius/dictionary
>>
>> 	# OpenSER dictionary
>> 	$INCLUDE        /etc/freeradius/dictionary.openser    <--- 
>> INSTALL.txt file
>> says opensips, but your freeradius-xs package installs this
>>
>> 	# MediaProxy dictionary
>> 	$INCLUDE        /etc/freeradius/dictionary.mediaproxy
>>
>>
>>
>>
>> This is all the INSTALL.txt file says to do from a Freeradius  
>> standpoint.  I
>> don't see how I can mess up the sql.conf file since you basically  
>> just have
>> to copy over radius_accounting.conf to /etc/freeradius/sql.conf and  
>> edit the
>> "server" line and "password" line.
>>
>> The MySQL version is 5.1.41-3.  So thats not an issue
>> Mediaproxy version is >=1.8.0
>> I installed Freeradius by doing the apt-get of AG Projects  
>> Freeradius-xs
>> packages
>> I inserted the radius_accounting.proc stored procedures
>>
>> So not sure what I could have missed.
>>
>>
>>
>> Adrian Georgescu wrote:
>>>
>>> This has nothing to do with the software but with its configuration
>>> namely the Freeradius sql.conf file. Read the installation
>>> instructions and the sample files in CDRTool/setup/ directory.
>>> Adrian
>>>> I am still not able to get CDRTool to work because it never creates
>>> the
>>> months radacct table in the radius database.  I have installed
>>> everything on
>>> Debian 5.0.3 by just using the following repositories
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://n2.nabble.com/CDRtool-freeradius-mysql-error-tp4293459p4293798.html
>> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/CDRtool-freeradius-mysql-error-tp4293459p4411773.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list