5

I have a server running on Debian Wheezy.

It's apt source file has following configuration:

deb http://ftp.uk.debian.org/debian/ wheezy main non-free contrib
deb-src http://ftp.uk.debian.org/debian/ wheezy main non-free contrib

deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

# wheezy-updates, previously known as 'volatile'
deb http://ftp.uk.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ wheezy-updates main contrib non-free

When I try to update I get GPG errors for official Debian repositories:

root@osgb:~# apt-get clean
root@osgb:~# apt-get update
Get:1 http://security.debian.org wheezy/updates Release.gpg                
Get:2 http://ftp.uk.debian.org wheezy Release.gpg
Get:3 http://ftp.uk.debian.org wheezy-updates Release.gpg                       
Get:4 http://security.debian.org wheezy/updates Release                                                                            
Ign http://security.debian.org wheezy/updates Release
E: GPG error: http://security.debian.org wheezy/updates Release: The following signatures were invalid: NODATA 1 NODATA 2

If I remove security repository from sources.listfile and try to apt-get update again, then same error this time pops for ftp.uk.debian.org

root@osgb:~# apt-get clean
root@osgb:~# apt-get update
Get:1 http://ftp.uk.debian.org wheezy Release.gpg
Get:2 http://ftp.uk.debian.org wheezy-updates Release.gpg                    
Get:3 http://ftp.uk.debian.org wheezy Release                                
Ign http://ftp.uk.debian.org wheezy Release                                     
E: GPG error: http://ftp.uk.debian.org wheezy Release: The following signatures were invalid: NODATA 1 NODATA 2

What I tried so far, is;

  • Tried a number of other mirrors,
  • Tried to install debian-keyring and debian-archive-keyring deb files manually,
  • Removed /var/lib/apt/lists and forced regeneration by creating the partial folder, apt-get cleaning etc. (As offered in a number of posts)

None of them helped.

So, what is this error about, ie what does it mean? And do you have any idea to solve it?

UPDATE (18/08/2015):

Server doesnt have any disk space problem. It has a single partition setup which has plenty of empty space:

root@osgb:~# df -h
Filesystem                                              Size  Used Avail Use% Mounted on
rootfs                                                  259G   22G  224G   9% /
udev                                                     10M     0   10M   0% /dev
tmpfs                                                   1.2G  240K  1.2G   1% /run
/dev/disk/by-uuid/b76a2c04-44b6-4a9e-bace-7286a67a0f8d  259G   22G  224G   9% /
tmpfs                                                   5.0M     0  5.0M   0% /run/lock
tmpfs                                                   4.6G     0  4.6G   0% /run/shm

UPDATE (20/08/2015)

As suggested, I tried updating the keys however it seems that my server already has the latest keys. And unfortunately mighty NODATA error persists.

root@osgb:~# apt-key update
gpg: key B98321F9: "Squeeze Stable Release Key <debian-release@lists.debian.org>" not changed
gpg: key 473041FA: "Debian Archive Automatic Signing Key (6.0/squeeze) <ftpmaster@debian.org>" not changed
gpg: key 65FFB764: "Wheezy Stable Release Key <debian-release@lists.debian.org>" not changed
gpg: key 46925553: "Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>" not changed
gpg: key 518E17E1: "Jessie Stable Release Key <debian-release@lists.debian.org>" not changed
gpg: key 2B90D010: "Debian Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>" not changed
gpg: key C857C906: "Debian Security Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>" not changed
gpg: Total number processed: 7
gpg:              unchanged: 7
root@osgb:~# apt-get update
Get:1 http://ftp.uk.debian.org wheezy Release.gpg
Get:2 http://ftp.uk.debian.org wheezy-updates Release.gpg
Get:3 http://ftp.uk.debian.org wheezy Release                                
Ign http://ftp.uk.debian.org wheezy Release                                     
E: GPG error: http://ftp.uk.debian.org wheezy Release: The following signatures were invalid: NODATA 1 NODATA 2

=========================================================================

Resolution and final words:

I thought it cannot be a firewall issue since the port used is 80 and I can connect manually. However, the firewall was detected to be blocking server's request in the application level. Firewall thought apt-get is a suspicious application to be blocked unless allowed explicitly. We added it to the whitelist and it is up and ok now!

Lashae
  • 183
  • 1
  • 12
  • Possible duplicate of http://stackoverflow.com/q/25388620/1075993. Have you tried suggestions from there? – Andrey Sapegin Aug 18 '15 at 09:28
  • Yes I did the first one (about recreating apt folders) however didn't try the last/long one because it doesn't have any description about what it is doing. – Lashae Aug 18 '15 at 12:35
  • So do you have free space on your /tmp (check it with 'df -h') and other filesystems? – Andrey Sapegin Aug 18 '15 at 13:37
  • @AndreySapegin I updated the original question, server has a single partition and does have plenty of free space. – Lashae Aug 18 '15 at 18:41
  • Have you tried to strace process? To check place where you've got error? – Navern Aug 18 '15 at 19:35
  • @Navern, what do you mean? I couldnt understand your suggestion, could you please elaborate? – Lashae Aug 19 '15 at 06:16
  • The error seems to indicate that it couldn't find any signatures on the downloaded Release.gpg files. That's a bit weird, are you behind a proxy or something? Can you try downloading http://ftp.uk.debian.org/debian/dists/wheezy/Release and Release.gpg and running "apt-key adv --verify Release.gpg Release". The output might give you a better clue. – Tim Stoop Aug 19 '15 at 21:33
  • Did you try to run apt-key update It may be that your keys are outdated or otherwise invalid – Albritter Aug 20 '15 at 08:28
  • I tried your suggestion and error persists. Please see "UPDATE (20/08/2015)" on my original post. – Lashae Aug 20 '15 at 08:45
  • you my want look at this [link](http://unix.stackexchange.com/questions/101310/cant-install-any-packages) – Albritter Aug 20 '15 at 08:50

1 Answers1

5

I ran into this issue when I was being blocked by a local firewall. You may want to change your repository lines to not use the ftp mirrors.

Try http://free.hands.com/debian/. The rest of the line is fine; you're replacing just http://ftp.uk.debian.org.

hlmtre
  • 146
  • 6
  • I use `http` repositories of debian uk mirror, not the ftp ones. However, I gave it a try to your suggestion but unfortunately result is same. `E: GPG error: http://free.hands.com wheezy Release: The following signatures were invalid: NODATA 1 NODATA 2` – Lashae Aug 16 '15 at 16:37
  • Can you `curl` those addresses from the machine in question? – hlmtre Aug 17 '15 at 05:25
  • Unfortunately, curl is not setup on the machine and due to this "no data" error I cannot install. However, I ran `wget http://free.hands.com/debian/` and got the index.html, is this the same thing? – Lashae Aug 17 '15 at 10:59
  • 1
    You were right @hlmtre! What interesting is, it is not the port but the application what is blocked by the firewall! – Lashae Aug 20 '15 at 11:25
  • 1
    Hooray! What did you do to get around that? – hlmtre Aug 21 '15 at 08:48
  • 1
    I made a phone call with the Network administrator of data center :-) – Lashae Aug 21 '15 at 11:31