question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Guacamole protocol violation. Perhaps the version of guacamole-client is incompatible with this version of guacd?

See original GitHub issue

I am having above error when connecting to gucamole .I am trying to connect using vnc protcol and flowing is my setup

`const GuacamoleLite = require('guacamole-lite');
 
const websocketOptions = {
    port: 8080 // we will accept connections to this port 
};
 
const guacdOptions = {
    port: 4822 // port of guacd 
};
 
const clientOptions = {
    crypt: {
        cypher: 'AES-256-CBC',
        key: 'MySuperSecretKeyForParamsToken12'
    }
};
 
const guacServer = new GuacamoleLite(websocketOptions, guacdOptions, clientOptions); `

and for web service

var express = require('express');
var app = express();
app.use('/', express.static(__dirname + '/public')); // ← adjust
var fs = require("fs");
var url = require('url');


app.get('/control', function (req, res) {
   var id = req.query.username;
   res.sendfile("guac_control.html");
})


app.get('/listUsers', function (req, res) {
   var id = req.query.username;

	/*{
    	"connection": {
        "type": "rdp",
        "settings": {
            "hostname": "10.0.0.12",
            "username": "Administrator",
            "password": "pAsSwOrD",
            "enable-drive": true,
            "create-drive-path": true,
            "security": "any",
            "ignore-cert": true,
            "enable-wallpaper": false
        }
    }
}
     config.setProtocol("vnc");
	        config.setParameter("hostname", UserIP);
	        config.setParameter("port", UserPort);
	        config.setParameter("password", "23213");
		 
	
	      //config.setParameter("reverse-connect", "true");
	       config.setParameter("password", "123123");
	        config.setParameter("color-depth", "32");
	       // config.setParameter("encodings", "zrle");
	        //nearly 5 mins
	        //config.setParameter("listen-timeout", "50000");
*/
   var clientConnection= {
    	connection : {
         type: "vnc",
         settings : {
             hostname: "127.0.0.1",
	     username :  "root",
             password : "root123"
        }
    }
}
    
   res.send(encrypt(clientConnection));
})

const crypto = require('crypto');

const clientOptions = {
    cypher: 'AES-256-CBC',
    key: 'MySuperSecretKeyForParamsToken12'
}

const encrypt = (value) => {
    const iv = crypto.randomBytes(16);
    const cipher = crypto.createCipheriv(clientOptions.cypher, clientOptions.key, iv);

    let crypted = cipher.update(JSON.stringify(value), 'utf8', 'base64');
    crypted += cipher.final('base64');

    const data = {
        iv: iv.toString('base64'),
        value: crypted
    };

    return new Buffer(JSON.stringify(data)).toString('base64');
};

var server = app.listen(8081, function () {

  var host = server.address().address
  var port = server.address().port

  console.log("web at http://%s:%s", host, port)

})`

And following are the logs

ay 25 14:47:00 ubuntu guacd[32881]: Protocol "vnc" selected May 25 14:47:00 ubuntu guacd[32881]: Guacamole protocol violation. Perhaps the version of guacamole-client is incompatible with this version of guacd? May 25 14:47:00 ubuntu guacd[32881]: Error reading "connect": Instruction read did not have expected opcode Please help me .

Thank You

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vadimpronincommented, Jun 6, 2017

No reply, so I’m closing the issue. Feel free to reopen if needed

1reaction
vadimpronincommented, May 26, 2017

Ok. One part of the problem was that guacamole-lite didn’t have any default connection parameters for VNC protocol (like height, width, dpi, port, etc). I’ve fixed that in 0.4.4 so please update and see if it works.

Another part is that you haven’t configured hostname and port in your connection settings. Instead you have dest-host and dest-port which are only used if you have vnc repeater.

These are the arguments that guacamole-lite is actually sending to your guacd (as per your log):

     "args" => "",
     "hostname" => "",
     "port" => "",
     "read-only" => "",
     "encodings" => "",
     "password" => "pAsSwOrD",
     "swap-red-blue" => "",
     "color-depth" => "",
     "cursor" => "",
     "autoretry" => "",
     "clipboard-encoding" => "",
     "dest-host" => "10.0.0.12",
     "dest-port" => "5901",
     "reverse-connect" => "",
     "listen-timeout" => "",
     "enable-sftp" => "",
     "sftp-hostname" => "",
     "sftp-port" => "",
     "sftp-username" => "",
     "sftp-password" => "",
     "sftp-private-key" => "",
     "sftp-passphrase" => "",
     "sftp-directory" => "",

As you see hostname and port are empty, but they mustn’t be.

Let me know if the update to 0.4.4 and fixing the parameters will work for you

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML5 gateway session open and close immediately
Mar 6 04:41:04 rl0 guacd[31077]: Guacamole protocol violation. Perhaps the version of guacamole-client is incompatible with this version of guacd?
Read more >
Connection refused between Tomcat and Guacamole ...
guacd[32307 ]: Guacamole protocol violation. Perhaps the version of guacamole-client is incompatible with this version of guacd?
Read more >
Troubleshooting — Apache Guacamole Manual v1.4.0
Usually this means simply that the connection was closed, but it could also indicate that the version of the client in use is...
Read more >
After Upgrade Guacamole 1.3 --> 1.4
Jan 26 09:50:16 remoto guacd[1925]: Guacamole protocol violation. Perhaps the version of guacamole-client is incompatible with this version ...
Read more >
[Support] Linuxserver.io - Guacd - Docker Containers
Perhaps the version of guacamole-client is incompatible with this version of guacd? guacd[259]: ERROR: Guacamole protocol violation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found