Celery continuously warning "No hostname was supplied. Reverting to default 'None'"
See original GitHub issueAfter updating from:
name = "celery"
-version = "5.0.5"
+version = "5.1.2"
name = "kombu"
-version = "5.0.2"
+version = "5.1.0"
Kombu continuously emits this warning:
No hostname was supplied. Reverting to default 'None'
It seems to happen every time I queue a celery task (i.e.: `my_task.delay() from a celery task.
File "celery", line 8, in <module>
sys.exit(main())
File "celery/__main__.py", line 15, in main
sys.exit(_main())
File "celery/bin/celery.py", line 213, in main
return celery(auto_envvar_prefix="CELERY")
File "click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "click/core.py", line 782, in main
rv = self.invoke(ctx)
File "click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "celery/bin/base.py", line 133, in caller
return f(ctx, *args, **kwargs)
File "celery/bin/worker.py", line 346, in worker
worker.start()
File "celery/worker/worker.py", line 203, in start
self.blueprint.start(self)
File "celery/bootsteps.py", line 116, in start
step.start(parent)
File "celery/bootsteps.py", line 365, in start
return self.obj.start()
File "celery/worker/consumer/consumer.py", line 326, in start
blueprint.start(self)
File "celery/bootsteps.py", line 116, in start
step.start(parent)
File "celery/worker/consumer/consumer.py", line 618, in start
c.loop(*c.loop_args())
File "celery/worker/loops.py", line 81, in asynloop
next(loop)
File "kombu/asynchronous/hub.py", line 361, in create_loop
cb(*cbargs)
File "celery/concurrency/asynpool.py", line 482, in _event_process_exit
self.maintain_pool()
File "billiard/pool.py", line 1351, in maintain_pool
self._maintain_pool()
File "billiard/pool.py", line 1343, in _maintain_pool
self._repopulate_pool(joined)
File "billiard/pool.py", line 1328, in _repopulate_pool
self._create_worker_process(self._avail_index())
File "celery/concurrency/asynpool.py", line 477, in _create_worker_process
return super()._create_worker_process(i)
File "billiard/pool.py", line 1158, in _create_worker_process
w.start()
File "billiard/process.py", line 124, in start
self._popen = self._Popen(self)
File "billiard/context.py", line 333, in _Popen
return Popen(process_obj)
File "billiard/popen_fork.py", line 24, in __init__
self._launch(process_obj)
File "billiard/popen_fork.py", line 79, in _launch
code = process_obj._bootstrap()
File "billiard/process.py", line 327, in _bootstrap
self.run()
File "billiard/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "billiard/pool.py", line 292, in __call__
sys.exit(self.workloop(pid=pid))
File "billiard/pool.py", line 362, in workloop
result = (True, prepare_result(fun(*args, **kwargs)))
File "celery/app/trace.py", line 646, in fast_trace_task
R, I, T, Rstr = tasks[task].__trace__(
File "celery/app/trace.py", line 450, in trace_task
R = retval = fun(*args, **kwargs)
File "celery/app/trace.py", line 731, in __protected_call__
return self.run(*args, **kwargs)
File "idf/sync/tasks.py", line 86, in generate_missing_archives
tasks.post_process_order.delay(archive.order_id)
File "celery/app/task.py", line 422, in delay
return self.apply_async(args, kwargs)
File "celery/app/task.py", line 572, in apply_async
return app.send_task(
File "celery/app/base.py", line 763, in send_task
with self.producer_or_acquire(producer) as P:
File "celery/utils/objects.py", line 84, in __enter__
context = self._context = self.fallback(
File "kombu/resource.py", line 81, in acquire
R = self.prepare(R)
File "kombu/pools.py", line 60, in prepare
p = p()
File "kombu/utils/functional.py", line 186, in __call__
return self.evaluate()
File "kombu/utils/functional.py", line 189, in evaluate
return self._fun(*self._args, **self._kwargs)
File "kombu/pools.py", line 40, in create_producer
conn = self._acquire_connection()
File "kombu/pools.py", line 37, in _acquire_connection
return self.connections.acquire(block=True)
File "kombu/resource.py", line 81, in acquire
R = self.prepare(R)
File "kombu/connection.py", line 1017, in prepare
resource = resource()
File "kombu/utils/functional.py", line 186, in __call__
return self.evaluate()
File "kombu/utils/functional.py", line 189, in evaluate
return self._fun(*self._args, **self._kwargs)
File "kombu/connection.py", line 989, in new
return self.connection.clone()
File "kombu/connection.py", line 618, in clone
return self.__class__(**dict(self._info(resolve=False), **kwargs))
File "kombu/connection.py", line 631, in _info
logger.warning(
File "__init__.py", line 1458, in warning
self._log(WARNING, msg, args, **kwargs)
File "__init__.py", line 1589, in _log
self.handle(record)
File "__init__.py", line 1599, in handle
self.callHandlers(record)
File "__init__.py", line 952, in handle
self.emit(record)
Variables
D | {port: None} |
---|---|
resolve | False |
self | <Connection: sqs://localhost// at 0x7f784f4823a0> |
transport_cls | ‘sqs’ |
Can this have negative side effects, or should I worry about it? What exactly is wrong here?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Celery No hostname was supplied. Reverting to default ...
I'm following the steps for Celery here. I have this in my celery.py from __future__ import absolute_import, unicode_literals import os ...
Read more >Celery Tutorial. Problem Statement: (Server Overload) - Medium
celery -A proj worker -l INFO[2021-10-06 16:56:46,941: WARNING/MainProcess] No hostname was supplied. Reverting to default 'localhost'
Read more >Source code for kombu.connection - Celery
:keyword virtual_host: Default virtual host if not provided in the URL. ... and not ssl: logger.warning( 'Secure redis scheme specified (rediss) with no...
Read more >Connection - Kombu 5.2.4 documentation - Celery
NOTE: You cannot specify both the URL argument and use the hostname keyword argument at the same time. userid – Default user name...
Read more >Celery does not register tasks - Django Forum
celery -A landscape worker -l INFO [2022-06-30 14:48:36,670: WARNING/MainProcess] No hostname was supplied. Reverting to default 'localhost' ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@thedrow Yes, I do. The setup and all the details are the same as in this one https://github.com/celery/celery/issues/6895 but instead of connecting to the default I am connecting to AWS SQS.
Django’s settings.py
Here is the traceback
The celery worker works fine, it consumes messages, no problem there. What is bugging me is that warning message that pops up in the console from time to time.
Please let me know if you need further details. Thank you.
You can ignore this warning with:
I had to add this after the issue quickly ate my Sentry quota for a month.