Nick,

the distribution is RHEL 7.4:

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.4 (Maipo)

I'm using openjdk:

# java -version
openjdk version "1.8.0_144"
OpenJDK Runtime Environment (build 1.8.0_144-b01)
OpenJDK 64-Bit Server VM (build 25.144-b01, mixed mode)

SELinux was enabled but I've now completely disabled it and rebooted
the
machine:

# getenforce
Disabled

This change has no effect on the behavior.

I looked a bit in the Guacamole code and found the place where it tries
to read the guacamole.properties file
(guacamole-
ext/src/main/java/org/apache/guacamole/environment/LocalEnvironment.jav
a). I've added debug statements to understand what happens:

> > > 

        // Read properties
        properties = new Properties();
        try {

            InputStream stream = null;

            // If not a directory, load from classpath
            if (!guacHome.isDirectory())
            {
                stream =
LocalEnvironment.class.getResourceAsStream("/guacamole.properties");
            }
            // Otherwise, try to load from file
            else {
                File propertiesFile = new
File(guacHome,"guacamole.properties");
logger.info("FW: The file name is:"+propertiesFile.getAbsolutePath());
                if (propertiesFile.exists())
                {
                    stream = new FileInputStream(propertiesFile);
logger.info("FW: The file exists:"+propertiesFile.getName()+"\n");
                }
            }

<<<<

The output I get in /var/log/messages is:

INFO  o.a.g.environment.LocalEnvironment - FW: The file name
is:/etc/guacamole/guacamole.properties

INFO  o.a.g.environment.LocalEnvironment - No guacamole.properties file
found within GUACAMOLE_HOME or the classpath. Using defaults.

So even though the file /etc/guacamole/guacamole.properties exists, the
propertiesFile.exists() call returns false for some reason. And
probably
the same is true for the user-mapping.xml file. So I wonder whether
this
might be a problem in openjdk. Is guacamole usually working better with
a proprietary Java version?



On Wed, 2017-10-18 at 12:28 -0400, Nick Couchman wrote:
> On Wed, Oct 18, 2017 at 8:30 AM, Felix Wolfheimer
> <[email protected]> wrote:
>         Hi Nick,
>         
>         
>         thanks for your help and your suggestions. I
>         created /etc/guacamole and put guacamole.properties into this
>         directory. The file has the following content:
>         
>         
>         guacd-hostname: localhost
>         
>         guacd-port:     4822
>         user-mapping: /etc/guacamole/user-mapping.xml
>         
>         
>         I also put my user-mapping.xml file into this directory (same
>         content as before). I added the line
>         "guacamole.home=/etc/guacamole"
>         to /etc/tomcat/catalina.properties and restarted tomcat. The
>         permissions of the /etc/guacamole directory and its files
> were
>         set such that tomcat can access all files (tomcat.root, 400).
>         Looking at /var/log/messages after the restart reveals the
>         following lines which might be related to the issue:
> 
> 
> 
> 
> Felix,
> What Linux distro/version are you running?  Is SELinux enabled
> (output
> of "getenforce" command)?
> 
> 
> -Nick 


Reply via email to