[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
** Description changed: qemu will not start VMs using spice or vnc displays unless there is a routable IPv4 address on the machine, even though the error relates to 127.0.0.1 root@athens:~# ip addr - 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default - link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 - inet 127.0.0.1/8 scope host lo -valid_lft forever preferred_lft forever - inet6 ::1/128 scope host -valid_lft forever preferred_lft forever + 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 + inet 127.0.0.1/8 scope host lo + valid_lft forever preferred_lft forever + inet6 ::1/128 scope host + valid_lft forever preferred_lft forever 2: em1: mtu 1500 qdisc mq master ovs-system state UP group default qlen 1000 - link/ether a4:ba:db:32:4c:6b brd ff:ff:ff:ff:ff:ff - inet6 fe80::a6ba:dbff:fe32:4c6b/64 scope link -valid_lft forever preferred_lft forever + link/ether a4:ba:db:32:4c:6b brd ff:ff:ff:ff:ff:ff + inet6 fe80::a6ba:dbff:fe32:4c6b/64 scope link + valid_lft forever preferred_lft forever 3: em2: mtu 1500 qdisc mq master ovs-system state UP group default qlen 1000 - link/ether a4:ba:db:32:4c:6c brd ff:ff:ff:ff:ff:ff - inet6 fe80::a6ba:dbff:fe32:4c6c/64 scope link -valid_lft forever preferred_lft forever - 4: ovs-system: mtu 1500 qdisc noop state DOWN group default - link/ether a6:01:71:d4:b2:71 brd ff:ff:ff:ff:ff:ff - 5: br0: mtu 1500 qdisc noqueue state UNKNOWN group default - link/ether a4:ba:db:32:4c:6b brd ff:ff:ff:ff:ff:ff - inet6 2606:a000:a461:4500:a6ba:dbff:fe32:4c6b/64 scope global mngtmpaddr dynamic -valid_lft 86292sec preferred_lft 14292sec - inet6 fe80::c03d:22ff:fea5:3034/64 scope link -valid_lft forever preferred_lft forever + link/ether a4:ba:db:32:4c:6c brd ff:ff:ff:ff:ff:ff + inet6 fe80::a6ba:dbff:fe32:4c6c/64 scope link + valid_lft forever preferred_lft forever + 4: ovs-system: mtu 1500 qdisc noop state DOWN group default + link/ether a6:01:71:d4:b2:71 brd ff:ff:ff:ff:ff:ff + 5: br0: mtu 1500 qdisc noqueue state UNKNOWN group default + link/ether a4:ba:db:32:4c:6b brd ff:ff:ff:ff:ff:ff + inet6 2606:a000:a461:4500:a6ba:dbff:fe32:4c6b/64 scope global mngtmpaddr dynamic + valid_lft 86292sec preferred_lft 14292sec + inet6 fe80::c03d:22ff:fea5:3034/64 scope link + valid_lft forever preferred_lft forever root@athens:~# virsh start icarus error: Failed to start domain icarus error: internal error: process exited while connecting to monitor: ((null):4086): Spice-Warning **: reds.c:2330:reds_init_socket: getaddrinfo(127.0.0.1,5900): Address family for hostname not supported 2015-09-05T17:43:39.911871Z qemu-system-x86_64: failed to initialize spice server root@athens:~# dhclient br0 root@athens:~# ip addr - 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default - link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 - inet 127.0.0.1/8 scope host lo -valid_lft forever preferred_lft forever - inet6 ::1/128 scope host -valid_lft forever preferred_lft forever + 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 + inet 127.0.0.1/8 scope host lo + valid_lft forever preferred_lft forever + inet6 ::1/128 scope host + valid_lft forever preferred_lft forever 2: em1: mtu 1500 qdisc mq master ovs-system state UP group default qlen 1000 - link/ether a4:ba:db:32:4c:6b brd ff:ff:ff:ff:ff:ff - inet6 fe80::a6ba:dbff:fe32:4c6b/64 scope link -valid_lft forever preferred_lft forever + link/ether a4:ba:db:32:4c:6b brd ff:ff:ff:ff:ff:ff + inet6 fe80::a6ba:dbff:fe32:4c6b/64 scope link + valid_lft forever preferred_lft forever 3: em2: mtu 1500 qdisc mq master ovs-system state UP group default qlen 1000 - link/ether a4:ba:db:32:4c:6c brd ff:ff:ff:ff:ff:ff - inet6 fe80::a6ba:dbff:fe32:4c6c/64 scope link -valid_lft forever preferred_lft forever - 4: ovs-system: mtu 1500 qdisc noop state DOWN group default - link/ether a6:01:71:d4:b2:71 brd ff:ff:ff:ff:ff:ff - 5: br0: mtu 1500 qdisc noqueue state UNKNOWN group default - link/ether a4:ba:db:32:4c:6b brd ff:ff:ff:ff:ff:ff - inet 172.31.3.106/24 brd 172.31.3.255 scope global br0 -valid_lft forever preferred_lft forever - inet6 2606:a000:a461:4500:a6ba:dbff:fe32:4c6b/64 scope global mngtmpaddr dynamic -valid_lft 86335sec preferred_lft 14335sec - inet6 fe80::a6ba:dbff:fe32:4c6b/64 scope link -valid_lft forever preferred_lft forever + link/ether a4:ba:db:32:4c:6c brd ff:ff:ff:ff:ff:ff + inet6 fe80::a6ba:dbff:fe32:4c6c/64 scope link + valid_lft forever preferred_lft forever + 4: ovs-system: mtu 1500 qdisc noop state DOWN grou
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
** Tags removed: server-todo -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/glibc/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: glibc (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/glibc/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
** Changed in: qemu (Ubuntu) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/glibc/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
** Tags removed: qemu-21.10 ** Tags added: qemu-22.04 server-todo -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/glibc/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
Launchpad has imported 17 comments from the remote bug at https://sourceware.org/bugzilla/show_bug.cgi?id=12398. If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. On 2011-01-13T20:03:04+00:00 Tore Anderson wrote: getaddrinfo() will disregard the loopback addresses ::1 and 127.0.0.1 when attempting to figure out which address families are present on the host, when being called with the AI_ADDRCONFIG flag. This makes a lot of sense when looking up an external hostname. However, it makes very little sense when connecting to the hostname "localhost". I've learned that the browser vendors will avoid using AI_ADDRCONFIG or do it while using workarounds for the localhost case, see for instance: https://bugzilla.mozilla.org/show_bug.cgi?id=614526 Without such a workaround, connecting to a IPv4-only service listening on 127.0.0.1 using the hostname "localhost" will fail unless the machine also has external IPv4 connectivity. Which is not what a user would expect, since the (lack of) external connectivity is irrelevant to the accessibility to the loopback interface. Therefore, when looking up "localhost", the loopback addresses ::1 and 127.0.0.1 should not be ignored by getaddrinfo() when using AI_ADDRCONFIG Tore Reply at: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/comments/0 On 2012-07-27T14:11:30+00:00 Psimerda wrote: The same applies to *all* link-local IPv6 addresses as well as link- local IPv4 addresses. The same applies for all alternative names for localhost: For example on Fedora: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 People even use FQDNs for their localhost address to test their stuff without network connection. See also comments in bug 12377. Reply at: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/comments/1 On 2012-07-28T10:12:58+00:00 Psimerda wrote: Currently with glibc-2.15-51.fc17.x86_64 I can reproduce it with: hints.ai_family = AF_INET6; hints.ai_flags = AI_ADDRCONFIG; // and optional AI_V4MAPPED I can no longer reproduce with SSH (possibly because of some updates that affect SSH's networking, i don't know). My feeling is that we should *never* discard literal IP adresses based on AI_ADDRCONFIG. At least not unless we check against *family* together with *scope* but even then it's very doubtful to go directly against user's input. As for names like 'localhost', 'localhost4' and various names you can use for node-local and link-local addresses, I'm strictly against trying to enumerate them as you cannot guess all possible names. Would you for example check the suffix ".local" and treat the result as a link-local FQDN? But it may be a global address also. I actually don't believe in any checks that work with the name and not the address. When you have the address, you can check it against several rules to guess (and usually know) the scope. Reply at: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/comments/2 On 2012-09-22T15:42:40+00:00 Psimerda wrote: Created attachment 6647 a temporary fix to ignore the whole AI_ADDRCONFIG thing Until this issue is resolved, I'm building GLIBC with this patch to avoid problems with node-local and link-local networking. Reply at: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/comments/3 On 2012-11-20T23:13:20+00:00 Psimerda wrote: By the way, I just learned that the current behavior is not mandated by POSIX. Thanks to Jeff Law for valuable information he provided: http://pubs.opengroup.org/onlinepubs/9699919799/ If the AI_ADDRCONFIG flag is specified, IPv4 addresses shall be returned only if an IPv4 address is configured on the local system, [IP6] [Option Start] and IPv6 addresses shall be returned only if an IPv6 address is configured on the local system. [Option End] Jeff: It may also be the case that we need to involve the "Austin Group" if we need further clarification of the standard (link-local handling comes to mind). My summary is: Filtering of non-DNS addresses in getaddrinfo() has no real use and it only causes problems. There's no reason to filter over the mere existence of addresses. Filtering over global address existence may only be desirable for global address resolution, which is DNS. But that should be done by the DNS resolver that only asks for addresses that make sense and only accepts addresses that it as
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
** Also affects: glibc (Ubuntu) Importance: Undecided Status: New ** Bug watch added: Sourceware.org Bugzilla #12398 https://sourceware.org/bugzilla/show_bug.cgi?id=12398 ** Also affects: glibc via https://sourceware.org/bugzilla/show_bug.cgi?id=12398 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/glibc/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
It is a pain to see how often other things beat the priority of this ... But having a config-based (no rebuilds, no custom patches) workaround just always de-prioritizes it :-/ One day I'll get to it ... (he said and looked at his retirement in 30 years) ** Tags removed: qemu-20.10 ** Tags added: qemu-21.04 qemu-21.10 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
** Tags added: qemu-20.10 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
Wow a bug from the stone age, so old that I never saw it before :-/ I have to thank you for the bump to it, due to the current freeze for the coming 20.04 release I'm busy and also unlikely to b able to change it soon. But I have taken a todo to revisit this in depth for 20.10 I mean https://bugzilla.redhat.com/show_bug.cgi?id=721350 sounded pretty final (and since then gets bumped and closed), but still I want to revisit it. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
I agree with @addyp95 - this is a bug in how libvirt works in IPv6-only environments, and it is still present on focal. For posterity, the exact details of the workaround are to add the following line to /etc/libvirt/qemu.conf: spice_listen = "::1" ** Changed in: qemu (Ubuntu) Status: Invalid => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
This is still a present bug. In its current defaults, the lack of a routable ipv4 address will still cause libvirt to fail starting any guests. While setting ::1 worked for Kevin, this doesn't fix the bug, just works around it. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
Thanks, Kevin! ** Changed in: qemu (Ubuntu) Status: Incomplete => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
Given that VNC does this as well, I traced the problem all the way back to getaddrinfo() behavior in libc. I believe this describes it: https://bugzilla.redhat.com/show_bug.cgi?id=721350 tl;dr: It ignores loopback when enumerating addresses per family. Workaround is to define the display as ::1, which works fine since there's a global v6 address on the box. Close: notabug ** Bug watch added: Red Hat Bugzilla #721350 https://bugzilla.redhat.com/show_bug.cgi?id=721350 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
Attaching typescript output of requested diagnostic commands. As OVS rather than Linux bridge is in use, I have included potentially relevant ovs-* command output. ** Attachment added: "1492621-diag.txt" https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/+attachment/4459432/+files/1492621-diag.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1492621] Re: Cannot start VMs without routable IPv4 address
Can you show the output of 'sudo ifconfig -a; sudo brctl show; sudo netstat -nr' ? Does nc -l -4 127.0.0.1 & echo ab | nc -4 127.0.0.1 work? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
I don't have the 'kvm' command on this machine, but it definitely appears to be qemu related: kjotte@athens:~$ qemu-system-x86_64 -spice addr=127.0.0.1,port=5900 (/usr/bin/qemu-system-x86_64:1785): Spice-Warning **: reds.c:2330:reds_init_socket: getaddrinfo(127.0.0.1,5900): Address family for hostname not supported qemu-system-x86_64: failed to initialize spice server -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1492621] Re: Cannot start VMs without routable IPv4 address
Thanks for reporting this bug. I suspect this is actually a libvirt bug. To make sure, could you check whether kvm -spice addr=127.0.0.1,port=5900 works for you? At least in an empty network namespace on my host this seemed to work fine. ** Changed in: qemu (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1492621 Title: Cannot start VMs without routable IPv4 address To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs