apt-cacher-ng start displays an invalid error message

Bug #343927 reported by João Pinto
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-cacher-ng (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: apt-cacher-ng

Description: Ubuntu jaunty (development branch)
Release: 9.04

Starting apt-cacher-ng services produces an incorrect error message:
Couldn't bind socket: Address already in use

root@janito-desktop:~# netstat -nap | more | grep "3142"
root@janito-desktop:~# /etc/init.d/apt-cacher-ng start
 * Starting apt-cacher-ng apt-cacher-ng Couldn't bind socket: Address already in use
                                                                                                                                                                             [ OK ]
root@janito-desktop:~# netstat -nap | more | grep "3142"
tcp 0 0 0.0.0.0:3142 0.0.0.0:* LISTEN 3591/apt-cacher-ng
root@janito-desktop:~#

Revision history for this message
Christoph Korn (c-korn) wrote :

I can confirm the issue:
korn@ubuntu:~/Desktop/apt-cacher-ng$ sudo /etc/init.d/apt-cacher-ng start
 * Starting apt-cacher-ng apt-cacher-ng Couldn't bind socket: Address already in use
Couldn't bind socket: Address already in use
No socket(s) could be create/prepared. Check the network, check or unset the BindAddress directive.
                                                                                          [fail]
korn@ubuntu:~/Desktop/apt-cacher-ng$ sudo netstat -nap | more | grep "3142"
tcp 0 0 0.0.0.0:3142 0.0.0.0:* LISTEN 4087/apt-cacher-ng

apt-cacher-ng:
  Installed: 0.3.3-1
  Candidate: 0.3.3-1
  Version table:
 *** 0.3.3-1 0
        500 http://de.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status

Distributor ID: Ubuntu
Description: Ubuntu jaunty (development branch)
Release: 9.04
Codename: jaunty

Revision history for this message
Eduard Bloch (edi-gmx) wrote :

That's correct. The error message is about the IPv6 socket not being created. Unfortunately the order of libc (getaddrinfo result) seems to have been changed and that causes the problem now.

If you need IPv6, there is a quick workaround: put all your interface IPs (in v4 and v6 versions) into the BindAddress list in the config.

Better workaround: integrate the current Debian Unstable 0.3.4 version into Ubuntu.

Revision history for this message
Christoph Korn (c-korn) wrote :

The 0.3.4 version fixes the bug.
I have built the package in my PPA and requested a FFe: LP: #344168

Revision history for this message
Christoph Korn (c-korn) wrote :

Already got one ACK in bug 344168.

Revision history for this message
Christoph Korn (c-korn) wrote :

Second ACK.
FFe granted.

Revision history for this message
Christoph Korn (c-korn) wrote :

bug 344168

The new version fixes the bug.

Changed in apt-cacher-ng:
status: New → Fix Released
Revision history for this message
marcobra (Marco Braida) (marcobra) wrote :

With Package: apt-cacher-ng Version: 0.3.4-1 on Jaunty i still get this issue at acng startup by the way apt-cacher-ng is working.
I cannot get access via web to manage the cache.

Thanks

Rolf Leggewie (r0lf)
Changed in apt-cacher-ng (Ubuntu):
status: Fix Released → New
Revision history for this message
Pietro Battiston (toobaz) wrote :

I also confirm the bug is reproduced under jaunty with version 0.3.4-1.

sudo /etc/init.d/apt-cacher-ng start
 * Starting apt-cacher-ng apt-cacher-ng
Couldn't bind socket: Address already in use
Couldn't bind socket: Address already in use
No socket(s) could be create/prepared. Check the network, check or unset the BindAddress directive.
                                                                         [fail]

Changed in apt-cacher-ng (Ubuntu):
status: New → Confirmed
Revision history for this message
Pietro Battiston (toobaz) wrote :

(to use apt-cacher-ng, I have to manually identify and kill the apt-cacher-ng process, then "/etc/init.d/apt-cacher-ng start" works)

Revision history for this message
Fabián Rodríguez (magicfab) wrote :

Workaround:

1) Find the apt-cacher-ng process:
ps aux | grep apt

Example output:
124 3035 0.0 0.1 175928 3616 ? Ssl 18:02 0:01 /usr/sbin/apt-cacher-ng -c /etc/apt-cacher-ng pidfile=/var/run/apt-cacher-ng/pid SocketPath=/var/run/apt-cacher-ng/socket foreground=0
magicfab 12958 0.0 0.0 7528 916 pts/2 S+ 19:09 0:00 grep apt

2) Kill it:
magicfab@tiara:~$ sudo kill -9 3035
[sudo] password for magicfab:

3) Restart it:
magicfab@tiara:~$ sudo service apt-cacher-ng start
 * Starting apt-cacher-ng apt-cacher-ng [ OK ]

Revision history for this message
João Pinto (joaopinto) wrote :

Closing the bug because it was fixed in Karmic.

Changed in apt-cacher-ng (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.