<div dir="ltr"><div>Hi All,<br><br></div>We are waiting for your suggestions or comments on the same. If anyone knows, please help us to sort out this issue.<br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">
<span>-- <br></span>Regards
<br>Shanil
</div></div>
<br><br><div class="gmail_quote">On Tue, Jul 15, 2014 at 3:55 PM, Shanil S <span dir="ltr">&lt;<a href="mailto:xielesshanil@gmail.com" target="_blank">xielesshanil@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi All,<br><div><br>We want to access vm console by using noVNC and Rest api. We are using websocket proxy on the same machine where engine runs and we try to get the console access from the another server that is outside from this cluster. 
<br> <br>But when we try to connect the vnc_auto.html from the server using host ip, port and the password which we get from the ticket creation… it shows a Failed to connect to server (code: 1006).
<br> <br>The following are the codes which we use to create the ticket… host,port and the password will get from the ticket and with the same details (host,port &amp; password) we are able to connect the console using the vnc clients(TigerVNC etc.) 
<br> <br>try {
<br>                var host = WebUtil.getQueryVar(&#39;host&#39;, &#39;&lt;?php echo $host?&gt;&#39;);
<br>                var port = WebUtil.getQueryVar(&#39;port&#39;, &#39;&lt;?php echo $port?&gt;&#39;);
<br>  var path = WebUtil.getQueryVar(&#39;path&#39;, &#39;websockify&#39;);
<br>                
<br>  var password = &#39;&lt;?php echo $password?&gt;&#39;;
<br> <br>        if ((!host) || (!port)) {
<br>                    updateState(&#39;failed&#39;,
<br>                        &quot;Must specify host and port in URL&quot;);
<br>                    return;
<br>                }
<br> <br>                rfb = new RFB({&#39;target&#39;:       $D(&#39;noVNC_canvas&#39;),
<br>                           &#39;encrypt&#39;:      WebUtil.getQueryVar(&#39;encrypt&#39;,
<br>                                   (window.location.protocol === &quot;https:&quot;)),
<br>                           &#39;true_color&#39;:   WebUtil.getQueryVar(&#39;true_color&#39;, true),
<br>                           &#39;local_cursor&#39;: WebUtil.getQueryVar(&#39;cursor&#39;, true),
<br>                           &#39;shared&#39;:       WebUtil.getQueryVar(&#39;shared&#39;, true),
<br>                           &#39;view_only&#39;:    WebUtil.getQueryVar(&#39;view_only&#39;, false),
<br>                           &#39;updateState&#39;:  updateState,
<br>                           &#39;onPasswordRequired&#39;:  passwordRequired});
<br>                           rfb.connect(host, port, password, path);
<br>            }catch(e) {alert(e);
<br> <br> <br>Could you please check if there any issues with it and guide me how to get rid of this failed to connect error?
<br> <br>I have attached the screen shots for further reference…
<br><span class="HOEnZb"><font color="#888888"><br clear="all"><div><div dir="ltr"><span>-- <br></span>Regards
<br>Shanil
</div></div>
</font></span></div></div>
</blockquote></div><br></div>