Results 1 to 6 of 6

Thread: Can't bind to localhost after 10.04 upgrade (cherokee, php-cgi)

  1. #1
    Join Date
    Jan 2010
    Beans
    5

    Exclamation Can't bind to localhost after 10.04 upgrade (cherokee, php-cgi)

    Hello everyone,

    After upgrading Ubuntu, I'm having trouble with the cherokee (1.0.0) and php-cgi.

    Cherokee itself runs fine. When I run cherokee-admin, I get this error:
    (critical) bind.c:284 - Could not bind() port=9090 (UID=0, GID=0)

    According to netstat port 9090 is absolutely free (both IPv4 and IPv6). When I run cherokee-admin -b or cherokee-admin -b0.0.0.0 it will succesfully bind to :::9090 (IPv6) or 0.0.0.0:9090 (IPv4) respectively. I can then reach cherokee-admin via the public interface, but not via localhost (over an SSH tunnel). When I call cherokee-admin with -blocalhost or -b127.0.0.1 I get the same "Could not bind" error.

    The same seems to happen with php-cgi. When I run /usr/bin/php-cgi -b 127.0.0.1:47990, I get this error:
    Cannot bind/listen socket - [99] Cannot assign requested address.
    Couldn't create FastCGI listen socket on port 127.0.0.1:47990


    When I change 127.0.0.1 to localhost, I get this:
    Host 'localhost' has multiple addresses. You must choose one explicitly!

    I've tried disabling IPv6 and completely removing (with --purge) and reinstalling cherokee and all associated packages and libraries, but this didn't help either.

    The problem started when I upgraded from Ubuntu 8.10 (via 9.04 and 9.10) to 10.04. It's a VPS with kernel 2.6.32.9 (domU, modified kernel for virtualization). Before the upgrade everything worked like a charm. I tried a 'fresh' install in a virtual machine on my local machine and everything works perfectly.

    I'd rather not have to reinstall the complete server. Does anyone know what's going on?

  2. #2
    Join Date
    Jan 2010
    Beans
    5

    Re: Can't bind to localhost after 10.04 upgrade (cherokee, php-cgi)

    Anyone? Do I really have to completely reinstall the server for this tiny little problem?

  3. #3
    Join Date
    May 2006
    Location
    Iowa
    Beans
    Hidden!

    Re: Can't bind to localhost after 10.04 upgrade (cherokee, php-cgi)

    would you do a "ip addr show" and paste the output, thanks.
    Xipher

  4. #4
    Join Date
    Jan 2010
    Beans
    5

    Re: Can't bind to localhost after 10.04 upgrade (cherokee, php-cgi)

    Thank you for replying.

    ip addr show:
    Code:
    1: lo: <LOOPBACK> mtu 16436 qdisc noop state DOWN
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
        link/ether x:x:x:11:32:35 brd ff:ff:ff:ff:ff:ff
        inet x.x.97.103/24 brd x.x.97.255 scope global eth0
        inet6 x::x:x:fe11:3235/64 scope link
           valid_lft forever preferred_lft forever
    3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN
        link/ether x:x:x:16:69:70 brd ff:ff:ff:ff:ff:ff
    4: tunl0: <NOARP> mtu 1480 qdisc noop state DOWN
        link/ipip 0.0.0.0 brd 0.0.0.0
    5: gre0: <NOARP> mtu 1476 qdisc noop state DOWN
        link/gre 0.0.0.0 brd 0.0.0.0
    Last edited by PPvG; May 18th, 2010 at 09:30 AM. Reason: I censored the IP and MAC addresses, hope you don't mind.

  5. #5
    Join Date
    Jan 2010
    Beans
    5

    Lightbulb Re: Can't bind to localhost after 10.04 upgrade (cherokee, php-cgi)

    I finally found out what was wrong! In /etc/network/interfaces, I had this:
    Code:
    auto lo
    iface lo inet loopback
    pre-up iptables-restore < /etc/iptables.up.rules
            address 127.0.0.1
            netmask 255.0.0.0
    The iptables-restore script causes an error, preventing the interface from going up. Commenting out the third line and running sudo ifup lo fixed the problem!

  6. #6
    Join Date
    Aug 2010
    Beans
    8

    Re: Can't bind to localhost after 10.04 upgrade (cherokee, php-cgi)

    Use saved my from reinstalling my server! Thanks a TON!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •