I did have spaces after the commas in the host subject but after regenerating the certs and modifying the command I receive the same error. I followed the steps to create the certs from the <a href="http://www.spice-space.org/page/SSLConnection">http://www.spice-space.org/page/SSLConnection</a> site. Should those steps work?<br>
<br><div class="gmail_quote">On Fri, Mar 23, 2012 at 7:36 AM, David Jaša <span dir="ltr"><<a href="mailto:djasa@redhat.com">djasa@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Anthony,<br>
<br>
I don't see anything clearly wrong in what you posted in your last two<br>
mails. Just one note: -spice addr=127.0.0.1 means that the host will<br>
only be accessible on the localhost - if you add "<listen type='address'<br>
address='0.0.0.0'/>" element to "<graphics>" element in domain xml, qemu<br>
will bind to all ipv4 addresses.<br>
<br>
I'd just check the SSL/TLS stuff again - if your certs are OK, if you<br>
pass correct host subject (without space after comma!), if you pass<br>
correct CA file and so on...<br>
<br>
David<br>
<br>
Anthony James píše v Pá 23. 03. 2012 v 07:20 -0400:<br>
<div class="HOEnZb"><div class="h5">> I just tried connecting using remote-viewer, here is the command:<br>
><br>
><br>
> remote-viewer --spice-ca-file=ca-cert.pem<br>
> --spice-host-subject="$HOSTSUBJECT" spice://localhost/?port=<br>
> $PORT&tls-port=$SPORT<br>
><br>
><br>
> It connects but using only the non-tls port. When I remove port=$PORT<br>
> to try and force it to use the tls-port the connection fails and I see<br>
> this in the VM log:<br>
><br>
><br>
> reds_handle_ssl_accept: SSL_accept failed, error=1<br>
><br>
><br>
> The remote-viewer version is 0.5.2.<br>
><br>
> On Fri, Mar 23, 2012 at 7:10 AM, Anthony James<br>
> <<a href="mailto:anthony.james@cintriq.com">anthony.james@cintriq.com</a>> wrote:<br>
> I created and started the VM with virt-manager. Here is what<br>
> looks like the qemu cmd from /var/log/libvirt/qemu/$VM.log<br>
><br>
><br>
> /usr/bin/qemu-kvm -S -M pc-0.15 -cpu core2duo,+lahf_lm,<br>
> +rdtscp,+popcnt,+sse4.2,+sse4.1,+pdcm,+xtpr,+cx16,+tm2,+est,<br>
> +smx,+vmx,+ds_cpl,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds -enable<br>
> -kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name $VMNAME<br>
> -uuid 9046e3aa-81d5-028d-010f-2a755e20aa97 -nodefconfi<br>
> g -nodefaults -chardev<br>
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/$VMNAME.monitor,server,nowait -mon chardev=c<br>
> harmonitor,id=monitor,mode=control -rtc base=localtime<br>
> -no-shutdown -device<br>
> virtio-serial-pci,id=virtio-serial0,bus=pci.<br>
> 0,addr=0x5 -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x8<br>
> -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0<br>
> ,addr=0x9 -device<br>
> ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0xa<br>
> -device ich9-usb-uhci3,masterbus=usb.0,f<br>
> irstport=4,bus=pci.0,addr=0xb -drive<br>
> file=/vm/$VMNAME.img,if=none,id=drive-virtio-disk0,format=raw<br>
> -device virtio-bl<br>
> k-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/iso/virtio-win-0.1-2<br>
> 2.iso,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<br>
> -0,id=ide0-1-0 -netdev<br>
> tap,fd=26,id=hostnet0,vhost=on,vhostfd=27 -device<br>
> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:5<br>
> 4:00:43:e6:dd,bus=pci.0,addr=0x3 -chardev pty,id=charserial0<br>
> -device isa-serial,chardev=charserial0,id=serial0 -chardev<br>
> spicevmc,id=charchannel0,name=vdagent -device<br>
> virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,<br>
> name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice<br>
> port=$PORT,tls-port=<br>
> $SPORT,addr=127.0.0.1,x509-dir=/etc/pki/lib<br>
> virt-spice -k en-us -vga qxl -global<br>
> qxl-vga.vram_size=67108864 -device<br>
> intel-hda,id=sound0,bus=pci.0,addr=0x4 -device h<br>
> da-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev<br>
> spicevmc,id=charredir0,name=usbredir -device<br>
> usb-redir,chardev=ch<br>
> arredir0,id=redir0 -device<br>
> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7<br>
><br>
><br>
> Also in the log I see the following messages for everytime I<br>
> try to connect using SSL:<br>
><br>
><br>
> reds_handle_ssl_accept: SSL_accept failed, error=1<br>
> reds_handle_ssl_accept: SSL_accept failed, error=1<br>
><br>
><br>
> Here are the package versions I'm running:<br>
><br>
><br>
> spice-xpi-2.7-2.fc16.x86_64<br>
> spice-gtk3-0.11-4.fc16.x86_64<br>
> spice-gtk-tools-0.11-4.fc16.x86_64<br>
> spice-client-0.10.1-1.fc16.x86_64<br>
> spice-server-0.10.1-1.fc16.x86_64<br>
> spice-gtk-python-0.11-4.fc16.x86_64<br>
> spice-gtk-0.11-4.fc16.x86_64<br>
> spice-protocol-0.10.1-1.fc16.noarch<br>
> spice-glib-0.11-4.fc16.x86_64<br>
> libvirt-0.9.10-2.fc16.x86_64<br>
> libvirt-python-0.9.10-2.fc16.x86_64<br>
> libvirt-client-0.9.10-2.fc16.x86_64<br>
> qemu-system-x86-1.0-7.fc16.x86_64<br>
> gpxe-roms-qemu-1.0.1-4.fc16.noarch<br>
> qemu-common-1.0-7.fc16.x86_64<br>
> qemu-img-1.0-7.fc16.x86_64<br>
> virt-manager-common-0.9.1-2.fc16.noarch<br>
> virt-manager-0.9.1-2.fc16.noarch<br>
><br>
><br>
> The host is running Fedora 16 with the updates-testing<br>
> virt-preview repos enabled.<br>
><br>
><br>
><br>
> On Fri, Mar 23, 2012 at 6:58 AM, David Jaša <<a href="mailto:djasa@redhat.com">djasa@redhat.com</a>><br>
> wrote:<br>
> Anthony James píše v Pá 23. 03. 2012 v 06:46 -0400:<br>
> > David,<br>
> ><br>
> ><br>
> > I just tried about 20 times in a row, same error.<br>
> When you say it's a<br>
> > known bug in spicec when connecting manually, what<br>
> is the alternative<br>
> > to connecting manually? Is this bug present in<br>
> spicy or<br>
> > remote-viewer? Thanks in advance.<br>
><br>
><br>
> I don't recall hitting it with remote-viewer. FTR,<br>
> remote-viewer's<br>
> invocation format differs from that of spicec and<br>
> spicy:<br>
><br>
> remote-viewer <options><br>
> spice://<host>/?port=<port>&tls-port=<sport><br>
><br>
> you can get the complete list of of options with:<br>
><br>
> remote-viewer --help-all<br>
><br>
> Speaking about it, it might be also the libvirt/qemu<br>
> bug that both fired<br>
> up with main channel forced to SSL/TLS but without<br>
> setting up tls-port<br>
> on which would qemu actually listen. Could you post<br>
> qemu command line<br>
> here so we can rule it out?<br>
><br>
> David<br>
> ><br>
> > On Fri, Mar 23, 2012 at 6:37 AM, David Jaša<br>
> <<a href="mailto:djasa@redhat.com">djasa@redhat.com</a>> wrote:<br>
> > Anthony James píše v Pá 23. 03. 2012 v 06:26<br>
> -0400:<br>
> > > David,<br>
> > ><br>
> > > Thanks for the reply. I've tried adding<br>
> --ca-file to the<br>
> > spicec<br>
> > > command line but still receive the same<br>
> error. Here is the<br>
> > command:<br>
> > ><br>
> > > spicec -h localhost -p $PORT -s $SPORT<br>
> --secure-channels all<br>
> > > --host-subject "$HOSTSUBJECT" --ca-file<br>
> ca-cert.pem -w<br>
> > $PASSWD<br>
> > ><br>
> > > Same error:<br>
> > ><br>
> > > Error: failed to connect w/SSL, ssl_error<br>
> > > error:00000001:lib(0):func(0):reason(1)<br>
> > > 140613653984512:error:14090086:SSL<br>
> > ><br>
> routines:SSL3_GET_SERVER_CERTIFICATE:certificate<br>
> verify<br>
> > > failed:s3_clnt.c:1063:<br>
> > > Warning: SSL Error:<br>
> ><br>
> ><br>
> > Hi Anthony,<br>
> ><br>
> > try several times. It's a known bug in<br>
> spicec that when you're<br>
> > connecting manually, the connection fails<br>
> several times before<br>
> > it is<br>
> > established. Actually it's more frequent if<br>
> you specify<br>
> > --secure<br>
> > channels all or if you omit -p altogether<br>
> (both have the same<br>
> > effect).<br>
> ><br>
> > David<br>
> > ><br>
> > > On Fri, Mar 23, 2012 at 6:06 AM, David<br>
> Jaša<br>
> > <<a href="mailto:djasa@redhat.com">djasa@redhat.com</a>> wrote:<br>
> > > Hi Anthony,<br>
> > ><br>
> > > Anthony James píše v Čt 22. 03.<br>
> 2012 v 15:40 -0400:<br>
> > > > I'm having problems connecting<br>
> to a spice virtual<br>
> > machine<br>
> > > using SSL.<br>
> > > > I use the following command to<br>
> connect:<br>
> > > ><br>
> > > ><br>
> > > > spicec -h localhost -p $PORT -s<br>
> $SPORT<br>
> > --secure-channels all<br>
> > > > --host-subject "$HOSTSUBJECT" -w<br>
> $PASSWD<br>
> > > ><br>
> > ><br>
> > > You're missing --ca-file<br>
> $CA_CERTIFICATE_FILE in<br>
> > your command<br>
> > > line.<br>
> > ><br>
> > > David<br>
> > > ><br>
> > > > The error I receive is:<br>
> > > ><br>
> > > ><br>
> > > > Error: failed to connect w/SSL,<br>
> ssl_error<br>
> > > ><br>
> error:00000001:lib(0):func(0):reason(1)<br>
> > > ><br>
> 139699632096512:error:14090086:SSL<br>
> > > ><br>
> routines:SSL3_GET_SERVER_CERTIFICATE:certificate<br>
> > verify<br>
> > > > failed:s3_clnt.c:1063:<br>
> > > > Warning: SSL Error:<br>
> > > ><br>
> > > ><br>
> > > > I have followed the instructions<br>
> from the<br>
> > following 2 sites<br>
> > > to<br>
> > > > configure the SSL certs:<br>
> > > ><br>
> > > ><br>
> > > ><br>
> <a href="http://www.spice-space.org/page/SSLConnection" target="_blank">http://www.spice-space.org/page/SSLConnection</a><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > ><br>
> ><br>
> <a href="http://fedoraproject.org/w/index.php?title=QA:Testcase_Virtualization_Manually_set_spice_listening_port_with_TLS_port_set&oldid=255162" target="_blank">http://fedoraproject.org/w/index.php?title=QA:Testcase_Virtualization_Manually_set_spice_listening_port_with_TLS_port_set&oldid=255162</a><br>
> > > ><br>
> > > ><br>
> > > > Any help would be greatly<br>
> appreciated, I'm sure<br>
> > I'm missing<br>
> > > something.<br>
> > > ><br>
> > > ><br>
> > > > Thanks,<br>
> > > > Tony<br>
> > ><br>
> > > ><br>
> _______________________________________________<br>
> > > > Spice-devel mailing list<br>
> > > ><br>
> <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
> > > ><br>
> ><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
> > ><br>
> > ><br>
> > > --<br>
> > ><br>
> > > David Jaša, RHCE<br>
> > ><br>
> > > SPICE QE based in Brno<br>
> > > GPG Key: 22C33E24<br>
> > > Fingerprint: 513A 060B D1B4 2A72<br>
> 7F0D 0278 B125 CD00<br>
> > 22C3 3E24<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> _______________________________________________<br>
> > > Spice-devel mailing list<br>
> > > <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
> > ><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
> ><br>
> > --<br>
> ><br>
> > David Jaša, RHCE<br>
> ><br>
> > SPICE QE based in Brno<br>
> > GPG Key: 22C33E24<br>
> > Fingerprint: 513A 060B D1B4 2A72 7F0D 0278<br>
> B125 CD00 22C3 3E24<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Spice-devel mailing list<br>
> > <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
> ><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
><br>
> --<br>
><br>
> David Jaša, RHCE<br>
><br>
> SPICE QE based in Brno<br>
> GPG Key: 22C33E24<br>
> Fingerprint: 513A 060B D1B4 2A72 7F0D 0278 B125 CD00<br>
> 22C3 3E24<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Spice-devel mailing list<br>
> <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
<br>
--<br>
<br>
David Jaša, RHCE<br>
<br>
SPICE QE based in Brno<br>
GPG Key: 22C33E24<br>
Fingerprint: 513A 060B D1B4 2A72 7F0D 0278 B125 CD00 22C3 3E24<br>
<br>
<br>
<br>
</div></div></blockquote></div><br>