Mediaproxy 2.1.0 on Red Hat/CentOS

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Mediaproxy 2.1.0 on Red Hat/CentOS

John Quick
After installing a bunch of packages and libraries, media-dispatcher is
almost running, but I get the following error:

Log opened.
 Starting MediaProxy Dispatcher 2.1.0
 Twisted is using selectreactor
 fatal error: 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 ?
         dispatcher = Dispatcher()
       File "/usr/local/mediaproxy-2.1.0/mediaproxy/dispatcher.py", line
449, in __init__
         self.cred = X509Credentials(cert_name='dispatcher')
       File "/usr/local/mediaproxy-2.1.0/mediaproxy/tls.py", line 132, in
__init__
         twisted.X509Credentials.__init__(self, self.X509cert, self.X509key,
[self.X509ca], [self.X509crl])
       File "/usr/local/mediaproxy-2.1.0/mediaproxy/tls.py", line 99, in
__get__
         return descriptor.get()
       File "/usr/local/mediaproxy-2.1.0/mediaproxy/tls.py", line 82, in get
         self.object = self.klass(f.read())
       File "<string>", line 1, in __init__

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


It might be a problem with the libraries or packages - they have been very
difficult to find and install for CentOS. However, it looks more like a
problem with reading the certificates - I'm using the sample certs included
with the mediaproxy download. Any ideas or suggestions would be most
welcome. Thanks.
John Quick


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

Dan Pascu

The version of libgnutls which the binary part of python-gnutls was
compiled against is different from the one that is loaded at runtime.
You should install from source all dependencies if the OS doesn't provide
the proper versions for you.

On Wednesday 26 November 2008, John Quick wrote:

> After installing a bunch of packages and libraries, media-dispatcher is
> almost running, but I get the following error:
>
> Log opened.
>  Starting MediaProxy Dispatcher 2.1.0
>  Twisted is using selectreactor
>  fatal error: 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 ?
>          dispatcher = Dispatcher()
>        File "/usr/local/mediaproxy-2.1.0/mediaproxy/dispatcher.py",
> line 449, in __init__
>          self.cred = X509Credentials(cert_name='dispatcher')
>        File "/usr/local/mediaproxy-2.1.0/mediaproxy/tls.py", line 132,
> in __init__
>          twisted.X509Credentials.__init__(self, self.X509cert,
> self.X509key, [self.X509ca], [self.X509crl])
>        File "/usr/local/mediaproxy-2.1.0/mediaproxy/tls.py", line 99,
> in __get__
>          return descriptor.get()
>        File "/usr/local/mediaproxy-2.1.0/mediaproxy/tls.py", line 82,
> in get self.object = self.klass(f.read())
>        File "<string>", line 1, in __init__
>
>        File "/usr/lib64/python2.4/site-packages/gnutls/validators.py",
> line 273, in check_args
>          return func(*func_args)
>        File "/usr/lib64/python2.4/site-packages/gnutls/crypto.py", line
> 82, in __init__
>          gnutls_x509_crt_init(byref(self._c_object))
>        File
> "/usr/lib64/python2.4/site-packages/gnutls/library/errors.py", line 64,
> in _check_status
>          raise GNUTLSError(ErrorMessage(retcode))
>      gnutls.errors.GNUTLSError: ASN1 parser: Element was not found.
>
>
> It might be a problem with the libraries or packages - they have been
> very difficult to find and install for CentOS. However, it looks more
> like a problem with reading the certificates - I'm using the sample
> certs included with the mediaproxy download. Any ideas or suggestions
> would be most welcome. Thanks.
> John Quick
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

John Quick
Dan

Your explanation makes a lot of sense - getting the correct version of the
gnutls libraries has been a big problem and I downloaded 2.4.2 and installed
from source after I had installed the Python libraries. However, I now have
problems re-installing packages/libraries so the old ones are properly
replaced. For example, "./setup clean" does not remove the old .so files in
the build directory for my Python packages - I had to manually delete them.
I also had to manually delete the .pyc files in the mediaproxy directory and
mediaproxy/interfaces.

Have just tried rebuilding/installing:
python-gnutls-1.1.6, then
Twisted-8.1.0, then
build_inplace mediaproxy
and I still get the same error when I run media-dispatcher.

Two things that are probably relevant:
1. The usual ./configure; make; make install process that I used for the
source package of gnutls failed to copy gnutls-extra.so file to the Linux
lib path - I eventually copied it manually, but don't feel happy about
having to do that.
2. When I rebuild Twisted-8.1.0, it gives the following error during the
"install" process, but the install script still completes:

[root@opensips02 Twisted-8.1.0]# ./setup.py install
running install
running build
running build_py
running build_ext
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC
-I/usr/include/python2.4 -c conftest.c -o conftest.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC
-I/usr/include/python2.4 -c conftest.c -o conftest.o
running build_scripts
running install_lib
copying build/lib.linux-x86_64-2.4/twisted/python/_epoll.so ->
/usr/lib64/python2.4/site-packages/twisted/python
copying build/lib.linux-x86_64-2.4/twisted/test/raiser.so ->
/usr/lib64/python2.4/site-packages/twisted/test
copying build/lib.linux-x86_64-2.4/twisted/protocols/_c_urlarg.so ->
/usr/lib64/python2.4/site-packages/twisted/protocols
copying build/lib.linux-x86_64-2.4/twisted/runner/portmap.so ->
/usr/lib64/python2.4/site-packages/twisted/runner
byte-compiling
/usr/lib64/python2.4/site-packages/twisted/test/generator_failure_tests.py
to generator_failure_tests.pyc
  File
"/usr/lib64/python2.4/site-packages/twisted/test/generator_failure_tests.py"
, line 66
    yield
         ^
SyntaxError: invalid syntax


I haven't rebuilt/installed python-application or cjson packages since
upgrading gnutls - are they relevant? If so, what is the correct order for
building the various python packages?

Thanks.
John Quick


-----Original Message-----
From: Dan Pascu [mailto:[hidden email]]
Sent: 27 November 2008 09:00
To: [hidden email]
Cc: [hidden email]
Subject: Re: [OpenSIPS-Users] Mediaproxy 2.1.0 on Red Hat/CentOS


The version of libgnutls which the binary part of python-gnutls was
compiled against is different from the one that is loaded at runtime.
You should install from source all dependencies if the OS doesn't provide
the proper versions for you.

On Wednesday 26 November 2008, John Quick wrote:

> After installing a bunch of packages and libraries, media-dispatcher is
> almost running, but I get the following error:
>
> Log opened.
>  Starting MediaProxy Dispatcher 2.1.0
>  Twisted is using selectreactor
>  fatal error: 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 ?
>          dispatcher = Dispatcher()
>        File "/usr/local/mediaproxy-2.1.0/mediaproxy/dispatcher.py",
> line 449, in __init__
>          self.cred = X509Credentials(cert_name='dispatcher')
>        File "/usr/local/mediaproxy-2.1.0/mediaproxy/tls.py", line 132,
> in __init__
>          twisted.X509Credentials.__init__(self, self.X509cert,
> self.X509key, [self.X509ca], [self.X509crl])
>        File "/usr/local/mediaproxy-2.1.0/mediaproxy/tls.py", line 99,
> in __get__
>          return descriptor.get()
>        File "/usr/local/mediaproxy-2.1.0/mediaproxy/tls.py", line 82,
> in get self.object = self.klass(f.read())
>        File "<string>", line 1, in __init__
>
>        File "/usr/lib64/python2.4/site-packages/gnutls/validators.py",
> line 273, in check_args
>          return func(*func_args)
>        File "/usr/lib64/python2.4/site-packages/gnutls/crypto.py", line
> 82, in __init__
>          gnutls_x509_crt_init(byref(self._c_object))
>        File
> "/usr/lib64/python2.4/site-packages/gnutls/library/errors.py", line 64,
> in _check_status
>          raise GNUTLSError(ErrorMessage(retcode))
>      gnutls.errors.GNUTLSError: ASN1 parser: Element was not found.
>
>
> It might be a problem with the libraries or packages - they have been
> very difficult to find and install for CentOS. However, it looks more
> like a problem with reading the certificates - I'm using the sample
> certs included with the mediaproxy download. Any ideas or suggestions
> would be most welcome. Thanks.
> John Quick
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
Dan


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

Dan Pascu
On Thursday 27 November 2008, John Quick wrote:

> Dan
>
> Your explanation makes a lot of sense - getting the correct version of
> the gnutls libraries has been a big problem and I downloaded 2.4.2 and
> installed from source after I had installed the Python libraries.
> However, I now have problems re-installing packages/libraries so the
> old ones are properly replaced. For example, "./setup clean" does not
> remove the old .so files in the build directory for my Python packages
> - I had to manually delete them. I also had to manually delete the .pyc
> files in the mediaproxy directory and mediaproxy/interfaces.

You do not need to delete the .pyc files. setup clean only cleans files
from builds that were not done in-place. if you did ./build_inplace then
you need to delete the .so yourself to rebuild it.

>
> Have just tried rebuilding/installing:
> python-gnutls-1.1.6, then
> Twisted-8.1.0, then
> build_inplace mediaproxy
> and I still get the same error when I run media-dispatcher.

The order to install them is:

libtasn1 (libgnutls dependency)
libgcrypt11 (libgnutls dependency)
libgnutls26 (version 2.4.2)
python-gnutls (build it only after the above had been installed)
other deps
mediaproxy

unfortunately, gnutls has some dependencies of its own (libtasn1 and
libgcrypt), and the version you use (2.4.2) needs a certain version of
these companion libraries (for gnutls-2.4.x I have libgcrypt-1.4.1 and
libtasn1-1.4). It may be possible that you still get the error because
libtasn1 and/or libgcrypt are still old versions.

To check that libraries you use:

run a python interpreter and execute the statement below:

python
>>> from gnutls.library import functions

then find the pid of that python interpreter (ps ax | grep python) and run
lsof on it:

lsof -p pid_of_python_interpreter

then run

ldd gnutls/library/_gnutls_init.so

Compare the versions and paths for libgnutls, libgcrypt and libtasn1 from
the outputs of lsof and ldd. They must be the same.

>
> Two things that are probably relevant:
> 1. The usual ./configure; make; make install process that I used for
> the source package of gnutls failed to copy gnutls-extra.so file to the
> Linux lib path - I eventually copied it manually, but don't feel happy
> about having to do that.

I don't think that's a problem.

> 2. When I rebuild Twisted-8.1.0, it gives the following error during
> the "install" process, but the install script still completes:

I do not know about that. You should ask the twisted developers about it.
I guess a simple solution would be to remove the offending files, since
they're only tests. Aren't they ignored anyways, since the error is just
in byte compiling them?

>
> [root@opensips02 Twisted-8.1.0]# ./setup.py install
> running install
> running build
> running build_py
> running build_ext
> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC
> -I/usr/include/python2.4 -c conftest.c -o conftest.o
> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC
> -I/usr/include/python2.4 -c conftest.c -o conftest.o
> running build_scripts
> running install_lib
> copying build/lib.linux-x86_64-2.4/twisted/python/_epoll.so ->
> /usr/lib64/python2.4/site-packages/twisted/python
> copying build/lib.linux-x86_64-2.4/twisted/test/raiser.so ->
> /usr/lib64/python2.4/site-packages/twisted/test
> copying build/lib.linux-x86_64-2.4/twisted/protocols/_c_urlarg.so ->
> /usr/lib64/python2.4/site-packages/twisted/protocols
> copying build/lib.linux-x86_64-2.4/twisted/runner/portmap.so ->
> /usr/lib64/python2.4/site-packages/twisted/runner
> byte-compiling
> /usr/lib64/python2.4/site-packages/twisted/test/generator_failure_tests
>.py to generator_failure_tests.pyc
>   File
> "/usr/lib64/python2.4/site-packages/twisted/test/generator_failure_test
>s.py" , line 66
>     yield
>          ^
> SyntaxError: invalid syntax
>
>
> I haven't rebuilt/installed python-application or cjson packages since
> upgrading gnutls - are they relevant? If so, what is the correct order

no. pyhton-application and python-cjson are standalone, so you can install
them whenever you like.

> for building the various python packages?

See above.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

John Quick
Dan

I really appreciate your help on this. I used your lsof procedure on the pid
of Python after importing gnutls.library and it showed the following:
# lsof -p 12803
    SIZE     NODE NAME
    4096 25296897 /root
    4096        2 /
    8304  6700861 /usr/bin/python
  134400  2425120 /lib64/ld-2.5.so
 1699880  2425121 /lib64/libc-2.5.so
   23360  2425122 /lib64/libdl-2.5.so
  141456  2425126 /lib64/libpthread-2.5.so
  615136  2425128 /lib64/libm-2.5.so
 1234008  6692943 /usr/lib64/libpython2.4.so.1.0
  314520  6700843 /usr/lib64/libgcrypt.so.11.2.2
   85608  6692065 /usr/lib64/libz.so.1.2.3
   15584  2425108 /lib64/libtermcap.so.2.0.8
  114352  2425129 /lib64/libnsl-2.5.so
   18152  2425145 /lib64/libutil-2.5.so
  540576  6702936 /usr/lib64/libgnutls.so.13.0.6
  247224  6692881 /usr/lib64/libreadline.so.5.1
56414144  6690688 /usr/lib/locale/locale-archive
   21808  6853309 /usr/lib64/python2.4/lib-dynload/readline.so
   25464  6691193 /usr/lib64/gconv/gconv-modules.cache
   19960  7113538
/usr/lib64/python2.4/site-packages/gnutls/library/_gnutls_init.so
  134495  6703491 /usr/lib64/libgnutls-extra.so.26.4.6
   15208  6696908 /usr/lib64/libgpg-error.so.0.3.0
 2669434  6702949 /usr/local/lib/libgnutls.so.26.4.6
  320003  6857078 /usr/lib64/python2.4/site-packages/_ctypes.so
   23736  6853317 /usr/lib64/python2.4/lib-dynload/structmodule.so

So it is using so.13.0.6 from /usr/lib64 and so.26.4.6 from /usr/local/lib.
I thought this looked a bit odd, so I tried to manually update various
libgnutls files in my /usr/lib64 directory......and now I've broken it!
Python gives an error when I run the "import functions" command in PHP:

>>> from gnutls.library import functions
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "gnutls/library/__init__.py", line 4, in ?
    from gnutls.library import _gnutls_init
ImportError: cannot import name _gnutls_init


Unfortunately, my knowledge of Linux libraries/packages and how they are
stored, updated and loaded is poor - I only ever used Yum before this. I may
have to give up. It's too hard. But I hate to throw away the time already
spent trying.   :-(

If only there was a newer Yum package for gnutls. Yum only offers v1.4.

John

-----Original Message-----
From: Dan Pascu [mailto:[hidden email]]
Sent: 27 November 2008 12:02
To: [hidden email]
Cc: [hidden email]
Subject: Re: [OpenSIPS-Users] Mediaproxy 2.1.0 on Red Hat/CentOS

On Thursday 27 November 2008, John Quick wrote:

> Dan
>
> Your explanation makes a lot of sense - getting the correct version of
> the gnutls libraries has been a big problem and I downloaded 2.4.2 and
> installed from source after I had installed the Python libraries.
> However, I now have problems re-installing packages/libraries so the
> old ones are properly replaced. For example, "./setup clean" does not
> remove the old .so files in the build directory for my Python packages
> - I had to manually delete them. I also had to manually delete the .pyc
> files in the mediaproxy directory and mediaproxy/interfaces.

You do not need to delete the .pyc files. setup clean only cleans files
from builds that were not done in-place. if you did ./build_inplace then
you need to delete the .so yourself to rebuild it.

>
> Have just tried rebuilding/installing:
> python-gnutls-1.1.6, then
> Twisted-8.1.0, then
> build_inplace mediaproxy
> and I still get the same error when I run media-dispatcher.

The order to install them is:

libtasn1 (libgnutls dependency)
libgcrypt11 (libgnutls dependency)
libgnutls26 (version 2.4.2)
python-gnutls (build it only after the above had been installed)
other deps
mediaproxy

unfortunately, gnutls has some dependencies of its own (libtasn1 and
libgcrypt), and the version you use (2.4.2) needs a certain version of
these companion libraries (for gnutls-2.4.x I have libgcrypt-1.4.1 and
libtasn1-1.4). It may be possible that you still get the error because
libtasn1 and/or libgcrypt are still old versions.

To check that libraries you use:

run a python interpreter and execute the statement below:

python
>>> from gnutls.library import functions

then find the pid of that python interpreter (ps ax | grep python) and run
lsof on it:

lsof -p pid_of_python_interpreter

then run

ldd gnutls/library/_gnutls_init.so

Compare the versions and paths for libgnutls, libgcrypt and libtasn1 from
the outputs of lsof and ldd. They must be the same.

>
> Two things that are probably relevant:
> 1. The usual ./configure; make; make install process that I used for
> the source package of gnutls failed to copy gnutls-extra.so file to the
> Linux lib path - I eventually copied it manually, but don't feel happy
> about having to do that.

I don't think that's a problem.

> 2. When I rebuild Twisted-8.1.0, it gives the following error during
> the "install" process, but the install script still completes:

I do not know about that. You should ask the twisted developers about it.
I guess a simple solution would be to remove the offending files, since
they're only tests. Aren't they ignored anyways, since the error is just
in byte compiling them?

>
> [root@opensips02 Twisted-8.1.0]# ./setup.py install
> running install
> running build
> running build_py
> running build_ext
> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC
> -I/usr/include/python2.4 -c conftest.c -o conftest.o
> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC
> -I/usr/include/python2.4 -c conftest.c -o conftest.o
> running build_scripts
> running install_lib
> copying build/lib.linux-x86_64-2.4/twisted/python/_epoll.so ->
> /usr/lib64/python2.4/site-packages/twisted/python
> copying build/lib.linux-x86_64-2.4/twisted/test/raiser.so ->
> /usr/lib64/python2.4/site-packages/twisted/test
> copying build/lib.linux-x86_64-2.4/twisted/protocols/_c_urlarg.so ->
> /usr/lib64/python2.4/site-packages/twisted/protocols
> copying build/lib.linux-x86_64-2.4/twisted/runner/portmap.so ->
> /usr/lib64/python2.4/site-packages/twisted/runner
> byte-compiling
> /usr/lib64/python2.4/site-packages/twisted/test/generator_failure_tests
>.py to generator_failure_tests.pyc
>   File
> "/usr/lib64/python2.4/site-packages/twisted/test/generator_failure_test
>s.py" , line 66
>     yield
>          ^
> SyntaxError: invalid syntax
>
>
> I haven't rebuilt/installed python-application or cjson packages since
> upgrading gnutls - are they relevant? If so, what is the correct order

no. pyhton-application and python-cjson are standalone, so you can install
them whenever you like.

> for building the various python packages?

See above.

--
Dan


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

Dan Pascu
On Thursday 27 November 2008, John Quick wrote:

> Dan
>
> I really appreciate your help on this. I used your lsof procedure on
> the pid of Python after importing gnutls.library and it showed the
> following: # lsof -p 12803
>     SIZE     NODE NAME
>     4096 25296897 /root
>     4096        2 /
>     8304  6700861 /usr/bin/python
>   134400  2425120 /lib64/ld-2.5.so
>  1699880  2425121 /lib64/libc-2.5.so
>    23360  2425122 /lib64/libdl-2.5.so
>   141456  2425126 /lib64/libpthread-2.5.so
>   615136  2425128 /lib64/libm-2.5.so
>  1234008  6692943 /usr/lib64/libpython2.4.so.1.0
>   314520  6700843 /usr/lib64/libgcrypt.so.11.2.2
>    85608  6692065 /usr/lib64/libz.so.1.2.3
>    15584  2425108 /lib64/libtermcap.so.2.0.8
>   114352  2425129 /lib64/libnsl-2.5.so
>    18152  2425145 /lib64/libutil-2.5.so
>   540576  6702936 /usr/lib64/libgnutls.so.13.0.6
>   247224  6692881 /usr/lib64/libreadline.so.5.1
> 56414144  6690688 /usr/lib/locale/locale-archive
>    21808  6853309 /usr/lib64/python2.4/lib-dynload/readline.so
>    25464  6691193 /usr/lib64/gconv/gconv-modules.cache
>    19960  7113538
> /usr/lib64/python2.4/site-packages/gnutls/library/_gnutls_init.so
>   134495  6703491 /usr/lib64/libgnutls-extra.so.26.4.6
>    15208  6696908 /usr/lib64/libgpg-error.so.0.3.0
>  2669434  6702949 /usr/local/lib/libgnutls.so.26.4.6
>   320003  6857078 /usr/lib64/python2.4/site-packages/_ctypes.so
>    23736  6853317 /usr/lib64/python2.4/lib-dynload/structmodule.so
>
> So it is using so.13.0.6 from /usr/lib64 and so.26.4.6 from
> /usr/local/lib. I thought this looked a bit odd,

That's the cause of your problem, exactly what I mentioned before. For
some reason _gnutls_init.so was compiled against one (probably the one
in /usr/local), while the lib loaded at runtime was from /usr/lib64

> so I tried to manually  
> update various libgnutls files in my /usr/lib64 directory......and now
> I've broken it!

You didn't actually broke it. You probably removed one of the libs, the
one that _gnutls_init.so was linked against, and now the module cannot be
loaded. Rebuild/reinstall python-gnutls. Make sure it links with the same
lib that will be loaded at rutime (you should only see one set, either
from /usr/local or /usr/lib64, but not both).

>
> Python gives an error when I run the "import functions" command in PHP:
> >>> from gnutls.library import functions
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "gnutls/library/__init__.py", line 4, in ?
>     from gnutls.library import _gnutls_init
> ImportError: cannot import name _gnutls_init

Yeah. As I said, the lib _gnutls_init.so was linked against is gone.

> Unfortunately, my knowledge of Linux libraries/packages and how they
> are stored, updated and loaded is poor - I only ever used Yum before
> this. I may have to give up. It's too hard. But I hate to throw away
> the time already spent trying.   :-(

I do not have experience with 64bit systems, so I don't know what to
advice you, but your problem seems to come from using a mix of 32/64 bit
versions of the same library at the same time.
One idea that comes to mind, is to remove everything gnutls related
from /usr/local (libgnutls, libcgrypt, libtasn1 and their header files)
and then rebuild/reinstall python-gnutls. Hopefully will use the 64 bit
versions of the libs from /usr/lib64 this time, as python and the other
modules.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

Dan Pascu
On Thursday 27 November 2008, Dan Pascu wrote:
> I do not have experience with 64bit systems, so I don't know what to
> advice you, but your problem seems to come from using a mix of 32/64
> bit versions of the same library at the same time.
> One idea that comes to mind, is to remove everything gnutls related
> from /usr/local (libgnutls, libcgrypt, libtasn1 and their header files)
> and then rebuild/reinstall python-gnutls. Hopefully will use the 64 bit
> versions of the libs from /usr/lib64 this time, as python and the other
> modules.

Wait, disregard this. It seems the libs in /usr/lib64 are the old ones.
You actually would need the ones in /usr/local

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

Dan Pascu
In reply to this post by John Quick
On Thursday 27 November 2008, John Quick wrote:
> Unfortunately, my knowledge of Linux libraries/packages and how they
> are stored, updated and loaded is poor - I only ever used Yum before
> this. I may have to give up. It's too hard. But I hate to throw away
> the time already spent trying.   :-(

My advice (unless you have a very strong reason to use redhat) would be to
use something that makes it easier to get things working. You can use
debian (lenny or sid) or ubuntu (8.10) where you can simply use apt-get
install it or where building it is as simple as running debuild.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

John Quick
Hi Dan

I wasn't going to let it defeat me. After a lot of reading up on Linux
libraries and a lot of experimenting and testing, I finally got mediaproxy 2
running on CentOS 5 64 bit.

I haven't used it for any calls yet, so I hope it will actually work.

I plan to publish a page of detailed notes on my web site. Please could you
check that you are happy with it:
http://www.smartvox.co.uk/serfaq_install_mediaproxy2.htm

Thanks
John Quick
Smartvox Limited


-----Original Message-----
From: Dan Pascu [mailto:[hidden email]]
Sent: 27 November 2008 19:20
To: [hidden email]
Cc: [hidden email]
Subject: Re: [OpenSIPS-Users] Mediaproxy 2.1.0 on Red Hat/CentOS

On Thursday 27 November 2008, John Quick wrote:
> Unfortunately, my knowledge of Linux libraries/packages and how they
> are stored, updated and loaded is poor - I only ever used Yum before
> this. I may have to give up. It's too hard. But I hate to throw away
> the time already spent trying.   :-(

My advice (unless you have a very strong reason to use redhat) would be to
use something that makes it easier to get things working. You can use
debian (lenny or sid) or ubuntu (8.10) where you can simply use apt-get
install it or where building it is as simple as running debuild.

--
Dan


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

troxlinux
Hi jhon, a few months ago back I install mediaproxy satisfactorily in centos 5, my problem was that I could not initiate mediaproxy to start with the system, you can post the archives within the /etc/init.d/ directory

best regards ..

rickygm

2008/12/4 John Quick <[hidden email]>
Hi Dan

I wasn't going to let it defeat me. After a lot of reading up on Linux
libraries and a lot of experimenting and testing, I finally got mediaproxy 2
running on CentOS 5 64 bit.

I haven't used it for any calls yet, so I hope it will actually work.

I plan to publish a page of detailed notes on my web site. Please could you
check that you are happy with it:
http://www.smartvox.co.uk/serfaq_install_mediaproxy2.htm



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

Dan Pascu
In reply to this post by John Quick
On Thursday 04 December 2008, John Quick wrote:

> Hi Dan
>
> I wasn't going to let it defeat me. After a lot of reading up on Linux
> libraries and a lot of experimenting and testing, I finally got
> mediaproxy 2 running on CentOS 5 64 bit.
>
> I haven't used it for any calls yet, so I hope it will actually work.
>
> I plan to publish a page of detailed notes on my web site. Please could
> you check that you are happy with it:
> http://www.smartvox.co.uk/serfaq_install_mediaproxy2.htm

Thanks for all your effort to investigate this and for sharing it with the
others. The document looks fine (take it from someone who is not familiar
with RedHat/CentOS). One observation, though, if you use python2.5 it
already has ctypes included in the standard libraries, so you do not need
to install that separately. That package (ctypes) is only needed for
python2.4 or older.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

John Quick
In reply to this post by troxlinux

Hi rickygm

 

I am working on the /etc/init.d/ start/stop scripts at the moment. It is possible to get something that works (although my version is far from “bullet-proof”) using the sample Debian init files as an initial starting point:

/usr/local/mediaproxy-2.1.0/debian/mediaproxy-dispatcher.init

/usr/local/mediaproxy-2.1.0/debian/mediaproxy-relay.init

 

First, I copied them to /etc/init.d and renamed them to shorter names “mpxydisp” and “mpxyrelay” (because the convention seems to be to use short names for startup scripts).

 

Then I cheated a bit and followed the instructions at this link to get a working version of “start-stop-daemon”:

http://www.networkedmediatank.com/showthread.php?tid=10189&pid=88150#pid88150

 

Now edit the startup scripts and replace all cases of “log_daemon_msg”, “log_progress_msg” and “log_end_msg” with simple echo.

 

Testing it from the command line is so far looking good, but to get it to work automatically during Linux boot-up just requires reformatting the comment block at the beginning to match the format required by chkconfig, then running chkconfig –add mpxydisp

 

I’ll post an update when I’ve got it working and tested. Hopefully I can soon put samples of the start/stop scripts available for download from the smartvox web site.

 

John Quick

 

 


From: troxlinux [mailto:[hidden email]]
Sent: 04 December 2008 18:01
To: [hidden email]
Cc: [hidden email]
Subject: Re: [OpenSIPS-Users] Mediaproxy 2.1.0 on Red Hat/CentOS

 

Hi jhon, a few months ago back I install mediaproxy satisfactorily in centos 5, my problem was that I could not initiate mediaproxy to start with the system, you can post the archives within the /etc/init.d/ directory

best regards ..

rickygm

2008/12/4 John Quick <[hidden email]>

Hi Dan

I wasn't going to let it defeat me. After a lot of reading up on Linux
libraries and a lot of experimenting and testing, I finally got mediaproxy 2
running on CentOS 5 64 bit.

I haven't used it for any calls yet, so I hope it will actually work.

I plan to publish a page of detailed notes on my web site. Please could you
check that you are happy with it:
http://www.smartvox.co.uk/serfaq_install_mediaproxy2.htm

 


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

John Quick
In reply to this post by Dan Pascu
Dan

It looks like it works ok for calls. The system log file has messages in it
such as:
"Added new stream"
"Created new session"
"Received updated SDP answer"
"Got initial answer from callee for stream"

Also, I have 2-way audio on the phones and at least one of the endpoints is
behind NAT. Quite encouraging, I would say!

I now want to know how to control the log messages from MediaProxy, but I'll
post it as a new question if I don't find the info by searching.

Thanks.

John Quick
Smartvox Limited


-----Original Message-----
From: Dan Pascu [mailto:[hidden email]]
Sent: 05 December 2008 17:04
To: [hidden email]
Cc: [hidden email]
Subject: Re: [OpenSIPS-Users] Mediaproxy 2.1.0 on Red Hat/CentOS

On Thursday 04 December 2008, John Quick wrote:

> Hi Dan
>
> I wasn't going to let it defeat me. After a lot of reading up on Linux
> libraries and a lot of experimenting and testing, I finally got
> mediaproxy 2 running on CentOS 5 64 bit.
>
> I haven't used it for any calls yet, so I hope it will actually work.
>
> I plan to publish a page of detailed notes on my web site. Please could
> you check that you are happy with it:
> http://www.smartvox.co.uk/serfaq_install_mediaproxy2.htm

Thanks for all your effort to investigate this and for sharing it with the
others. The document looks fine (take it from someone who is not familiar
with RedHat/CentOS). One observation, though, if you use python2.5 it
already has ctypes included in the standard libraries, so you do not need
to install that separately. That package (ctypes) is only needed for
python2.4 or older.

--
Dan


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Mediaproxy 2.1.0 on Red Hat/CentOS

Jeff Pyle
John,

A hearty thank you from this CentOS user.  I had given up on being able
to use Mediaproxy without a Debian/Ubuntu box.  I can't speak for
others, but I would imagine you've done nothing short of opened
Mediaproxy to the rest of the CentOS/Redhat users out there.  Very, very
nice.


- Jeff
   

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of John Quick
Sent: Friday, December 05, 2008 2:15 PM
To: 'Dan Pascu'
Cc: [hidden email]
Subject: Re: [OpenSIPS-Users] Mediaproxy 2.1.0 on Red Hat/CentOS

Dan

It looks like it works ok for calls. The system log file has messages in
it such as:
"Added new stream"
"Created new session"
"Received updated SDP answer"
"Got initial answer from callee for stream"

Also, I have 2-way audio on the phones and at least one of the endpoints
is behind NAT. Quite encouraging, I would say!

I now want to know how to control the log messages from MediaProxy, but
I'll post it as a new question if I don't find the info by searching.

Thanks.

John Quick
Smartvox Limited

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users