Docker-airflow: "Invalid IPv6 URL" in worker

Created on 1 Aug 2019  路  2Comments  路  Source: puckel/docker-airflow

My worker keeps crashing with the following message:

worker_1     | [2019-08-01 02:26:27,570: CRITICAL/MainProcess] Unrecoverable error: ValueError('Invalid IPv6 URL',)
worker_1     | Traceback (most recent call last):
worker_1     |   File "/usr/local/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
worker_1     |     self.blueprint.start(self)
worker_1     |   File "/usr/local/lib/python3.6/site-packages/celery/bootsteps.py", line 115, in start
worker_1     |     self.on_start()
worker_1     |   File "/usr/local/lib/python3.6/site-packages/celery/apps/worker.py", line 139, in on_start
worker_1     |     self.emit_banner()
worker_1     |   File "/usr/local/lib/python3.6/site-packages/celery/apps/worker.py", line 154, in emit_banner
worker_1     |     ' \n', self.startup_info(artlines=not use_image))),
worker_1     |   File "/usr/local/lib/python3.6/site-packages/celery/apps/worker.py", line 217, in startup_info
worker_1     |     results=self.app.backend.as_uri(),
worker_1     |   File "/usr/local/lib/python3.6/site-packages/celery/backends/base.py", line 133, in as_uri
worker_1     |     url = maybe_sanitize_url(self.url or '')
worker_1     |   File "/usr/local/lib/python3.6/site-packages/kombu/utils/url.py", line 121, in maybe_sanitize_url
worker_1     |     return sanitize_url(url, mask)
worker_1     |   File "/usr/local/lib/python3.6/site-packages/kombu/utils/url.py", line 114, in sanitize_url
worker_1     |     return as_url(*_parse_url(url), sanitize=True, mask=mask)
worker_1     |   File "/usr/local/lib/python3.6/site-packages/kombu/utils/url.py", line 72, in url_to_parts
worker_1     |     scheme = urlparse(url).scheme
worker_1     |   File "/usr/local/lib/python3.6/urllib/parse.py", line 368, in urlparse
worker_1     |     splitresult = urlsplit(url, scheme, allow_fragments)
worker_1     |   File "/usr/local/lib/python3.6/urllib/parse.py", line 441, in urlsplit
worker_1     |     raise ValueError("Invalid IPv6 URL")
worker_1     | ValueError: Invalid IPv6 URL

My first thought was that my setting for REDIS_HOST might be incorrect, but it seems to be working great for flower.

Any ideas what the issue might be or how to troubleshoot it?

I'm using version 1.10.3 of the image.

Most helpful comment

Found the issue. I had specified the REDIS_HOST in an environment variable file. Also in that file was an environment variable that had a '[' character in it. For some reason, that character was mangling the value for REDIS_HOST. Interestingly, that other env variable was a DB password and connecting to the DB worked perfectly. Strange, but changing the DB password so it contained only characters fixed the issue.

All 2 comments

Found the issue. I had specified the REDIS_HOST in an environment variable file. Also in that file was an environment variable that had a '[' character in it. For some reason, that character was mangling the value for REDIS_HOST. Interestingly, that other env variable was a DB password and connecting to the DB worked perfectly. Strange, but changing the DB password so it contained only characters fixed the issue.

Changing the DB password to contain only characters also fixes value errors while creating airflow worker, such as 'ValueError: Invalid literal for int() with base 10: '[password string]''

Was this page helpful?
0 / 5 - 0 ratings