I think we had a similar issue and we had to use a workaround, pease read
https://github.com/openwisp/openwisp-notifications/issues/142.

Best regards
*Federico Capoano*
OpenWISP OÜ
Harjumaa, Tallinn, Sepapaja tn 6, 15551
VAT: EE101989729
*openwisp.io* <http://openwisp.io>


On Tue, Mar 16, 2021 at 1:51 AM Suman Das <[email protected]>
wrote:

>
> First, Hello and Greetings to all,
>
> I'm customizing the OpenWisp controller and then When I'm applying
> Migration ,it keeps hanging and it is happening due to
> openwisp-notifications. If I press ctrl+c it is showing this error:
>
>
>
>
>
>
> ^CTraceback (most recent call last):
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/utils/functional.py",
> line 43, in __call__
>     return self.__value__
> AttributeError: 'ChannelPromise' object has no attribute '__value__'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/amqp/transport.py",
> line 137, in _connect
>     entries = socket.getaddrinfo(
>   File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
>     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
> socket.gaierror: [Errno -9] Address family for hostname not supported
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/utils/functional.py",
> line 344, in retry_over_time
>     return fun(*args, **kwargs)
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/connection.py",
> line 874, in _connection_factory
>     self._connection = self._establish_connection()
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/connection.py",
> line 809, in _establish_connection
>     conn = self.transport.establish_connection()
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/transport/pyamqp.py",
> line 130, in establish_connection
>     conn.connect()
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/amqp/connection.py",
> line 314, in connect
>     self.transport.connect()
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/amqp/transport.py",
> line 78, in connect
>     self._connect(self.host, self.port, self.connect_timeout)
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/amqp/transport.py",
> line 146, in _connect
>     raise (e
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/amqp/transport.py",
> line 162, in _connect
>     self.sock.connect(sa)
> ConnectionRefusedError: [Errno 111] Connection refused
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "manage.py", line 29, in <module>
>     execute_from_command_line(sys.argv)
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/django/core/management/__init__.py",
> line 401, in execute_from_command_line
>     utility.execute()
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/django/core/management/__init__.py",
> line 395, in execute
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/django/core/management/base.py",
> line 330, in run_from_argv
>     self.execute(*args, **cmd_options)
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/django/core/management/base.py",
> line 371, in execute
>     output = self.handle(*args, **options)
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/django/core/management/base.py",
> line 85, in wrapped
>     res = handle_func(*args, **kwargs)
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/django/core/management/commands/migrate.py",
> line 267, in handle
>     emit_post_migrate_signal(
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/django/core/management/sql.py",
> line 48, in emit_post_migrate_signal
>     models.signals.post_migrate.send(
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/django/dispatch/dispatcher.py",
> line 177, in send
>     return [
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/django/dispatch/dispatcher.py",
> line 178, in <listcomp>
>     (receiver, receiver(signal=self, sender=sender, **named))
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/openwisp_notifications/handlers.py",
> line 259, in notification_type_registered_unregistered_handler
>     tasks.ns_register_unregister_notification_type.delay()
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/celery/app/task.py",
> line 426, in delay
>     return self.apply_async(args, kwargs)
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/celery/app/task.py",
> line 566, in apply_async
>     return app.send_task(
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/celery/app/base.py",
> line 741, in send_task
>     amqp.send_task_message(P, name, message, **options)
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/celery/app/amqp.py",
> line 552, in send_task_message
>     ret = producer.publish(
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/messaging.py",
> line 178, in publish
>     return _publish(
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/connection.py",
> line 533, in _ensured
>     return fun(*args, **kwargs)
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/messaging.py",
> line 187, in _publish
>     channel = self.channel
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/messaging.py",
> line 209, in _get_channel
>     channel = self._channel = channel()
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/utils/functional.py",
> line 45, in __call__
>     value = self.__value__ = self.__contract__()
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/messaging.py",
> line 224, in <lambda>
>     channel = ChannelPromise(lambda: connection.default_channel)
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/connection.py",
> line 892, in default_channel
>     self._ensure_connection(**conn_opts)
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/connection.py",
> line 441, in _ensure_connection
>     return retry_over_time(
>   File
> "/home/dell/cosgrid/openwisp2/env/lib/python3.8/site-packages/kombu/utils/functional.py",
> line 358, in retry_over_time
>     sleep(1.0)
> KeyboardInterrupt
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenWISP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/openwisp/70c62597-0caf-466e-8871-44ccbe1446ban%40googlegroups.com
> <https://groups.google.com/d/msgid/openwisp/70c62597-0caf-466e-8871-44ccbe1446ban%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/CAAGgX6J-FguubvzT%3DqahtypBXXhF%3DRmpqZVR3OJKXLDr_EnZQw%40mail.gmail.com.

Reply via email to