<h1 dir="auto">Checklist</h1>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>

<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>

<p dir="auto"><strong>5.0.0</strong>:</p>

<h1 dir="auto">Expected Behavior</h1>

<p dir="auto">I'm a new celery user, not quite sure if I should report this as a bug or feature request and I'm not quite sure how to best fix this myself, so I hope you'll bear with me :-)</p>
<p dir="auto">Redis 6.0 or greater implements users in the form of ACL (see <a href="https://redis.io/topics/acl" rel="nofollow">https://redis.io/topics/acl</a>), however, celery throws an WRONGPASS error when using the following broker URL:</p>
<p dir="auto"><code class="notranslate">redis://user:password@localhost:6379/0</code></p>
<p dir="auto">We would expect celery to connect to redis using the correct user:password combination and not throw a password error. Older redis versions did not implement ACL; looking at _params_from_url function on line 277 in celery/backend/redis.py, it seems like celery currently only implements a broker URL containing a password and no username, as indicated by line 278:</p>
<p dir="auto"><code class="notranslate">scheme, host, port, _, password, path, query = _parse_url(url)</code></p>
<p dir="auto">I would expect celery to implement the user:password@host scheme, as well as the current password@host scheme in order to correctly handle the ACL introduced in redis &gt;6.0</p>
<h1 dir="auto">Actual Behavior</h1>

<p dir="auto">Celery throws this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2020-10-18 02:35:54,748: ERROR/MainProcess] consumer: Cannot connect to redis://user:**@localhost:6379/0: WRONGPASS invalid username-password pair.

Trying again in 18.00 seconds... (9/100)```"><pre class="notranslate"><code class="notranslate">[2020-10-18 02:35:54,748: ERROR/MainProcess] consumer: Cannot connect to redis://user:**@localhost:6379/0: WRONGPASS invalid username-password pair.

Trying again in 18.00 seconds... (9/100)```
</code></pre></div>
<h1 dir="auto">Checklist</h1>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown &amp; rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>

<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li><a href="https://github.com/celery/celery/issues/3585" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/3585/hovercard">Subsequent groups within a chain fail #3585</a></li>
<li><a href="https://github.com/celery/celery/issues/3585" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/3585/hovercard">Consecutive groups in chain fails #4848 </a></li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>

<p dir="auto"><strong>Celery version</strong>: 4.2.2 (windowlicker)<br>
<strong>Celery report</strong>:<br>
software -&gt; celery:4.2.2 (windowlicker)<br>
kombu:4.3.0 py:2.7.5<br>
billiard:3.5.0.5 redis:3.2.1<br>
platform -&gt; system:Linux arch:64bit, ELF imp:CPython<br>
loader   -&gt; celery.loaders.app.AppLoader<br>
settings -&gt; transport:redis results:redis://localhost:6379/0</p>
<p dir="auto">broker_url: redis://localhost:6379/0<br>
result_backend: redis://localhost:6379/0</p>
<p dir="auto"></p>

<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from celery import signature, group, chain
from tasks import task

task1 = task.si('task1')
task2 = task.si('task2')

group1 = group(task.si('group1 job1'), task.si('group1 job2'))
group2 = group(task.si('group2 job1'), task.si('group2 job2'))

# working sequences
#res = chain(group1, group2)
#res = chain(group1, task1, group2)
#res = chain(task1, group1, task2, group2)
#res = chain(group1, group2, task1)

# failing sequence
res = chain(task1, group1, group2)

res.delay()"><pre class="notranslate"><code class="notranslate">from celery import signature, group, chain
from tasks import task

task1 = task.si('task1')
task2 = task.si('task2')

group1 = group(task.si('group1 job1'), task.si('group1 job2'))
group2 = group(task.si('group2 job1'), task.si('group2 job2'))

# working sequences
#res = chain(group1, group2)
#res = chain(group1, task1, group2)
#res = chain(task1, group1, task2, group2)
#res = chain(group1, group2, task1)

# failing sequence
res = chain(task1, group1, group2)

res.delay()
</code></pre></div>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">Tasks are passed to celery</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">It looks like celery is making the wrong decision to convert this chain into a chord. There are some workarounds available, but no real fix is available yet.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;debug_run.py&quot;, line 19, in &lt;module&gt;
    res.delay()
  File &quot;/home/ja04913/ocenter/ocenter-venv/lib/python2.7/site-packages/celery/canvas.py&quot;, line 179, in delay
    return self.apply_async(partial_args, partial_kwargs)
  File &quot;/home/ja04913/ocenter/ocenter-venv/lib/python2.7/site-packages/celery/canvas.py&quot;, line 557, in apply_async
    dict(self.options, **options) if options else self.options))
  File &quot;/home/ja04913/ocenter/ocenter-venv/lib/python2.7/site-packages/celery/canvas.py&quot;, line 573, in run
    task_id, group_id, chord,
  File &quot;/home/ja04913/ocenter/ocenter-venv/lib/python2.7/site-packages/celery/canvas.py&quot;, line 655, in prepare_steps
    task_id=prev_res.task_id, root_id=root_id, app=app,
AttributeError: 'GroupResult' object has no attribute 'task_id'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "debug_run.py", line 19, in &lt;module&gt;
    res.delay()
  File "/home/ja04913/ocenter/ocenter-venv/lib/python2.7/site-packages/celery/canvas.py", line 179, in delay
    return self.apply_async(partial_args, partial_kwargs)
  File "/home/ja04913/ocenter/ocenter-venv/lib/python2.7/site-packages/celery/canvas.py", line 557, in apply_async
    dict(self.options, **options) if options else self.options))
  File "/home/ja04913/ocenter/ocenter-venv/lib/python2.7/site-packages/celery/canvas.py", line 573, in run
    task_id, group_id, chord,
  File "/home/ja04913/ocenter/ocenter-venv/lib/python2.7/site-packages/celery/canvas.py", line 655, in prepare_steps
    task_id=prev_res.task_id, root_id=root_id, app=app,
AttributeError: 'GroupResult' object has no attribute 'task_id'
</code></pre></div>