YunoHost-Apps / guacamole_ynh

Apache Guacamole package for YunoHost
https://guacamole.apache.org/
Apache License 2.0
10 stars 16 forks source link

WebSocket tunnel to guacd failed: Connection refused #19

Open philippstappert opened 2 years ago

philippstappert commented 2 years ago

I cannot use Guacamole as it always gives me the following error:

Screenshot 2022-01-29 143134

When looking into the logs, i see the following error (in tomcat log):

Jan 29 14:32:17 guacamole-tomcat9[27445]: 14:32:17.452 [http-nio-8080-exec-6] ERROR o.a.g.w.GuacamoleWebSocketTunnelEndpoint - Creation of WebSocket tunnel to guacd failed: java.net.ConnectException: Connection refused (Connection refused)
Jan 29 14:32:17 guacamole-tomcat9[27445]: 14:32:17.529 [http-nio-8080-exec-7] ERROR o.a.g.s.GuacamoleHTTPTunnelServlet - HTTP tunnel request failed: java.net.ConnectException: Connection refused (Connection refused)

Even on a fresh yunohost and guacamole install i can reproduce this issue.

I already tried to fix it by changing things in guacamole.properties but that didn't help. I opened the port 4822 manually but that didn't help too.

Logs

https://paste.yunohost.org/iwehifixip - guacamole-tomcat https://paste.yunohost.org/repocezizi - guacamole-guacd https://paste.yunohost.org/raw/filorumoqo - installation

dvlahakis commented 2 years ago

I have the same error. Any solutions?

rauschgiftengel commented 2 years ago

The reason for this error is that the guacamole web app (tomcat) tries to connect to the guacd service wich is not installed within the installation of guacamole in yunohost.

I did that manualy an finaly it works (partly)

Steps i took:

get https://downloads.apache.org/guacamole/1.4.0/source/guacamole-server-1.4.0.tar.gz tar -xvf guacamole-server-1.4.0.tar.gz <-maybe there is a "1" missing, i have no clue why :D cd guacamole-server-1.4.0 <-maybe there is a "1" missing, i have no clue why :D sudo ./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots sudo make sudo make install sudo ldconfig sudo systemctl daemon-reload sudo systemctl start guacd sudo systemctl enable guacd sudo mkdir -p /etc/guacamole/{extensions,lib}

was able to test it with ssh - working, but very slow, also tried it with rdp but connection was rejected by windows (but was an other error than the one above)

Dear YunoHost Devs - really like your approach with Yunnohost, can you please add the installation of ther services in your scripts :)

dvlahakis commented 2 years ago

Thanks, that works! Ssh works as you said, rdp starts connecting to windows if you tick ignore server certificate, but ultimately fails each time with no error, just a reconnect prompt. I did see a banner complaining about unstable connection to the guacamole server, but didn't look further yet.

rauschgiftengel commented 2 years ago

My SSH ist really, REALLY slow, how about yours ? I´ll give it another try the next days: install guacamole with yunnnohost (to get a working nginx file) and then compile the guacd from source and include the web frontend with the actual version ... if this won´t work .. another way could be installing docker (on the same host) get it working, and then include it inside the yunnohost - in the end there are only webpages ^^

dvlahakis commented 2 years ago

I didn't try it, just started it and it connected to ssh. I will do it later though. I have a pi 3+ and it can bog down with yunohost server processes. I have a guacamole docker install on another host, I assume authentication will be separate from yunohost in a docker install unless there is some way to connect them.

dvlahakis commented 2 years ago

I found a fix for the rdp issue (on my rpi 3+). You need to install a couple of packages from debian backports as listed here:

https://community.bitnami.com/t/ova-version-1-3-0-3-rdp-problem-guacd-1-3-0/91414/22

I also created a home/guacamole-guacd owned by that user so freerdp could store config files there.

SSH and rdp connections work at a normal speed, without much lag.

rauschgiftengel commented 2 years ago

Sounds great, i´ll give it a try. Thanks for posting your find ;)

At the moment i use another aproach, (as i have enough resources on my servers AND most of the yunohost-stuff is outdated) i install the yunohost as a base , and most of the "Apps" on other VM or Docker, and use the redirect app from yunohost.

v1k7g85 commented 2 years ago

Same problem on fedora 35

rauschgiftengel commented 2 years ago

I´ve dropped yunohost and went to caprover. Based on Docker, well supported, easy to learn and most important: as it uses docker as a base, everything works fine and you can use every docker image you can find. Sidenote on guacamole: found a better project based on guacamole - guacozy :)

v1k7g85 commented 2 years ago

Thanks for the advice man! Guacozy just started up and works.

YougoCodes commented 2 years ago

I found a fix for the rdp issue (on my rpi 3+). You need to install a couple of packages from debian backports as listed here:

https://community.bitnami.com/t/ova-version-1-3-0-3-rdp-problem-guacd-1-3-0/91414/22

I also created a home/guacamole-guacd owned by that user so freerdp could store config files there.

SSH and rdp connections work at a normal speed, without much lag.

Unfortunately, Bitnami discontinued their forum, redirecting the above link to a GitHub front page. the info that was once there has been donated to /dev/null...

/edit: wayback machine -almost- to the rescue, the thread goes up to post nr 20. post nr 22 isn't there, and no later snapshot is available. https://web.archive.org/web/20210307160124/https://community.bitnami.com/t/ova-version-1-3-0-3-rdp-problem-guacd-1-3-0/91414

thomas-jardinet commented 8 months ago

Hi! Have the same exact issue. From solutions given, have the feeling that it is not solved. Some external posts say that it could be an IPV4 vs IPV6 issue.

tagsoul commented 2 weeks ago

Hello. I've had this error, and another, right after. I've solved those this way:


STEP 1 --> Remove "::1" line from hosts file, to fix the miscommunication about using about ipv4 or ipv6

sudo nano -c /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ---> REMOVE THIS LINE --> ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

Save the file and quit

Restart services. sudo systemctl restart tomcat guacd

Notes: RDP message when trying to connect will change after that. Not good yet though. Something like "Disconnected"


STEP 2 --> Change GUACD service user to 'root' (or to a user that has root access)

sudo nano /etc/systemd/system/guacd.service ---> replace User=daemon with User=root

Save file and quit

Reload daemon and restart Guac sudo systemctl daemon-reload sudo systemctl restart guacd

Should connect now. =D