Public bug reported:

It seems that a daemon restart can cause an issue in the vnc port
allocation.

Steps to reproduce:
1. start three guests with a vnc console like
   <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
2. check they should have ports like this:
   $ netstat -eeapn  | grep ':59'
    127.0.0.1:5900, 127.0.0.1:5901, 127.0.0.1:5902
3. now remove the "middle" one which usually is the second guest you started.
   You should now no mire have 127.0.0.1:5901 bound
[4.] If you'd restart the middle guest now it would get 5901 again and all 
would be fine, just remember to stop it to leae the gap for the next step
5. Restart libvirt daemon to let it "forget" any state
   $ systemctl restart libvirtd
6. Start the "middle" guest now, it fails:
   error: internal error: process exited while connecting to monitor: 
2017-09-15T06:24:12.174629Z qemu-system-x86_64: -vnc 127.0.0.1:0: Failed to 
start VNC server: Failed to listen on socket: Address already in use

It is passing arg "-vnc 127.0.0.1:0" which is  already used.

To make it more confusing even if I set an explicit port like:
<graphics type='vnc' port='5901' autoport='no' listen='127.0.0.1'>
Thet is still passes "-vnc 127.0.0.1:0" and fails.

** Affects: libvirt (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1717442

Title:
  VNC auto port allocation affected by daemon state

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1717442/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to