Giter Club home page Giter Club logo

Comments (9)

chrelad avatar chrelad commented on May 30, 2024

Forgot to tell you the version of noVNC I'm using, it's 40a653f from 2010-12-16 14:04.

from novnc.

chrelad avatar chrelad commented on May 30, 2024

I tried increasing the verbosity of the server logging and got the following when trying to connect (RDP session active).

[2540] 2010-12-17 08:30:55 @ write() function stopped because transport has not been initialized yet.
[2720] 2010-12-17 08:30:55 - Try to start ""C:\Program Files\TightVNC\tvnserver.exe" -desktopserver -logdir "C:\Documents and Settings\All Users\Application Data\TightVNC" -loglevel 4 -shmemname Global\hwecfbfepmrvehpacbvw" process as current user at 0 session
[2720] 2010-12-17 08:30:55 - Created ""C:\Program Files\TightVNC\tvnserver.exe" -desktopserver -logdir "C:\Documents and Settings\All Users\Application Data\TightVNC" -loglevel 4 -shmemname Global\hwecfbfepmrvehpacbvw" process at 0 windows session
[2540] 2010-12-17 08:30:55 - ReconnectingChannel was successfully reconnected.
[2540] 2010-12-17 08:30:55 - reload WinDesktop configuration
[2540] 2010-12-17 08:30:55 - View only = 0
[2540] 2010-12-17 08:30:55 - get frame buffer properties
[2540] 2010-12-17 08:30:55 - File transfer is not allowed
[2540] 2010-12-17 08:30:55 - Entering RFB initialization phase 2
[2728] 2010-12-17 08:30:55 - update detected
[2728] 2010-12-17 08:30:55 - update detected
[2728] 2010-12-17 08:30:55 - update detected
[2508] 2010-12-17 08:30:55 - WinDesktop thread started
[2508] 2010-12-17 08:30:55 - nobody is ready for updates
[2540] 2010-12-17 08:30:55 @ Connection will be closed: Failed to send data to socket.
[2540] 2010-12-17 08:30:55 + Connection has been closed
[2424] 2010-12-17 08:30:55 - Starting update sender thread for client #4
[2540] 2010-12-17 08:30:55 - Deleting WinDesktop
[2508] 2010-12-17 08:30:55 - WinDesktop thread stopped
[2728] 2010-12-17 08:30:55 @ Anonymous pipe read() function failed (The pipe has been ended. (109))
[2728] 2010-12-17 08:30:55 @ The DesktopServerApplication dispatcher has failed with error: The ReconnectingChannel::read() function failed.
[2728] 2010-12-17 08:30:55 @ onAbnormalDesktopTerminate() called
[2728] 2010-12-17 08:30:55 @ Forced closing of pipe conections
[2540] 2010-12-17 08:30:55 - WinDesktop deleted
[2680] 2010-12-17 08:30:55 + Connection has been closed

from novnc.

kanaka avatar kanaka commented on May 30, 2024

Unfortunately, while the debug from tightvncserver is quite verbose (and thank you for going to the effort), it's not actually giving much info about the handshake with noVNC.

Can you connect successfully with a normal VNC client to the VNC port (5903 in your example)? If that works, then the next step would be to turn on debugging (&logging=debug added to the noVNC URL query string) in noVNC (visible in Chrome's Javascript console or the firebug extension for firefox). The debug output from noVNC will give me a better idea what step in the negotiation/handshake the failure is happening.

from novnc.

chrelad avatar chrelad commented on May 30, 2024

Hi kanaka,

Thanks for the quick reply. I'll give the normal client a shot and report back.

from novnc.

chrelad avatar chrelad commented on May 30, 2024

Okay, I tried to connect with tightvnc using the following command:

{myname}@{hostname}:~ $ vncviewer {tightvncserver}:5903
Connected to RFB server, using protocol version 3.8
Enabling TightVNC protocol extensions
Performing standard VNC authentication
Password:
Authentication successful
Desktop name "{hostnameofvncserver}"
VNC server default format:
32 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Warning: Cannot convert string "--helvetica-bold-r---16-------" to type FontStruct
Using default colormap which is TrueColor. Pixel format:
32 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Using shared memory PutImage

Worked great... I then tried again to connect using the following command with noVNC:

{myname}@{hostname}:~/src/noVNC $ utils/launch.sh --vnc {tightvncserver}:5903
Starting webserver on port 6080
Started webserver (pid: 30406)
Starting WebSockets proxy on port 6081
Waiting for connections on :6081
Started WebSockets proxy (pid: 30409)

When I enter my password and click connect I get the following output in the JavaScript console (Chromium):

New state 'loaded', was 'disconnected'. Msg: noVNC ready: native WebSockets, createImageData rendering
util.js:71New state 'connect', was 'loaded'.
util.js:71New state 'ProtocolVersion', was 'connect'. Msg: Starting VNC handshake
util.js:71New state 'Security', was 'ProtocolVersion'. Msg: Sent ProtocolVersion: 003.008
util.js:71New state 'Authentication', was 'Security'. Msg: Authenticating using scheme: 2
util.js:71New state 'SecurityResult', was 'Authentication'.
util.js:71New state 'ClientInitialisation', was 'SecurityResult'. Msg: Authentication OK
util.js:71New state 'ServerInitialisation', was 'ClientInitialisation'. Msg: Authentication OK
util.js:72New state 'failed', was 'ServerInitialisation'. Msg: Invalid server initialisation
util.js:72Received onclose while disconnected
util.js:71New state 'failed', was 'failed'.

I'll try again with the querystring arguments you mentioned.

from novnc.

chrelad avatar chrelad commented on May 30, 2024

Here's the JavaScript console output when logging=debug is appended to the querystring:

RFB.constructor
util.js:69>> Canvas.init
util.js:69Browser: webkit 534.16
util.js:70Canvas supports imageData
util.js:70Using Canvas createImageData
util.js:70Prefering javascript operations
util.js:70Data URI scheme cursor supported
util.js:69<< Canvas.init
util.js:70Using native WebSockets
util.js:71New state 'loaded', was 'disconnected'. Msg: noVNC ready: native WebSockets, createImageData rendering
util.js:69<< RFB.constructor
util.js:71New state 'connect', was 'loaded'.
util.js:69>> RFB.init_ws
util.js:70connecting to ws://{hostname}:6081/
util.js:69<< RFB.init_ws
util.js:69>> WebSocket.onopen
util.js:71New state 'ProtocolVersion', was 'connect'. Msg: Starting VNC handshake
util.js:69Clearing connect timer
util.js:69<< WebSocket.onopen
util.js:70Server ProtocolVersion: 003.008
util.js:71New state 'Security', was 'ProtocolVersion'. Msg: Sent ProtocolVersion: 003.008
util.js:69Server security types: 2,16
util.js:71New state 'Authentication', was 'Security'. Msg: Authenticating using scheme: 2
util.js:71New state 'SecurityResult', was 'Authentication'.
util.js:71New state 'ClientInitialisation', was 'SecurityResult'. Msg: Authentication OK
util.js:71New state 'ServerInitialisation', was 'ClientInitialisation'. Msg: Authentication OK
util.js:70Closing WebSocket connection
util.js:72New state 'failed', was 'ServerInitialisation'. Msg: Invalid server initialisation
util.js:69>> WebSocket.onclose
util.js:72Received onclose while disconnected
util.js:69<< WebSocket.onclose
util.js:71New state 'failed', was 'failed'.

from novnc.

kanaka avatar kanaka commented on May 30, 2024

I just pushed 318d473 which I think should address the issue. I don't have a Windows system to run tightvncserver on, but I think the issue is that the server is sending a fragmented ServerInitialization message and noVNC isn't handling it correctly. This changed should make it tolerate it better.

from novnc.

kanaka avatar kanaka commented on May 30, 2024

Made a mistake in the first commit, try this one:
fce6ac5

from novnc.

chrelad avatar chrelad commented on May 30, 2024

I just did a pull and things started working fine. Thanks for the hard work on this project kanaka :) This is going to replace RDP for me now!

from novnc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.