Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket tunnel to guacd failed: Connection refused #19

Open
philippstappert opened this issue Jan 29, 2022 · 13 comments
Open

WebSocket tunnel to guacd failed: Connection refused #19

philippstappert opened this issue Jan 29, 2022 · 13 comments

Comments

@philippstappert
Copy link

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
Copy link

I have the same error. Any solutions?

@rauschgiftengel
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link

v1k7g85 commented Jun 2, 2022

Same problem on fedora 35

@rauschgiftengel
Copy link

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
Copy link

v1k7g85 commented Jun 2, 2022

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

@YougoCodes
Copy link

YougoCodes commented Aug 25, 2022

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
Copy link

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
Copy link

tagsoul commented Nov 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants