0

I went through the documentation and was kind of disturbed by it going straight from installing, to configuring: https://guacamole.incubator.apache.org/doc/gug/configuring-guacamole.html

It starts talking about things like GUACAMOLE_HOME in the guacamole.properties, but I don't really feel like it was ever clearly explained where those things should be stored, or defined. I am actually not sure if those are to configure the server, or the client. Because of that, I am not sure if I should be restarting the guacd service, or the tomcat8 service once making changes, or where I should be looking in log files to diagnose.

According to the documentation:

    GUACAMOLE_HOME

    Guacamole reads files from its own configuration directory by default,
 resorting to the classpath only when this directory cannot be found. When
 locating this directory, Guacamole will try, in order:

        The directory specified within the system property guacamole.home.

        The directory specified within the environment variable GUACAMOLE_HOME.

        The directory .guacamole, located within the home directory of 
        the user running the servlet container

.

I installed the service as root, so I am not sure if I am supposed to be placing those files in the /root/.guacamole folder, or if I should make a /home/tomcat8/.guacamole folder?

I am very new to tomcat, I am an apache admin for the past 20 years, so there are some things that are puzzling me. I used grep to search the code base, and couldn't find GUACAMOLE_HOME or a reference to guacamole.properties to try getting more of an idea what to do.

All this really seemed like something that should be done through the installation script, but since it wasn't I used this script on Github: https://github.com/MysticRyuujin/guac-install/blob/master/guac-install.sh

In troubleshooting, I was able to connect to the Tomcat server on :8080, but I couldn't get Guacamole to show up on port :4822. I copied the files into the /var/lib/tomcat8/webapps/ROOT/ directory and was able to get it to work on port 8080, but it bothers me that it isn't honoring the things in the /etc/guacamole/guacamole.properties file that was created in the github script:

# Hostname and port of guacamole proxy
guacd-hostname: localhost
guacd-port: 4822    

I opened the ports using:

iptables -I INPUT -p tcp -m tcp --dport 4822 -j ACCEPT

Are there configuration files inside the /var/lib/tomcat8/webapps/ROOT that I should be looking at? How do I know which guacamole.properties file is being used, or if maybe it is just pulling some default settings from somewhere and maybe it doesn't see the file at all?

Update

I made a few changes to the source and rebuilt:

src/guacd/conf-file.c

conf->bind_host = "guachost";
conf->bind_port = strdup("4822");
conf->pidfile = NULL;        
conf->foreground = 0;                 
conf->max_log_level = GUAC_LOG_INFO;

src/guacd/man/guacd.conf.5

[server]

bind_host = guachost 
bind_port = 4822    

I then placed an entry in the /etc/hosts file to see if it would work. Now when I start the service, I can see in the /var/log/syslog file:

Nov 29 10:32:15 cessna systemd[1]: Starting LSB: Guacamole proxy daemon...
Nov 29 10:32:15 cessna guacd[27692]: Guacamole proxy daemon (guacd) version 0.9.9 started
Nov 29 10:32:15 cessna guacd[27689]: Starting guacd: guacd[27692]: INFO:#011Guacamole proxy daemon (guacd) version 0.9.9 started
Nov 29 10:32:15 cessna guacd[27689]: SUCCESS
Nov 29 10:32:15 cessna systemd[1]: Started LSB: Guacamole proxy daemon.
Nov 29 10:32:15 cessna guacd[27694]: Listening on host 192.168.1.25, port 4822

where before it always said it was 127.0.0.1, but I still can't connect to the web interface on that port. I am not sure now if this is a Tomcat issue to tell Tomcat to listen on 4822, or something in the guacamole setup. I can still access it at :8080, but I want to have control of it instead of just letting it decide what ever it wants. Ideally it would listen on all interfaces / ip addresses and filter by port.

Alan
  • 2,046
  • 2
  • 20
  • 43

1 Answers1

0

Maybe this is new to this version, but I found that there was supposed to be a file: /etc/guacamole/guacd.conf and that is where you specify host and port for the service.

#
# guacd configuration file
#

[daemon]

pid_file = /var/run/guacd.pid
log_level = info

[server]

bind_host = localhost
bind_port = 4822

#
# The following parameters are valid only if
# guacd was built with SSL support.
#

[ssl]

server_certificate = /etc/ssl/certs/guacd.crt
server_key = /etc/ssl/private/guacd.key

If you made the changes I did above to the source, you will need to undo that or you can't specify the bind_host.

I modified the setup script and added a load of instructions to the end of the script to help setup Tomcat and Apache.

https://github.com/ajhalls/Server-Setup-Scripts/blob/master/Guacamole-Setup.sh

Alan
  • 2,046
  • 2
  • 20
  • 43