Redirection loop encountered


I just ran the script for migtration from jessie to stretch. I get a failure after when trying to apt update

root@server:~# sudo apt update
Ign:2 stretch InRelease                                            
Atteint:3 stretch/updates InRelease                                  
Atteint:4 stretch Release                                          
Ign:1 stretch InRelease             
Err:5 stretch Release
 Redirection loop encountered
Lecture des listes de paquets... Fait
E: The repository ' stretch Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

This is the apt file that I have:

root@server:~# cat /etc/apt/sources.list.d/yunohost.list 
deb stretch stable

Am I missing something?

Uh that should work, really don’t understand what’s happening …

Can you try to apt upgrade --fix-missing maybe ?

It udpated the packages from the debian repos but when I run apt update I still get the same result…

Is there some logs that I can share to help on this issue?


This is what is get when I try to do it via the admin dashboard (if there is something that can help but it looks the same):

Yunohost encountered an internal error :/
Really sorry about that.
You should look for help on the forum or the chat to fix the situation, or report the bug on the bugtracker.
The following information might be useful for the person helping you :

PUT /update
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/", line 406, in process
    ret = self.actionsmap.process(arguments, timeout=30, route=_route)
  File "/usr/lib/python2.7/dist-packages/moulinette/", line 498, in process
    return func(**arguments)
  File "/usr/lib/moulinette/yunohost/", line 426, in tools_update
    if not cache.update():
  File "/usr/lib/python2.7/dist-packages/apt/", line 464, in update
    raise FetchFailedException(e)
FetchFailedException: E:The repository ' stretch Release' does not have a Release file.

This was solved on the chat : turns out there was a missing /debian in the sources.list line. The line should read :

deb stretch stable

Not sure why the /debian was missing but it was dating back from the jessie instance (apparently ~3 years old) - maybe a very old piece of code during the install at that time …