The officially official Devuan Forum!

You are not logged in.

#1 2018-07-18 11:01:25

goo
Member
Registered: 2018-07-18
Posts: 5  

apt stuck at 0% [Waiting for headers]

Hello, I'm having an issue with apt (or apt-get or aptitude, doesn't matter) currently which gets stuck at 0% [Waiting for headers] whenever I'm trying to install a package (or multiple packages). apt-update works fine. I'll start off by describing my installation as I didn't install devuan using the normal procedure of downloading a live image from the website.

So, I have a NAS which has two partitions. On one partition there's a debian wheezy system, installed by the manufacturer. The other partition was in a RAID setup with the first one, and was originally a mirror of it, but eventually I split the RAID and tried using this partition to install a newer system, Devuan ASCII. I couldn't install Debian because I can't upgrade the kernel on this system as the manufacturer only provided the patches needed to make the kernel work for Linux 3.2.26. Also, I dislike systemd, so Devuan seemed like a great choice.

In order to install it, I first tried to debootstrap a minimal (--variant=minbase) rootfs using Debian's debootstrap with the official Devuan's debootstrap script.
The debootstrap went okay, so I rebooted into the new Devuan rootfs, replaced udev with mdev since the old kernel and udev didn't get along and setted up the network. Now, it looks like everything is working, I can ssh into it, ping the router, ping google.com, wget web pages and stuff, but I can't install packages, apt remains stuck at 0% [Waiting for headers]. Without really investigating into it, I thought it was probably fault of Debian's debootstrap, so back to the wheezy system I debootstrapped Devuan ASCII on a usb stick, chrooted into it and debootstrapped Devuan ASCII onto the second partition, this time using the official debootstrap version.

I then repeated the same steps (replacing udev and setting up the network). The problem persists. It's now important to mention that, if I chroot into Devuan from Debian, it works.

Of course, the first thing I've checked was the network configuration, but everything worked, and I could even wget packages directly from the mirrors by downloading them using the URLs returned by `apt install --print-uris`. I also ran `ip addr` on both systems and the network config is identical. Another thing I've tried was changing the DNS and it didn't help. One note about the network config, on the Devuan system I'm setting it up by manually running `ip` commands in an init script while that's taken care of by ifupdown in the Debian system. The end result looks identical though.
People on IRC also told me to make sure I wasn't using ipv6 so I disabled it `sysctl -w net.ipv6.conf.all.disable_ipv6=1` but it didn't make a difference. Also, my ISP doesn't support IPV6 so I don't think that's a problem. They also asked me whether I was using a local DNS but no, I'm using Google's.

Next things I tried were more closely related to apt. First I tried using apt-get with no results. Same with aptitude. I then tried changing mirrors in /etc/apt/sources.list as it was using pkgmaster.devuan.org but on the website it says to use deb.devuan.org, but still with no results. I also tried using the local mirrors by prefixing deb.devuan.org with my country code but it's the same. I tried running `apt update` multiple times and that doesn't fix it. However I noticed that with pkgmaster.devuan.org, which is a redirect to deb.devuan.org `apt udpate` fails. Next thing I did was enable HTTP debugging by adding a config file with `Debug::Acquire::http "true";` and this is the output. So, because of both these tests I'd say the issue is that `apt` doesn't follow redirects, so I tried reinstalling apt with `apt-get install --reinstall apt` but it didn't fix it.

At this point, if it isn't an `apt` issue, I can't really make much sense of it, though it's very weird that it works in the chroot which makes me think it isn't an apt issue. Granted, it might be something with the way I'm setting up the network or with mdev, but it's still weird that apt is the only thing that doesn't work.

I really hope someone can help, as I'd be very happy to revive this box with Devuan, but I can't really do so if I can't fix this. You can find the backlog of the IRC channel where people tried helping here.

Thank you,
have a nice day.

Offline

#2 2018-07-18 12:08:29

Panopticon
Member
Registered: 2018-01-27
Posts: 124  

Re: apt stuck at 0% [Waiting for headers]

I experienced this last night trying to install a package, i did a sudo apt-get update and that seemed to fix the lag i was exeperiencing.

Offline

#3 2018-07-18 13:41:42

goo
Member
Registered: 2018-07-18
Posts: 5  

Re: apt stuck at 0% [Waiting for headers]

Unfortunately, I already tried that multiple times and it doesn't seem to fix it. Also if it were a fault on the mirror's side it shouldn't work from the chroot, nor should I able to download them without an issue with wget.
Thanks for suggesting that, though.

Offline

#4 2018-07-18 14:00:58

Ottavio
Member
Registered: 2018-06-28
Posts: 24  

Re: apt stuck at 0% [Waiting for headers]

Have you tried using ftp in stead of http in your sources list?

Offline

#5 2018-07-18 14:39:01

KatolaZ
Member
Registered: 2017-03-11
Posts: 38  

Re: apt stuck at 0% [Waiting for headers]

Devuan repos are not available through ftp. And goo has already said that the problem is not in the repos, since he/she can reach the repos from the chroot. Regarding the HTTP redirect: it's perfectly fine, since this is how Devuan repos work (serving packages forked by Devuan directly and redirecting to the Debian repos otherwise). Why don't you try to use one of the Devuan arm images available, if any of them would fit your arch?

Offline

#6 2018-07-18 15:12:51

goo
Member
Registered: 2018-07-18
Posts: 5  

Re: apt stuck at 0% [Waiting for headers]

I don't know, the architecture itself is armhf, but I think the images also include a kernel which I can't flash... A rootfs would be perfect, I guess I can maybe extract it from the images?

Last edited by goo (2018-07-18 15:13:09)

Offline

#7 2018-07-18 15:21:43

KatolaZ
Member
Registered: 2017-03-11
Posts: 38  

Re: apt stuck at 0% [Waiting for headers]

Each ARM image under:

  https://files.devuan.org/devuan_ascii/embedded/

comes with a corresponding tar.gz containing the rootfs. For any problem, you could also join #devuan-arm on freenode.

HTH

Offline

#8 2018-07-18 15:26:39

goo
Member
Registered: 2018-07-18
Posts: 5  

Re: apt stuck at 0% [Waiting for headers]

Yeah, I'm downloading a rpi2 rootfs, I think that might do. I'll let you know, thanks.

Offline

#9 2018-07-18 17:11:21

goo
Member
Registered: 2018-07-18
Posts: 5  

Re: apt stuck at 0% [Waiting for headers]

Okay, it didn't fix it, but I figured it out. Since it was still happening, I figured the issue was with mdev, as that was the only thing that in the chroot would've worked. Turns out mdev's default /dev/null permissions are 660, while they should be 666. Fixed that and it works like a charm now. Thanks everybody.

Offline

Board footer