[OpenSIPS-Users] mediaproxy and radius integration

Ruud Klaver ruud at ag-projects.com
Tue Jan 27 09:19:35 CET 2009


Hi Gabriel,

On 26 Jan 2009, at 22:54, Gabriel Bermudez wrote:

> Hi Ruud,
>
> Ruud Klaver escribió:
>> Hi,
>>
>> On 26 Jan 2009, at 17:01, Gabriel Bermudez wrote:
>>
>>> Hi,
>>>
>>> I have tried to change from localhost to 127.0.0.1 and to my ip  
>>> address
>>> and still it doesn't works.
>>> With what version are you working, I'm using version 2.3.2.  I'm  
>>> also
>>> using Ubuntu server 8.10 and downloaded the deb files for ag- 
>>> project's
>>> debian repository.
>>> Could any that has installed mediaproxy give us a hand, please?
>>> Thanks for your help.
>>>
>>> Regards,
>>>
>>>
>>>
>>> Авдиенко Михаил escribió:
>>>> Gabriel Bermudez wrote:
>>>>
>>>>
>>>>> Hi list,
>>>>>
>>>>
>>>>
>>>>> Got this issue with mediaproxy. The mediaproxy dispatcher is not  
>>>>> able to
>>>>> read the radius configuration file
>>>>>
>>>>
>>>>
>>>>> [Radius]
>>>>> config_file = /etc/radiusclient-ng/radiusclient.conf
>>>>> additional_dictionary = radius/dictionary.opensips
>>>>>
>>>>
>>>>
>>>>> The file is there, opensips can read it, but mediaproxy dispatcher
>>>>> can't?!.  This log output
>>>>>
>>>>
>>>>
>>>>> Jan 23 18:28:55 ripley media-dispatcher[6834]: [-] Log opened.
>>>>> Jan 23 18:28:55 ripley media-dispatcher[6834]: [-] Starting  
>>>>> MediaProxy
>>>>> Dispatcher 2.3.2
>>>>> Jan 23 18:28:55 ripley media-dispatcher[6834]: [-] Twisted is  
>>>>> using
>>>>> epollreactor
>>>>> Jan 23 18:28:55 ripley media-dispatcher[6834]: [-] fatal error:  
>>>>> cannot
>>>>> read the RADIUS configuration file
>>>>> Jan 23 18:28:55 ripley media-dispatcher[6834]: [-] fatal error:  
>>>>> failed
>>>>> to create MediaProxy Dispatcher: 'localhost'
>>>>>
>>>>
>>>>
>>>>> Don't know what I'm doing wrong.  Thanks for you advice.
>>>>>
>>>>
>>>>
>>>>> Regards,
>>>>>
>>>>
>>>> I have this issue too. I discovered that it's related to the  
>>>> 'acctserver'
>>>> option in radiusclient.conf file.
>>>> I've played with this option trying to add two acctservers and  
>>>> replacing
>>>> localhost 127.0.0.1 and vice-versa.
>>>> Sometimes mediaproxy-dispatcher parses file ok, but do not send any
>>>> accounting, sometimes it tries
>>>> to create MediaProxy Dispatcher at one of the addresses specified  
>>>> via
>>>> acctserver ("failed to create MediaProxy Dispatcher: 'localhost'")
>>>> but sometimes it works as expected. I can not find out logic of  
>>>> this
>>>> errors(
>>
>>
>> I agree that's not a very helpful error, it should report more.  
>> Could you change the following to make it give a full traceback:
>> in mediaproxy/interfaces/accounting/radius.py on line 94, replace  
>> "raise RuntimeError(str(e))" with just "raise". It won't be very  
>> descriptive, but at least you can give me the full traceback and I  
>> can analyze what went wrong.
>>
>> Ruud Klaver
>> AG Projects
>
> Here is the stacktrace you asked for:
>
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-] Log opened.
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-] Starting  
> MediaProxy Dispatcher 2.3.2
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-] Twisted is using  
> epollreactor
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-] fatal error:  
> cannot read the RADIUS configuration file
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-] fatal error:  
> failed to create MediaProxy Dispatcher: 'localhost'
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-] Traceback (most  
> recent call last):
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-]     ---  
> <exception caught here> ---
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-]       File "/usr/ 
> bin/media-dispatcher", line 52, in <module>
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-]          
> dispatcher = Dispatcher()
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-]       File "/var/ 
> lib/python-support/python2.5/mediaproxy/dispatcher.py", line 481, in  
> __init__
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-]          
> self.accounting = [__import__("mediaproxy.interfaces.accounting.%s"  
> % mod.lower(), globals(), locals(), [""]).Accounting() for mod in  
> set(Config.accounting)]
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-]       File "/var/ 
> lib/python-support/python2.5/mediaproxy/interfaces/accounting/ 
> radius.py", line 53, in __init__
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-]          
> self.radius = RadiusAccounting()
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-]       File "/var/ 
> lib/python-support/python2.5/mediaproxy/interfaces/accounting/ 
> radius.py", line 81, in __init__
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-]         secret =  
> secrets[server]
> Jan 26 16:30:55 ripley media-dispatcher[14677]: [-]      
> exceptions.KeyError: 'localhost'
>
> Hope it helps, also the config.ini file
>
> [Relay]
> dispatchers = 127.0.0.1 192.168.2.24 200.93.233.229
>
> [Dispatcher]
> socket_path = dispatcher.sock
> listen = 0.0.0.0
> accounting = radius, database
>
> [TLS]
> certs_path = tls
>
> [Database]
> dburi = mysql://mediaproxy:aag18281@localhost/mediaproxy
>
> [Radius]
> config_file = /etc/opensips/radius/client.conf
> additional_dictionary = radius/dictionary
>
> [OpenSIPS]
>
>
> The /etc/opensips/radius/client.conf is a symlink to /etc/ 
> radiusclient-ng/radiusclient.conf
> Thanks for your help.
>
> Regards,

It seems it cannot parse the password for the server "localhost" from  
the servers file. Could you please post me the contents of your  
clients.conf and servers files? Obviously you should obfuscate the  
passwords contained in it.

Ruud Klaver
AG Projects


More information about the Users mailing list