Guacamole protocol violation. Perhaps the version of guacamole-client is incompatible with this version of guacd?
See original GitHub issueI 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:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No reply, so I’m closing the issue. Feel free to reopen if needed
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):
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