[OpenSIPS-Users] Problems with mediaproxy 2.0.3 over opensuse 11.0

Ivan Medeiros fehler at gmail.com
Mon Aug 25 04:52:18 CEST 2008


Hello everyone.

I had been problem to use the mediaproxy 2.0.3 over opensuse 11.0. I had got
error both media-relay and media-dispatcher.

*The media-dispatcher error had been following: *

# ./media-dispatcher --no-fork
Starting MediaProxy Dispatcher 2.0.3
Twisted is using epollreactor
failed to create MediaProxy Dispatcher: ASN1 parser: Element was not found.
Traceback (most recent call last):
--- <exception caught here> ---
  File "./media-dispatcher", line 52, in <module>
    dispatcher = Dispatcher()
  File "/usr/local/src/mediaproxy-2.0.3/mediaproxy/dispatcher.py", line 413,
in __init__
    self.cred = X509Credentials(cert_name='dispatcher')
  File "/usr/local/src/mediaproxy-2.0.3/mediaproxy/tls.py", line 132, in
__init__
    twisted.X509Credentials.__init__(self, self.X509cert, self.X509key,
[self.X509ca], [self.X509crl])
  File "/usr/local/src/mediaproxy-2.0.3/mediaproxy/tls.py", line 99, in
__get__
    return descriptor.get()
  File "/usr/local/src/mediaproxy-2.0.3/mediaproxy/tls.py", line 82, in get
    self.object = self.klass(f.read())
  File "<string>", line 1, in __init__

  File "/usr/lib/python2.5/site-packages/gnutls/validators.py", line 273, in
check_args
    return func(*func_args)
  File "/usr/lib/python2.5/site-packages/gnutls/crypto.py", line 70, in
__init__
    gnutls_x509_crt_init(byref(self._c_object))
  File "/usr/lib/python2.5/site-packages/gnutls/library/errors.py", line 61,
in _check_status
    raise GNUTLSError(ErrorMessage(retcode))
gnutls.errors.GNUTLSError: ASN1 parser: Element was not found.


After spend some time tracing the execution and making gnutls samples I
perceived that the media-dispatcher does not call the function
gnutls_global_init. Thus, the gnutls_x509_crt_init can't find the
"PKIX1.Certificate" because the _gnutls_get_pkix () returns nil. In order to
solve this problem I added the follows lines on mediaproxy/dispatcher.py:

23,24c24
> from gnutls.library.functions import gnutls_global_init
412d411
>     gnutls_global_init()


*The media-relay error had been following:*

# ./media-relay --no-fork
Starting MediaProxy Relay 2.0.3
Set resource limit for maximum open file descriptors to 11000
failed to create MediaProxy Relay: Could not determine Linux kernel version

This problem was easier to solve, and it is happen because the format of the
file  /proc/sys/kernel/osrelease may be different across the linux
distributions. eg. 2.6.25.XX and not 2.6.25-XX
To solve it, I apply the following patch on mediaproxy/relay.py

286c286,289
<             major, minor, revision = [int(num) for num in
open(KERNEL_VERSION_FILE).read().split("-", 1)[0].split(".")]
---
>             kernel_version = open(KERNEL_VERSION_FILE).read().split("-",
1)[0].split(".")
>             major = kernel_version[0]
>             minor = kernel_version[1]
>             revision = kernel_version[2]



-- 
==============================================
Ivan Medeiros Monteiro - fehler at gmail.com
Bacharel em Ciência da Computação - UFBA
Mestrando em Ciência da Computação - UFRGS
==============================================
Indecisão é quando você sabe muito bem o que quer,
mas acha que devia querer outra coisa.
--------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20080824/c6c6c1a8/attachment.htm 


More information about the Users mailing list