CannotListenError: Не удалось прослушать 0.0.0.0:25060: [Errno 98] Адрес уже используется - PullRequest
1 голос
/ 10 октября 2019

Я работаю над установкой CDRTOOL + freeradius + mediaproxy + opensips. Я застрял на установке медиапрокси, в то время как другие 3 завершены.

, когда я запускаю медиапрокси-диспетчер,

/ usr / bin / media-dispatcher --no-fork

Я получаю следующую ошибку: -

INFO     [main] Starting MediaProxy Dispatcher 2.6.6
INFO     [main] Twisted is using epollreactor
CRITICAL [main] failed to create MediaProxy Dispatcher: Couldn't listen on 0.0.0.0:25060: [Errno 98] Address already in use.
ERROR    [main] Traceback (most recent call last):
ERROR    [main]   File "/usr/bin/media-dispatcher", line 53, in <module>
ERROR    [main]     dispatcher = Dispatcher()
ERROR    [main]   File "/usr/lib/python2.7/dist-packages/mediaproxy/dispatcher.py", line 491, in __init__
ERROR    [main]     self.relay_listener = reactor.listenTLS(dispatcher_port, self.relay_factory, self.tls_context, interface=dispatcher_addr)
ERROR    [main]   File "/usr/lib/python2.7/dist-packages/gnutls/interfaces/twisted/__init__.py", line 351, in listenTLS
ERROR    [main]     p.startListening()
ERROR    [main]   File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 980, in startListening
ERROR    [main]     raise CannotListenError(self.interface, self.port, le)
ERROR    [main] CannotListenError: Couldn't listen on 0.0.0.0:25060: [Errno 98] Address already in use.

Я застрял здесь на 2-3 дня .... кто-нибудь может мне помочь, плзз ??

это ошибка, которую я получаю послеубить процесс и запустить его: -

root@santo-VirtualBox:~# kill 1308
root@santo-VirtualBox:~# /usr/bin/media-dispatcher --no-fork
INFO     [main] Starting MediaProxy Dispatcher 2.6.6
INFO     [main] Twisted is using epollreactor
^CINFO     [main] Received KeyboardInterrupt, exiting.

GARBAGE:
gc: collectable <tuple 0x7fe92ca67950>
gc: collectable <StgDict 0x7fe92cf4e898>
gc: collectable <_ctypes.PyCArrayType 0x5590a63665c0>
gc: collectable <getset_descriptor 0x7fe92ca6b878>
gc: collectable <getset_descriptor 0x7fe92ca6b8c0>
gc: collectable <tuple 0x7fe932a62e10>
gc: collectable <tuple 0x7fe92ca67d50>
gc: collectable <StgDict 0x7fe92cf4ea40>
gc: collectable <_ctypes.PyCArrayType 0x5590a636d900>
gc: collectable <getset_descriptor 0x7fe92ca6b998>
gc: collectable <getset_descriptor 0x7fe92ca6b9e0>
gc: collectable <tuple 0x7fe930e53c00>
gc: collectable <getset_descriptor 0x7fe92ca6ba28>
gc: collectable <getset_descriptor 0x7fe92ca6ba70>

COLLECTABLE CYCLES:
<class 'ctypes.c_char_Array_256'> -> (<class 'ctypes.c_char_Array_256'>, <type '_ctypes.Array'>, <type '_ctypes._CData'>, <type 'object'>) -> <class 'ctypes.c_char_Array_256'>
<class 'ctypes.c_char_Array_256'> -> {'raw': <attribute 'raw' of 'c_char_Array_256' objects>, '__module__': 'ctypes', '__dict__': <attribute '__dict__' of 'c_char_Array_256' objects>, '__weakref__': <attribute '__weakref__' of 'c_char_Array_256' objects>, '_length_': 256, '_type_': <class 'ctypes.c_char'>, '__doc__': None, 'value': <attribute 'value' of 'c_char_Array_256' objects>} -> <attribute 'value' of 'c_char_Array_256' objects> -> <class 'ctypes.c_char_Array_256'>
<class 'ctypes.c_char_Array_256'> -> {'raw': <attribute 'raw' of 'c_char_Array_256' objects>, '__module__': 'ctypes', '__dict__': <attribute '__dict__' of 'c_char_Array_256' objects>, '__weakref__': <attribute '__weakref__' of 'c_char_Array_256' objects>, '_length_': 256, '_type_': <class 'ctypes.c_char'>, '__doc__': None, 'value': <attribute 'value' of 'c_char_Array_256' objects>} -> <attribute 'raw' of 'c_char_Array_256' objects> -> <class 'ctypes.c_char_Array_256'>
<class 'ctypes.c_char_Array_256'> -> {'raw': <attribute 'raw' of 'c_char_Array_256' objects>, '__module__': 'ctypes', '__dict__': <attribute '__dict__' of 'c_char_Array_256' objects>, '__weakref__': <attribute '__weakref__' of 'c_char_Array_256' objects>, '_length_': 256, '_type_': <class 'ctypes.c_char'>, '__doc__': None, 'value': <attribute 'value' of 'c_char_Array_256' objects>} -> <attribute '__weakref__' of 'c_char_Array_256' objects> -> <class 'ctypes.c_char_Array_256'>
<class 'gnutls.connection.LP_gnutls_x509_crt_int_Array_1'> -> (<class 'gnutls.connection.LP_gnutls_x509_crt_int_Array_1'>, <type '_ctypes.Array'>, <type '_ctypes._CData'>, <type 'object'>) -> <class 'gnutls.connection.LP_gnutls_x509_crt_int_Array_1'>
<class 'ctypes.c_char_Array_256'> -> {'raw': <attribute 'raw' of 'c_char_Array_256' objects>, '__module__': 'ctypes', '__dict__': <attribute '__dict__' of 'c_char_Array_256' objects>, '__weakref__': <attribute '__weakref__' of 'c_char_Array_256' objects>, '_length_': 256, '_type_': <class 'ctypes.c_char'>, '__doc__': None, 'value': <attribute 'value' of 'c_char_Array_256' objects>} -> <attribute '__dict__' of 'c_char_Array_256' objects> -> <class 'ctypes.c_char_Array_256'>
<class 'gnutls.connection.LP_gnutls_x509_crt_int_Array_1'> -> {'__module__': 'gnutls.connection', '__dict__': <attribute '__dict__' of 'LP_gnutls_x509_crt_int_Array_1' objects>, '__weakref__': <attribute '__weakref__' of 'LP_gnutls_x509_crt_int_Array_1' objects>, '_length_': 1, '_type_': <class 'gnutls.library.types.LP_gnutls_x509_crt_int'>, '__doc__': None} -> <attribute '__weakref__' of 'LP_gnutls_x509_crt_int_Array_1' objects> -> <class 'gnutls.connection.LP_gnutls_x509_crt_int_Array_1'>
<class 'gnutls.connection.LP_gnutls_x509_crt_int_Array_1'> -> {'__module__': 'gnutls.connection', '__dict__': <attribute '__dict__' of 'LP_gnutls_x509_crt_int_Array_1' objects>, '__weakref__': <attribute '__weakref__' of 'LP_gnutls_x509_crt_int_Array_1' objects>, '_length_': 1, '_type_': <class 'gnutls.library.types.LP_gnutls_x509_crt_int'>, '__doc__': None} -> <attribute '__dict__' of 'LP_gnutls_x509_crt_int_Array_1' objects> -> <class 'gnutls.connection.LP_gnutls_x509_crt_int_Array_1'>

1 Ответ

0 голосов
/ 10 октября 2019

Проверка 1. Доступен ли порт?

В среде разработки эта ошибка обычно возникает, когда сервер, обслуживающий (удерживающий) ресурс порта, выходит из строя и не освобождает этот порт.

netstat -lntu

См. https://superuser.com/questions/529830/get-a-list-of-open-ports-in-linux

Каждый раз, когда вы получаете сообщение об ошибке занятости порта, следуйте этому шагу.

Проверка 2: Ошибки пакета Python?

Попробуйте обновить или понизить версию пакета Python. Были некоторые ошибки, которые могли быть связаны с ОС и другими зависимостями.

pip install my_package_name==1.2.3

Я проверил исходный код mediaproxy/dispatcher.py и не смог найти эти строки кода в последней ветке этого репозитория. .

...