[Users] [SOLVED] Re: Connecting with vnc to a VM defined as spice
Gianluca Cecchi
gianluca.cecchi at gmail.com
Tue Feb 12 12:17:23 EST 2013
On Tue, Feb 5, 2013 at 12:19 AM, Adrian Gibanel wrote:
> ----- Mensaje original -----
>
>> I tried with novnc and tigervnc from a fedora 17 laptop.
>
>> Let me know how to test further in case.
>
> Did you make sure that the mentioned port was open in the host firewall?
>
Just for the note and for others not doing the same "stupid" things like me....
I used this command
vncviewer 192.168.1.102 ::5902
note the space between ip and ::5902
This way it seems the ip is totally ignored without returning any
syntax error and so it implicitly tries localhost
So clearly any client that tries to connect fails (if it is not a vnc
server on that port itself, obviously...)
And carefully reading the man page helps too:
vncviewer [options] [host][::port]
Instead if for example I install vncviewer and run the same command
from the node itself it succeeds.... ;-)
The correct command without the space
vncviewer 192.168.1.102::5902
completes correctly
I understood this noticing the "127.0.0.1" when prepending the
"strace" command from the client and the wrong syntax:
open("/etc/host.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=9, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa457040000
read(3, "multi on\n", 4096) = 9
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7fa457040000, 4096) = 0
futex(0x38785b5ae0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=250, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fa457040000
read(3, "127.0.0.1 localhost localhost."..., 4096) = 250
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7fa457040000, 4096) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(5902),
sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection
refused)
close(3) = 0
ALso because connecting from the node itself with the wronh syntax I
got the ESTABLISHED on localhost ip.....
[g.cecchi at f18ovn03 ~]$ vncviewer 192.168.1.102::5902
[g.cecchi at f18ovn03 ~]$ sudo netstat -tan|grep 590
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5902 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5903 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:50509 127.0.0.1:5902 ESTABLISHED
HIDH
(tm for Hope It Doesn't Help: it means you are not as stupid as me... ;-)
Gianluca
More information about the Users
mailing list