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 <[email protected]>" not changed
gpg: key 473041FA: "Debian Archive Automatic Signing Key (6.0/squeeze) <[email protected]>" not changed
gpg: key 65FFB764: "Wheezy Stable Release Key <[email protected]>" not changed
gpg: key 46925553: "Debian Archive Automatic Signing Key (7.0/wheezy) <[email protected]>" not changed
gpg: key 518E17E1: "Jessie Stable Release Key <[email protected]>" not changed
gpg: key 2B90D010: "Debian Archive Automatic Signing Key (8/jessie) <[email protected]>" not changed
gpg: key C857C906: "Debian Security Archive Automatic Signing Key (8/jessie) <[email protected]>" 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!

10
  • Possible duplicate of stackoverflow.com/q/25388620/1075993. Have you tried suggestions from there? Aug 18, 2015 at 9: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, 2015 at 12:35
  • So do you have free space on your /tmp (check it with 'df -h') and other filesystems? Aug 18, 2015 at 13:37
  • @AndreySapegin I updated the original question, server has a single partition and does have plenty of free space.
    – Lashae
    Aug 18, 2015 at 18:41
  • Have you tried to strace process? To check place where you've got error?
    – Navern
    Aug 18, 2015 at 19:35

1 Answer 1

5
+50

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.

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, 2015 at 16:37
  • Can you curl those addresses from the machine in question?
    – hlmtre
    Aug 17, 2015 at 5:25
  • 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, 2015 at 11:25
  • 1
    Hooray! What did you do to get around that?
    – hlmtre
    Aug 21, 2015 at 8:48
  • 1
    I made a phone call with the Network administrator of data center :-)
    – Lashae
    Aug 21, 2015 at 11:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .