Re: [tigervnc-users] Getting "No Useful address for host"

5,379 views
Skip to first unread message

Pierre Ossman

unread,
Jul 30, 2015, 5:25:01 AM7/30/15
to hotpock...@gmail.com, tigervn...@googlegroups.com
On Fri, 17 Jul 2015 06:15:05 -0700 (PDT)
hotpock...@gmail.com wrote:

> I've just started playing with TigerVNC 1.5. I've had other VNC
> solutions running before, so I would assume my network settings are
> correct.
>
> But with Tiger VNC, I can not establish a connection. All I get is
> "No useful address for host". I've used the machine's URL and direct
> IP address and get the same error.
>
> Is there something I missed somewhere?
>

Hmm... I'm not having any issues connecting to a VNC session using the
official builds here. But it does seem like we are giving that error
message for every type of connection problem. I'll have to have another
look at that logic.

Unfortunately it makes it rather difficult to figure out what your
issue is. Please double check that there are no firewalls or such that
are preventing connections from your client to your server.

Rgds
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600 https://plus.google.com/+CendioThinLinc

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Pierre Ossman

unread,
Jul 30, 2015, 6:28:06 AM7/30/15
to hotpock...@gmail.com, tigervn...@googlegroups.com
I've fixed the error reporting now, so tomorrows nightly build should
be more useful. Please test that and see what it says.

chris1...@gmail.com

unread,
Nov 10, 2015, 3:31:13 AM11/10/15
to TigerVNC User Discussion/Support, hotpock...@gmail.com
Hi everyone,
I've encountered the same error accessing my TigerVNC server.

/etc/sysconfig/vncserver
VNCSERVERS="2:root"
VNCSERVERARGS[2]="-geometry 800x600"

# service iptables status
iptables: Firewall is not running.
# sestatus
SELinux status: disabled

# lsof -i | grep vnc
Xvnc 6786 root 4u IPv4 56837 0t0 TCP *:5902 (LISTEN)


From client, I issued "#telnet <server_ip> 5092" and the connection was successful. Following is the log result.

Tue Nov 10 18:44:44 2015
Connections: accepted: 192.168.10.253::49289

Tue Nov 10 18:44:51 2015
Connections: closed: 192.168.10.253::49289 (Clean disconnection)


What else can I check further?


Cheers,
Chris

Pierre Ossman

unread,
Nov 10, 2015, 3:36:36 AM11/10/15
to tigervn...@googlegroups.com
On Tue, 10 Nov 2015 00:31:12 -0800 (PST)
chris1...@gmail.com wrote:

> Hi everyone,
> I've encountered the same error accessing my TigerVNC server.
>

Have you tried the nightly build?

Rgds
--
Pierre Ossman Software Development
Cendio AB http://cendio.com
Teknikringen 8 http://twitter.com/ThinLinc
583 30 Linköping http://facebook.com/ThinLinc
Phone: +46-13-214600 http://plus.google.com/+CendioThinLinc

chris1...@gmail.com

unread,
Nov 10, 2015, 4:35:56 AM11/10/15
to TigerVNC User Discussion/Support
Thank you for the response as well as the guide for the posting order.
I've just tried with the nightly build both server and client and got a windows vncviewer message saying
"unable connect to socket: Connection refused (10061)"
It seems it's a matter of OS level denial but I don't have any clue now.

chris1...@gmail.com

unread,
Nov 10, 2015, 5:02:35 AM11/10/15
to TigerVNC User Discussion/Support, chris1...@gmail.com
Oh, I just found a silly mistake which is too foolish to share.
It is fixed now. Thank you for your valuable time.

shado...@gmail.com

unread,
Nov 11, 2015, 3:36:42 PM11/11/15
to TigerVNC User Discussion/Support, chris1...@gmail.com
I just ran into this. What was the mistake?

Chris Park

unread,
Nov 12, 2015, 12:28:44 PM11/12/15
to shado...@gmail.com, TigerVNC User Discussion/Support

Oh, ashmed to share but it was the omission of display number; I tried with 192.168.10.10 rather than 192.168.10.10:2...

fred.d...@gmail.com

unread,
Nov 19, 2015, 12:21:24 PM11/19/15
to TigerVNC User Discussion/Support, shado...@gmail.com, chris1...@gmail.com
On Thursday, November 12, 2015 at 12:28:44 PM UTC-5, Chris Park wrote:
> Oh, ashmed to share but it was the omission of display number; I tried with 192.168.10.10 rather than 192.168.10.10:2...
>

IMHO that's not a silly mistake. It is entirely a bug for vncviewer not to default to screen 1 or to demand specifically that a display be included.

Brian Hinz

unread,
Nov 19, 2015, 2:44:01 PM11/19/15
to TigerVNC User Discussion/Support
If not specified, the viewer defaults to display 0 (ie: port 5900).  This is standard VNC behavior and documented in the vncviewer man page.

-brian

fred.d...@gmail.com

unread,
Nov 19, 2015, 2:48:03 PM11/19/15
to TigerVNC User Discussion/Support, bph...@jhu.edu
Hmm, in that case the message ought to be something like "I found the host but I didn't find a VNC server at display :0".

But in any case, is this some behavior that varies on different systems? If I run vncserver on my linux box it creates on display 1, and if I run vncclient on my windows box it defaults to display 1.

fred.d...@gmail.com

unread,
Nov 19, 2015, 2:59:01 PM11/19/15
to TigerVNC User Discussion/Support, bph...@jhu.edu, fred.d...@gmail.com

fred.d...@gmail.com

unread,
Nov 19, 2015, 3:04:01 PM11/19/15
to TigerVNC User Discussion/Support, bph...@jhu.edu, fred.d...@gmail.com
On Thursday, November 19, 2015 at 2:48:03 PM UTC-5, fred.d...@gmail.com wrote:
PS. I just looked at the man page. It says nothing explicit about a default port that I could find. Instead it says that if you say "snoopy" this means port :0 on snoopy. So it could be clearer, but it does say it defaults to 0 if you squint.

In addition, I tried realvnc on my windows box. In fact, it too seems to default to 0 if I don't say :1. So I'll buy that is the default. But it also seems that on different systems, vncserver wants to default to creating :1 rather than :0. Is that just my bad luck or an inconsistency?

----

If you run the viewer with no arguments it will prompt you for a VNC server to connect to. Alternatively, specify the VNC server
as an argument, e.g.:

vncviewer snoopy:2

where 'snoopy' is the name of the machine, and '2' is the display number of the VNC server on that machine. Either the machine
name or display number can be omitted. So for example ":1" means display number 1 on the same machine, and "snoopy" means
"snoopy:0" i.e. display 0 on machine "snoopy".

Brian Hinz

unread,
Nov 19, 2015, 3:18:56 PM11/19/15
to fred.d...@gmail.com, TigerVNC User Discussion/Support
On Thu, Nov 19, 2015 at 2:59 PM,  wrote:

>
> Hmm, in that case the message ought to be something like "I found the host but I didn't find a VNC server at display :0".

That makes sense to me.
 
>
> But in any case, is this some behavior that varies on different systems?

If I run vncserver on my linux box it creates on display 1, and if I run vncclient on my windows box it defaults to display 1.


Do you mean to say that if you only enter the hostname, with no ":N" suffix that it tries to connect to the server on port 5901?  That should not occur, if the port is omitted it should default to :0 (which is equivalent to :5900).

The port that gets used by vncserver is 5900 plus an offset.  That offset gets determined by a search that looks for the first available X display.  On a headless system, that might be 0, whereas on a graphical system the console would already be running on display 0 and consequently the next available display is ":1".

-brian

fred.d...@gmail.com

unread,
Nov 19, 2015, 3:27:31 PM11/19/15
to TigerVNC User Discussion/Support, fred.d...@gmail.com, bph...@users.sourceforge.net
On Thursday, November 19, 2015 at 3:18:56 PM UTC-5, Brian Hinz wrote:
> ... That offset gets determined by a search that looks for the first available X display.  On a headless system, that might be 0, whereas on a graphical system the console would already be running on display 0 and consequently the next available display is ":1".

Ah, that explains a lot. I was using a VM that I thought wouldn't have a native X system, but it did start with :1.

To be honest, I think given the wide variety of ports, vncclient should simply not accept a default port. Or, if it defaults to 0 and finds no VNC server listening, it could have a (default) option to advance to :1 automatically.

Thanks much!

Adam

unread,
Dec 27, 2015, 8:29:35 AM12/27/15
to TigerVNC User Discussion/Support, fred.d...@gmail.com, bph...@users.sourceforge.net
This is perhaps a new event, but relative to the Subject "No useful address for host."

Using TigerVNC to ssh tunnel to/from Linux servers running Fedora 23 platform. Keep in mind this worked, but no longer since a recent dnf update. I have used the suggested port tunneling:

# ssh -L 5901:localhost:5902 -l username -p 22 remotehost

Then I try to connect to it on the local system using:

# vncviewer localhost:2

and I get the aforementioned response. At least 5 ports have been opened through the firewall...5900-5904. Again this did work at one time. I have tried variations of localhost such as:

# vncviewer 127.0.0.1:2
# vncviewer actual.ip.ad.dress:2
# vncviewer hostname:2 as defined in the /etc/hosts file

All yield the same error. Finally, this DOES work perfectly if I do not tunnel the port (not recommended or wanted):

# vncviewer remotehost:1

Any suggestions?

Thanks in advance.

rtts...@gmail.com

unread,
Dec 27, 2015, 11:13:31 AM12/27/15
to TigerVNC User Discussion/Support, fred.d...@gmail.com, bph...@users.sourceforge.net, rtts...@gmail.com

Apologies. I determined what I was doing wrong,

# ssh -L 5901:localhost:5902 -l username -p 22 remotehost

should be

# ssh -L 5902:localhost:5901 -l username -p 22 remotehost

Client port should be first and host port second. Then:

# vncviewer localhost:2

works. Apologies for my error.

Reply all
Reply to author
Forward
0 new messages