[Spice-devel] Gnome vino-server not listening to IPv4
Christophe de Dinechin
dinechin at redhat.com
Fri Mar 31 09:45:02 UTC 2017
Hello,
[If you don’t use VNC to access a Linux host, you can safely skip this e-mail]
I recently lost access to three Linux hosts over VNC, and it took me long enough to figure out what was going on that I thought I’d share and ask for advice. This is recorded as https://bugzilla.redhat.com/show_bug.cgi?id=1437619 <https://bugzilla.redhat.com/show_bug.cgi?id=1437619>, seems to be related to others, e.g. https://bugzilla.redhat.com/show_bug.cgi?id=703009 <https://bugzilla.redhat.com/show_bug.cgi?id=703009>.
Symptoms: VNC access to a Linux host does not work. Local access with remote-viewer vnc://localhost:5900 <vnc://localhost:5900> works. Remote access with remote-viewer vnc://myhost:5900 <vnc://myhost:5900> does not. Doing lsof -i -P | grep vino shows that the vino-server is only listening to IPv6.
Apparent cause: In some conditions, which apparently involve localhost resolving as ::1, vino-server only listens to IPv6. When this is the case, you get:
ddd at muse ~> lsof -i -R | grep vino
vino-serv 3326 1309 ddd 12u IPv6 75662 0t0 TCP *:rfb (LISTEN)
When it’s working “normally”, you get:
ddd at muse ~> lsof -i -R | grep vino
vino-serv 3326 1309 ddd 12u IPv4 86485 0t0 TCP muse.dinechin.org:rfb (LISTEN)
vino-serv 3326 1309 ddd 14u IPv6 86486 0t0 TCP muse.dinechin.org:rfb (LISTEN)
vino-serv 3326 1309 ddd 15u IPv6 86487 0t0 TCP muse.dinechin.org:rfb (LISTEN)
vino-serv 3326 1309 ddd 16u IPv4 86488 0t0 TCP muse.dinechin.org:rfb->192.168.77.22:54781 (ESTABLISHED)
Workaround: I found two workarounds. You may need one or both, I’ve not seen consistent results between my hosts.
#1: Disable localhost resolution to ::1. In my case, this means:
a) Removing the resolution in my local DNS, in my case it was in /etc/bind/db.local
b) Commenting out the ::1 entry in /etc/hosts.
#2: Force the server to listen on a specific interface (only had to do it on one of my hosts)
a) Run dconf-editor
b) Go to /org/gnome/desktop/remote-access/network-interface
c) Set “Use default value” to off
d) Enter the name of your network card, e.g. enp4s0 for my machine, in the “Custom value” field.
Cause of change: I am not sure, because I changed both my DNS (now bind9 on a local machine) and did a dnf update. I saw the problem after the update, but it may just be because the network restarted, since in at least one case, vino-server had not actually been updated.
Hope this helps someone ;-)
Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170331/d5f9b97b/attachment.html>
More information about the Spice-devel
mailing list