Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Resolved] Wrong APT repositories - Connection test failed #2501

Closed
tim54000 opened this issue Feb 5, 2019 · 12 comments
Closed

[Resolved] Wrong APT repositories - Connection test failed #2501

tim54000 opened this issue Feb 5, 2019 · 12 comments
Milestone

Comments

@tim54000
Copy link

tim54000 commented Feb 5, 2019

Details:

  • Date | Tue 5 Feb 17:07:33 CET 2019
  • Bug report | N/A
  • DietPi version | v6.20.6 (Fourdee/master)
  • Img creator | DietPi Core Team
  • Pre-image | Raspbian Lite
  • SBC device | RPi 3 Model B (armv7l) (index=3)
  • Kernel version | Letsencrypt supports Free Noip.com Dynamic DNS #1159 SMP Sun Nov 4 17:50:20 GMT 2018
  • Distro | stretch (index=4)
  • Command | Connection test: http://deb.debian.org/debian
  • Exit code | 8
  • Software title | DietPi-Software

Steps to reproduce:

  1. Update from 6.14 to 6.20
  2. Finish the installation until restart
  3. The installer now wants to change the passwords (root and dietpi)
  4. Cancel the password change for both accounts

Expected behaviour:

The installer is supposed to finish after the Connection test

Actual behaviour:

The connection test fails (404 error). Try to pass it with "Cancel" and the installer will resume at point 3.

Additional logs:

Log file contents:
Spider mode enabled. Check if remote file exists.
--2019-02-05 17:07:29--  http://deb.debian.org/debian
Resolving deb.debian.org (deb.debian.org)... 130.89.148.14, 5.153.231.4, 149.20.4.15, ...
Connecting to deb.debian.org (deb.debian.org)|130.89.148.14|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://cdn-fastly.deb.debian.org/debian [following]
Spider mode enabled. Check if remote file exists.
--2019-02-05 17:07:29--  http://cdn-fastly.deb.debian.org/debian
Resolving cdn-fastly.deb.debian.org (cdn-fastly.deb.debian.org)... 151.101.120.204, 2a04:4e42:1d::204
Connecting to cdn-fastly.deb.debian.org (cdn-fastly.deb.debian.org)|151.101.120.204|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
Remote file does not exist -- broken link!!!

Extra logs:

After a failed connection test and the user wants to pass "Exit", it loops

[FAILED] DietPi-Software | Unable to continue, DietPi-Software will now terminate.
[  OK  ] DietPi-Software | Root access verified.
[  OK  ] DietPi-Software | RootFS R/W access verified.

[  OK  ] DietPi-Software | Initialized database
[  OK  ] DietPi-Software | Reading database
[ SUB1 ] DietPi-Set_software > passwords ()
[  OK  ] passwords  | Completed
[FAILED] DietPi-Software | Connection test: http://deb.debian.org/debian

@symbios24
Copy link

same problem here an endless loop to check for update

@Fourdee Fourdee added this to the v6.21 milestone Feb 6, 2019
@Fourdee Fourdee changed the title Impossible to stop the installer! ( + Error 404 on the connection test) [dupe] Impossible to stop the installer! ( + Error 404 on the connection test) Feb 6, 2019
@Fourdee
Copy link
Collaborator

Fourdee commented Feb 6, 2019

Merged into this ticket (same issue):
https://github.com/Fourdee/DietPi/issues/2501

@Fourdee Fourdee closed this as completed Feb 6, 2019
@tim54000
Copy link
Author

tim54000 commented Feb 12, 2019

After updating in 6.21.1, the assistant continues to loop endlessly.
How do I disable it manually?

@Fourdee
Copy link
Collaborator

Fourdee commented Feb 12, 2019

@tim54000

Hi Tim,

Please try the following:

  • Login to the system
  • Press CTRL+C straight away
  • Use the following command echo 2 > /DietPi/dietpi/.install_stage
  • Restart dietpi-ramdisk systemctl restart dietpi-ramdisk
  • Reboot system, device will now be in completed setup stage.

@tim54000
Copy link
Author

Thank you for your help! Finally I decided to add to the /etc/apt/sources.list the Raspbian repository (on the first line) that now works during the connection test.

@tim54000 tim54000 changed the title [dupe] Impossible to stop the installer! ( + Error 404 on the connection test) [dupe] Impossible to exit the installation with a failed connection test Feb 12, 2019
@MichaIng
Copy link
Owner

MichaIng commented Feb 12, 2019

@tim54000
The Raspbian repo was not already inside /etc/apt/sources.list??

Ah lol indeed: http://deb.debian.org/debian

That is very strange... @Fourdee something went wrong with image creation?
Ah no it was just the connection test. However, AFAIK this should be done according to first sources.list entry which should be the Raspbian repo. Will check...
€: Jep, obviously wrong repo entry: https://github.com/Fourdee/DietPi/blob/master/dietpi/dietpi-software#L136


The online image contains the correct entry: deb http://raspbian.raspberrypi.org/raspbian stretch main contrib non-free rpi
dietpi.txt entry as well correct: CONFIG_APT_RASPBIAN_MIRROR=http://raspbian.raspberrypi.org/raspbian

First run setup: https://github.com/Fourdee/DietPi/blob/master/dietpi/preboot#L160-L162


I guess the following happened:

  • Due to v6.20 update issue, dietpi-globals failed to load, thus $G_HW_MODEL is no valid integer, thus first run setup applies the Debian repo.

@tim54000
Please remove the ...deb.debian.org... entry completely from sources.list, so the Raspbian repo is the only entry.
The Debian repo must fail, since the repo key is missing, luckily, otherwise first run update would have possibly updated non-matching binaries...

@tim54000
Copy link
Author

tim54000 commented Feb 12, 2019

@MichaIng
Raspbian repositories are not directly in /etc/apt/sources.list (and certainly not at the first line) but in /etc/apt/sources.list.d/raspi.list.
So it is the Debian repository that is chosen during the connection test and is apparently down (Error 404).

@MichaIng
Copy link
Owner

MichaIng commented Feb 12, 2019

@tim54000
Check my comment update above. /etc/apt/sources.list.d/raspi.list does not contain the Raspbian repo, but the Raspberry Pi specific repo with kernel/firmware packages. This stays untouched during first run update.
Raspbian can theoretically as well be used on other SBCs, so those two are separated 😉.

@tim54000
Copy link
Author

tim54000 commented Feb 12, 2019

Right now, my sources.list contains this (without comments):

deb https://archive.raspberrypi.org/debian/ stretch main ui

# So I have to remove the following repos ?
deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free
deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free

And I deleted my raspi.list
What are the repos I need to add?

@MichaIng
Copy link
Owner

@tim54000
Ah do not delete raspi.list, this is required for firmware updates!

To fix everything at once please do the following:
/DietPi/dietpi/func/dietpi-set_software apt-mirror default

@tim54000
Copy link
Author

Okay, I did that and I was running apt-get update.
I hope that will be enough and I thank you for your precious help

@MichaIng
Copy link
Owner

MichaIng commented Feb 12, 2019

@tim54000
Jep that should be it. Just checked the other boot scripts for possibly wrong applied first run setup, but everything else is fine.

You could run G_AGUG to now update APT packages, but that should have been done already during prior update steps, so might just reply "everything up to date".

@tim54000 tim54000 changed the title [dupe] Impossible to exit the installation with a failed connection test [Resolved] Wrong APT repositories - Connection test failed Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants