[Spice-devel] spice does not want to connect to the server when using the external ip address

Attila Sukosd attila.sukosd at gmail.com
Tue Jun 21 23:45:27 PDT 2011


Hi Stephen,

Based on your ifconfig it seems like your trying to access the
physical host behind a NAT?

Did you by any chance forgot to you forward port 5900 to the machine?


Best Regards,
Attila Sukosd

-----------------------------------------
DTU Computing Center - www.cc.dtu.dk
attila at cc.dtu.dk, gbaras at student.dtu.dk, s070600 at student.dtu.dk




On Wed, Jun 22, 2011 at 8:34 AM, Stephen Duse-Anthony
<mokosso2001 at yahoo.com> wrote:
> Hi,
> I'm new at using qemu and spicec.
> I was able to generate two virtual  machine. When I'm inside my network I
> can view the virtual machine with spicec using the internal IP address.
> When I try to  use the external IP address I have connection actively
> refused.
> I'm sure I'm missing something when I run qemu or in the configuration file.
> Can anybody help?
> Below some details of what I have:
>
> 1/ [root at fedora15 .spicec]# ifconfig
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:381 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:381 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:28226 (27.5 KiB)  TX bytes:28226 (27.5 KiB)
>                                                                                                                                                                &nbs
> p;
> p3p1      Link encap:Ethernet  HWaddr BC:AE:C5:EA:AB:84
>           inet addr:192.168.1.100  Bcast:192.168.1.255
> Mask:255.255.255.0
>           inet6 addr: fe80::beae:c5ff:feea:ab84/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:24037 errors:0 dropped:0 overruns:0
> frame:0
>           TX packets:19904 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0
> txqueuelen:1000
>           RX bytes:11861145 (11.3 MiB)  TX bytes:5163210 (4.9 MiB)
>           Interrupt:46 Base address:0x6000
>
> virbr0    Link encap:Ethernet  HWaddr
> FE:54:00:42:9A:13
>           inet addr:192.168.122.1  Bcast:192.168.122.255
> Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:57 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:909 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:10492 (10.2 KiB)  TX bytes:48313 (47.1 KiB)
>
> vnet0     Link encap:Ethernet  HWaddr FE:54:00:42:9A:13
>           inet6 addr: fe80::fc54:ff:fe42:9a13/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:30 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:239 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:500
>           RX bytes:5654 (5.5 KiB)  TX bytes:17686 (17.2 KiB)
>
> vnet1     Link encap:Ethernet  HWaddr FE:54:00:EB:40:73
>           inet6 addr: fe80::fc54:ff:feeb:4073/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:31 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:236 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:500
>           RX bytes:5996 (5.8 KiB)  TX bytes:17526 (17.1 KiB)
>
>
> 2/ ps -elf | grep qemu
> 6 S qemu     15226     1  6  80   0 - 619025 poll_s 23:00 ?       00:00:27
> /usr/bin/qemu-kvm -S -M pc-0.14 -enable-kvm -m 2000 -smp
> 2,sockets=2,cores=1,threads=1 -name vm0_fed15 -uuid
> b3cf1b4b-f9ed-f7bd-2bcf-6f59aee90f09 -nodefconfig -nodefaults -chardev
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm0_fed15.monitor,server,nowait
> -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -boot c
> -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive
> file=/var/lib/libvirt/images/vm0_fed15.img,if=none,id=drive-ide0-0-0,format=raw
> -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive
> if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device
> ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev
> tap,fd=21,id=hostnet0 -device
> rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:42:9a:13,bus=pci.0,addr=0x3
> -chardev pty,id=charserial0 -device
> isa-serial,chardev=charserial0,id=serial0 -chardev
> spicevmc,id=charchannel0,name=vdagent -device
> virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0
> -usb -spice port=5900,addr=0.0.0.0,disable-ticketing -vga cirrus -device
> intel-hda,id=sound0,bus=pci.0,addr=0x4 -device
> hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device
> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
> 6 S qemu     15239     1  5  80   0 - 646913 poll_s 23:00 ?       00:00:23
> /usr/bin/qemu-kvm -S -M pc-0.14 -enable-kvm -m 2000 -smp
> 2,sockets=2,cores=1,threads=1 -name vm1_fed15 -uuid
> e1d26584-d942-2cb0-4f93-91d48234121a -nodefconfig -nodefaults -chardev
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm1_fed15.monitor,server,nowait
> -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -boot
> order=c,menu=off -device
> virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive
> file=/var/lib/libvirt/images/vm1_fed15.img,if=none,id=drive-ide0-0-0,format=raw
> -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive
> if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device
> ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev
> tap,fd=21,id=hostnet0 -device
> rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:eb:40:73,bus=pci.0,addr=0x3
> -chardev pty,id=charserial0 -device
> isa-serial,chardev=charserial0,id=serial0 -chardev
> spicevmc,id=charchannel0,name=vdagent -device
> virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0
> -usb -spice port=5901,addr=0.0.0.0,disable-ticketing -vga qxl -device
> intel-hda,id=sound0,bus=pci.0,addr=0x4 -device
> hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device
> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
> 0 S root     15376  8219  0  80   0 - 27152 pipe_w 23:08 pts/1    00:00:00
> grep --color=auto qemu
>
> 3/ With the internal IP address it works fine:
> 1308724009 INFO [15684:15684] Application::main: starting 0.8.1
> 1308724009 INFO [15684:15684] init_key_map: using evdev mapping
> 1308724010 INFO [15684:15684] MultyMonScreen::MultyMonScreen: platform_win:
> 79691777
> 1308724010 INFO [15684:15684] GUI::GUI:
> 1308724010 INFO [15684:15684] ForeignMenu::ForeignMenu: Creating a foreign
> menu connection /tmp/SpiceForeignMenu-15684.uds
> 1308724010 WARN [15684:15685] RedChannel::run: cannot resolve host address
> addr:192.168.1.100
> 1308724010 INFO [15684:15684] main: Spice client terminated (exitcode = 2)
> 1308724022 INFO [15690:15690] Application::main: starting 0.8.1
> 1308724022 INFO [15690:15690] init_key_map: using evdev mapping
> 1308724023 INFO [15690:15690] MultyMonScreen::MultyMonScreen: platform_win:
> 79691777
> 1308724023 INFO [15690:15690] GUI::GUI:
> 1308724023 INFO [15690:15690] ForeignMenu::ForeignMenu: Creating a foreign
> menu connection /tmp/SpiceForeignMenu-15690.uds
> 1308724023 INFO [15690:15691] RedPeer::connect_unsecure: Trying
> 192.168.1.100 5900
> 1308724023 INFO [15690:15691] RedPeer::connect_unsecure: Connected to
> 192.168.1.100 5900
> 1308724023 INFO [15690:15693] RedPeer::connect_unsecure: Trying
> 192.168.1.100 5900
> 1308724023 INFO [15690:15693] RedPeer::connect_unsecure: Connected to
> 192.168.1.100 5900
> 1308724023 INFO [15690:15694] RedPeer::connect_unsecure: Trying
> 192.168.1.100 5900
> 1308724023 WARN [15690:15691] RedClient::find_factory: no factory for 8
> 1308724023 INFO [15690:15695] RedPeer::connect_unsecure: Trying
> 192.168.1.100 5900
> 1308724023 INFO [15690:15694] RedPeer::connect_unsecure: Connected to
> 192.168.1.100 5900
> 1308724023 INFO [15690:15695] RedPeer::connect_unsecure: Connected to
> 192.168.1.100 5900
> 1308724023 INFO [15690:15696] RedPeer::connect_unsecure: Trying
> 192.168.1.100 5900
> 1308724023 INFO [15690:15696] RedPeer::connect_unsecure: Connected to
> 192.168.1.100 5900
> 1308724023 INFO [15690:15697] RedPeer::connect_unsecure: Trying
> 192.168.1.100 5900
> 1308724023 INFO [15690:15697] RedPeer::connect_unsecure: Connected to
> 192.168.1.100 5900
> 1308724023 INFO [15690:15690] DisplayChannel::create_sw_canvas: display 0:
> using sw
> 1308724023 INFO [15690:15691] RedChannel::handle_notify: remote channel 1:0
> warn!!! #0: keyboard channel is insecure
>
> 4/ With the external IP address I have the following log file for spice:
> 1308724272 INFO [15754:15754] ForeignMenu::ForeignMenu: Creating a foreign
> menu connection /tmp/SpiceForeignMenu-15754.uds
> 1308724272 INFO [15754:15755] RedPeer::connect_unsecure: Trying 72.197.4.250
> 5900
> 1308724272 INFO [15754:15755] RedPeer::connect_unsecure: Connect failed:
> Connection refused (111)
> 1308724272 WARN [15754:15755] RedChannel::run: failed to connect: Connection
> refused (111)
> 1308724272 INFO [15754:15754] main: Spice client terminated (exitcode = 3)
>
> 5/ ping 72.197.4.250
> PING 72.197.4.250 (72.197.4.250) 56(84) bytes of data.
> 64 bytes from 72.197.4.250: icmp_req=1 ttl=64 time=4.52 ms
> 64 bytes from 72.197.4.250: icmp_req=2 ttl=64 time=1.60 ms
> 64 bytes from 72.197.4.250: icmp_req=3 ttl=64 time=1.90 ms
> 64 bytes from 72.197.4.250: icmp_req=4 ttl=64 time=1.55 ms
> ^C
> --- 72.197.4.250 ping statistics ---
> 4 packets transmitted, 4 received, 0% packet loss, time 3005ms
> rtt min/avg/max/mdev = 1.551/2.396/4.525/1.236 ms
>
>
> At this point any help is more than welcome.
> Thanks and best regards,
> Stephen
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
>


More information about the Spice-devel mailing list