Sei sulla pagina 1di 14

Debug Failed to connect to server!

Version 2
To many of the first time visitors to the forums, the following screenshot may look all too
familiar.
There are many causes for this error and unfortunately this is all the information available
to the viewer so it isnt possible for the developers to display a more specific error
message. Microsoft offers a port query utility that can be used to help isolate eactly
where the connection is failing. !rom Microsofts site" #$ort%ry.ee is a command&line
utility that you can use to help troubleshoot T'$()$ connectivity issues. $ort%ry.ee
runs on *indows 2+++&based computers, on *indows ,$&based computers, and on
*indows -erver 2++.&based computers. The utility reports the port status of T'$ and
/0$ ports on a computer that you select.1
Microsoft also offers a front end to the command line utility called $ort%uery/) which
)ll be using for debugging. 0ownload $ort%uery/) from Microsoft at
http"((www.microsoft.com(downloads(details.asp2familyid34.5565.7&869:&;5:<&
99==&!2;4!;=0<80+>displaylang3en. The download is a self&etracting eecutable
so when you run it, it will prompt you for a path for etraction. *ell ?ust be scratching
the surface of what $ort%ry can be used for, but theres a great two part @ow To at
http"((www.windowsecurity.com(articles(Mastering&$ort%ryee&$art8.html and at
http"((www.windowsecurity.com(articles(Mastering&$ort%ryee&$art2.html if youd like
further details.
Is the UltraVNC Server started and listening on the port you
think it is?
Ak, lets start at the beginning on the machine you are trying to access from a remote
location. /ltraVB' installation procedures are presented at
http"((www.uvnc.com(install(installation.html and )ll be assuming that youve looked
there first. This question can be answered either by connecting the /ltraVB' Viewer to
the /ltraVB' -erver in Coopback mode or using $ort%uery/).
)f youve successfully connected the /ltraVB' Viewer to the /ltraVB' -erver in
Coopback mode you can skip to the net question. @owever, since this is a debug
procedure using this tool, start the $ort %uery /ser )nterface by clicking Start Run
Browse then navigate to the location of the PortQueryUI.exe eecutable, select it, click
Open, and press <Enter>.
The default Enter destination IP or FQDN to query: is the local machine, 127.0.0.1
which is what we want so leave that alone. The default Query Type is Query predefined
service:, but we are only verifying that the /ltraVB' server is running and that its
listening on the port we think so change it to Manuay input !uery ports:, set Ports to
query: to "#00 or the port youve set the server to listen to Dfor the remainder of the
procedure )ll refer to port 5<++ so substitute your port if using a different one for the rest
of the documentE and leave the Protocol: set to its default $%P then click Query.
The results are displayed in the Query Result: area. ) wont bother eplaining the entire
display Drefer to the references if you cant understand itE, but what were looking for is
the $%P port "#00 status. )n this case, )ve shown the results with my /ltraVB' -erver
not started so the results are that it is &'$ (I)$E&I&*. This would also be the result if
my server were listening on a different port.
)f &'$ (I)$E&I&*, and you installed the /ltraVB' server as a service, check to see
that it has been started. 'lick Start Run, type services.+sc, and press <Enter>. )n the
list of services you should see ,&% )erver and its Status should be )tarted and its
Startup Type should be -uto+atic.
)f &'$ (I)$E&I&*, and if you didnt install the /ltraVB' server as a service, ensure
that you manually started it.
)f &'$ (I)$E&I&*, and the server is running verify that it is listening on the port you
think. 0ouble&click on the servers eyeball icon, , to open the administrative
properties. Verify that the Main: port under Incoin! "onnections is set to "#00 or that
-uto is selected which will also cause the server to listen on port "#00.
Ance the /ltraVB' server is running and listening on the port we epect, rerun the
$ort%uery/) query and you should get the following result.
$%P port "#00 status is (I)$E&I&* after the server is running and set to port 5<++.
Verify by connecting the /ltraVB' Viewer to the /ltraVB' -erver in Coopback mode.
Is connection being blocked by your security software?
This is the reason why <+F of the /ltraVB' users receive the failed to connect error.
/nfortunately, answering this question requires having more than one machine on your
private network. )f ) figure out a way to do it with a single $', )ll update the procedures.
)f you dont have another machine inside your C9B, then proceed to the net question
where well try to answer this question as part of answering the net question.
0ownload $ort%uery/) from Microsoft at
http"((www.microsoft.com(downloads(details.asp2familyid34.5565.7&869:&;5:<&
99==&!2;4!;=0<80+>displaylang3en on another machine inside your private
network. The download is a self&etracting eecutable so when you run it, it will prompt
you for a path for etraction. -tart the $ort %uery /ser )nterface by clicking Start Run
Browse then navigate to the location of the PortQueryUI.exe eecutable, select it, click
Open, and press <Enter>.
-ince were communicating over the C9B, we need to change the default Enter
destination IP or FQDN to query: to the private )$ address of the machine you are trying
to access from a remote location. )n my case, thats 1#2.1./.1.0. Gou can obtain the
private )$ address using ipconfi1 on the machine running the server as shown in the
following screenshot. Gou get a command prompt by clicking Start Run, type c+d,
and press <Enter>.
The default Query Type is Query predefined service:, but we are only verifying that
security software is not preventing the connection so change it to Manuay input !uery
ports:, set Ports to query: to "#00 and leave the Protocol: set to its default $%P then
click Query.
The results are displayed in the Query Result: area. *hat were looking for is the $%P
port "#00 status. )n this case, )ve shown the results with the *indows firewall turned
on without eceptions on the machine running the server so the results are that it is
2I($E3E4. This indicates that $ort%ry did not receive a response from the port.
)f 2I($E3E4, then the VB' connection may be being blocked by your security
software. To look at the status of the *indows firewall, click Start Run, type
fire5a.cp, and press <Enter>. )f the firewall is on as shown in the following
screenshot, you need to create an eception for the connection.
'lick E#ceptions $dd Port and add a T'$ eception for the VB' traffic as shown in
the following screenshot then click O%.
There are too many different security software choices to cover them all here, but this
should give you an idea of what you need to do. Ance you allow an eception for the
/ltraVB' traffic, rerun the $ort%uery/) query and you should get the following result.
$%P port "#00 status is (I)$E&I&* after adding port eception.
Is connection being blocked by your router?
@opefully youve been able to confirm that the connection isnt being blocked by your
security software in the previous section, but if not we should be able to confirm that
here. Move back to the $' youre having trouble accessing remotely. Goull need to
identify your public )$ address assigned by your internet service provider or 0yn0B-
host name. Gou can see your public )$ address by visiting http"((whatsmyip.org(, but
since most )-$s assign a dynamic )$ address, ) recommend signing up for a free account
at http"((www.dyndns.com(. This will allow you to create a host name that will resolve to
your dynamic public )$ address.
-tart the $ort %uery /ser )nterface by clicking Start Run Browse then navigate to the
location of the PortQueryUI.exe eecutable, select it, click Open, and press <Enter>.
-ince were communicating over the *9B, we need to change the default Enter
destination IP or FQDN to query: to the public )$ address assigned by your )-$ or
0yn0B- host name. The default Query Type is Query predefined service:, but we are
only verifying that router is not preventing the connection so change it to Manuay
input !uery ports:, set Ports to query: to "#00 and leave the Protocol: set to its default
$%P then click Query.
The results are displayed in the Query Result: area. *hat were looking for is the $%P
port "#00 status. )n this case, )ve shown the results without port forwarding port 5<++
on my router so the results are that it is 2I($E3E4. This indicates that $ort%ry did not
receive a response from the port.
)f 2I($E3E4, then the VB' connection may be being blocked by your router or your
security software if you werent able to eliminate that as a possibility in the last step Dif
thats the case, refer to the )f 2I($E3E4 section under the security software question
aboveE. There are too many router types for me to cover them all here so see
http"((portforward.com(routers.htm for instruction on how to port forward using the router
you have. Gou want to port forward port 5<++ T'$ traffic to the private )$ address of the
machine you are trying to access from a remote location. Ance port forwarding is set up
properly, rerun the $ort%uery/) query and you should get the following result.
$%P port "#00 status is (I)$E&I&* after adding port forwarding.
Bot all routers allow for a connection using the public )$ address from inside the C9B.
9s a result, it is possible that a 2I($E3E4 response may be received even when
configured properly. )f youve followed the $ort!orward instructions carefully and still
receive the 2I($E3E4 response, you can also check your port forward setup by using
the following link" https"((www.grc.com((portprobe35<++. This uses the Hibson
Iesearch 'orporations -hields/$J /tility. -hields/$J returns a Status of )teat6 when
it does not receive a response from the port. The VB' connection may be being blocked
by your router or your security software if you werent able to eliminate that as a
possibility in the last step Dif thats the case, refer to the )f 2I($E3E4 section under the
security software question aboveE. -hields/$J returns a Status of 'PE&7 when it
receives a response from the port so the router has been properly configured. -hields/$J
returns a Status of %osed when the port has been forwarded to a $', but the /ltraVB'
server software is not currently listening on that $'.
Is connection being blocked by the firewall or proxy at the
remote location?
9t this point were sure that everything is set up properly at home so if you still have
problems connecting, then the only other possibility is something on the network of the
$' running the /ltraVB' viewer.
)t may be possible to resolve this by modifying the port from the default 5<++. -ome
corporate firewalls only allow internet traffic on a very small number of ports so you may
be limited to ports 4+ and ;;.. )n addition, some corporate firewalls require all outgoing
traffic to be routed through a proy. Tunneling the VB' traffic through a secure shell as
described in http"((forum.ultravnc.info(viewtopic.php2t354<+ is another possible means
of getting rid of the dreaded #!ailed to connect to serverJ1 error.

Potrebbero piacerti anche