vnc cannot connect

When I try to connect via vnc – locally using vncviewer or remotely using tight vnc from Windows, I get a message “Connection refused” or “Failed to connect”.

I allowed Remote Administration via Yast.

My firewall is disabled (inside corporate firewall).

The status for vnc1 is On.

The status for vnchttpd1 is On.

If I ps -ef | grep vnc I see nothing.

What else do I need to do to enable vnc?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Are you sure you’re connecting to the same port that is open? I believe
‘Remote Administration’ opens a few 590x ports while by default every
VNC client in the world goes directly to 5900 by default. Try either
using ipaddress:1 in the connection line or else at least verify what is
listening on the machine with the server side:

netstat -anp | grep 'LISTEN ’

Good luck.

jbailo wrote:
| When I try to connect via vnc – locally using vncviewer or remotely
| using tight vnc from Windows, I get a message “Connection refused” or
| “Failed to connect”.
|
|
| I allowed Remote Administration via Yast.
|
| My firewall is disabled (inside corporate firewall).
|
| The status for vnc1 is On.
|
| The status for vnchttpd1 is On.
|
| If I ps -ef | grep vnc I see nothing.
|
| What else do I need to do to enable vnc?
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFImKnQ3s42bA80+9kRAsU4AJ9brAzNwxJWAZ5P6nlNQfHF3TisowCghPyH
m/XOqT0k8uazTPlbQgH1fH0=
=cUpY
-----END PGP SIGNATURE-----

I reviewed the Tight VNC documentation and it says that it uses port 5900 by default. The documentation shows the user simply entering in the IP address. I tried it both ways, IP and IP:port but got the same cannot connect message.

You recommended the command:

netstat -anp | grep 'LISTEN ’

Can you elaborate exactly what I should look for? This command produces a huge list of items…I tried grepping it for something that had ‘vnc’ in it, but found nothing.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

grep for ‘59’. We’re looking for open ports that would be VNC-related.

Good luck.

jbailo wrote:
| I reviewed the Tight VNC documentation and it says that it uses port
| 5900 by default. The documentation shows the user simply entering in
| the IP address. I tried it both ways, IP and IP:port but got the same
| cannot connect message.
|
| You recommended the command:
|
| -netstat -anp | grep 'LISTEN '-
|
| Can you elaborate exactly what I should look for? This command
| produces a huge list of items…I tried grepping it for something that
| had ‘vnc’ in it, but found nothing.
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFImzvV3s42bA80+9kRAvtpAJ4m6SKfwG24X90GdgYE1Wa06lKlXgCePN7u
ukjt9pFQYoiwgzNO5AOpZtA=
=X/gJ
-----END PGP SIGNATURE-----

Here are the results:

susemail:~ # netstat -anp | grep ‘LISTEN’ | grep 59
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 2551/xinetd
unix 2 ACC ] STREAM LISTENING 5904 2289/audispd /var/run/audispd_events
unix 2 ACC ] STREAM LISTENING 5941 2304/avahi-daemon: /var/run/avahi-daemon/socket
unix 2 ACC ] STREAM LISTENING 8374 2758/gnome-screensa /tmp/orbit-kanaadmin/linc-abc-0-dd688fad9759
unix 2 ACC ] STREAM LISTENING 8565 2759/metacity /tmp/orbit-kanaadmin/linc-ac7-0-ddf238291ef4
unix 2 ACC ] STREAM LISTENING 9298 2795/gnome-volume-m /tmp/orbit-kanaadmin/linc-ae8-0-591053e79aab6
unix 2 ACC ] STREAM LISTENING 9389 2800/gnome-power-ma /tmp/orbit-kanaadmin/linc-ae6-0-591053e55f7d9
unix 2 ACC ] STREAM LISTENING 9399 2796/nm-applet /tmp/orbit-kanaadmin/linc-aec-0-22142f0185994
unix 2 ACC ] STREAM LISTENING 9807 2842/main-menu /tmp/orbit-kanaadmin/linc-b1a-0-2c036a215948b
susemail:~ #

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bah… you took the space off the word 'LISTEN ’ from my original post
which is why you ended up with all this garbage. Anyway, as mentioned
bfore, 5901 is listening. So, try your VNC viewer with :1 or ::5901 on
the end of the IP address and see if that helps. Also, I don’t remember
if we’ve talked about firewalls so be sure 5901 is opened to the world.
~ As root:

iptables-save | grep 5901

Good luck.

jbailo wrote:
| Here are the results:
|
| susemail:~ # netstat -anp | grep ‘LISTEN’ | grep 59
| tcp 0 0 0.0.0.0:5901 0.0.0.0:*
| LISTEN 2551/xinetd
| unix 2 ACC ] STREAM LISTENING 5904 2289/audispd
| /var/run/audispd_events
| unix 2 ACC ] STREAM LISTENING 5941
| 2304/avahi-daemon: /var/run/avahi-daemon/socket
| unix 2 ACC ] STREAM LISTENING 8374
| 2758/gnome-screensa /tmp/orbit-kanaadmin/linc-abc-0-dd688fad9759
| unix 2 ACC ] STREAM LISTENING 8565 2759/metacity
| /tmp/orbit-kanaadmin/linc-ac7-0-ddf238291ef4
| unix 2 ACC ] STREAM LISTENING 9298
| 2795/gnome-volume-m /tmp/orbit-kanaadmin/linc-ae8-0-591053e79aab6
| unix 2 ACC ] STREAM LISTENING 9389
| 2800/gnome-power-ma /tmp/orbit-kanaadmin/linc-ae6-0-591053e55f7d9
| unix 2 ACC ] STREAM LISTENING 9399 2796/nm-applet
| /tmp/orbit-kanaadmin/linc-aec-0-22142f0185994
| unix 2 ACC ] STREAM LISTENING 9807 2842/main-menu
| /tmp/orbit-kanaadmin/linc-b1a-0-2c036a215948b
| susemail:~ #
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIm2TO3s42bA80+9kRAub1AJ9yJn5mxUFtjrUIvAFbPTQSOj/q/gCfbqRA
VJfdVPkImBeE6V8TtMlm8/Y=
=vzYk
-----END PGP SIGNATURE-----

Ok I got a little further.

For one, I found out there was a corporate firewall. My sysadmin opened port 5901 for me.

The second thing was I need to use 5901:1 as you requested.

However, now what happens is that I initially connect, then the openSUse login screen starts to appear in Tight VNC …then before it finishes, the application closes and an alert pops up and says “Connection closed”.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I’d check the server logs at this point, or the client logs (or get some
client output by running vncviewer from the command line since it may
show more there) or get a LAN trace to see what happens on the wire
(warning, lots of data since it’s a GUI you’re working on now).

Good luck.

jbailo wrote:
| Ok I got a little further.
|
| For one, I found out there was a corporate firewall. My sysadmin
| opened port 5901 for me.
|
| The second thing was I need to use 5901:1 as you requeted.
|
| However, now what happens is that I initially connect, then the
| openSUse login screen starts to appear in Tight VNC …then before it
| finishes, the application closes and an alert pops up and says
| “Connection closed”.
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIm3Wl3s42bA80+9kRAnPFAJ0cFDJA4wh0q5zfFkN5dWCgbmY5lgCdFCTj
Uzg6D/3dqBscMAk6hVfkJyU=
=Le0g
-----END PGP SIGNATURE-----

I tried running vncviewer on my openSuse server directly. It prompted me for the IP and I put in 192.168.25.254:1 Then it disconnected.

The terminal output is

kanaadmin@susemail:/var/log> vncviewer
Connected to RFB server, using protocol version 3.7
Enabling TightVNC protocol extensions
No authentication needed
Desktop name “nobody’s x11 desktop (susemail:16)”
VNC server default format:
16 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0
Warning: Cannot convert string “--helvetica-bold-r---16-------” to type FontStruct
Using default colormap which is TrueColor. Pixel format:
16 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0
ShmCleanup called
Using shared memory PutImage
Same machine: preferring raw encoding
vncviewer: VNC server closed connection
ShmCleanup called
kanaadmin@susemail:/var/log>
kanaadmin@susemail:/var/log>

*tail /var/log/xinetd.log *

kanaadmin@susemail:/var/log> tail -f xinetd.log
08/8/7@16:01:26: START: vnc1 from=192.168.25.254
08/8/7@16:01:27: EXIT: vnc1 signal=6 duration=1(sec)
08/8/7@16:02:09: START: vnc1 from=192.168.25.254
08/8/7@16:02:10: EXIT: vnc1 signal=6 duration=1(sec)
08/8/7@16:03:07: START: vnc1 from=192.168.25.254
08/8/7@16:03:08: EXIT: vnc1 signal=6 duration=1(sec)
08/8/7@16:03:20: START: vnc1 from=192.168.25.254
08/8/7@16:03:21: EXIT: vnc1 signal=6 duration=1(sec)
08/8/7@16:13:30: START: vnc1 from=192.168.25.254
08/8/7@16:13:33: EXIT: vnc1 signal=6 duration=3(sec)

I’m having the same problem and would like to know if you solved it?

Since the thread is over 6 years old I suggest you start a new one giving all your details of the problem you see