Skip to main content

PMAD – Guacamole does not work or the remote connection fails

Applies to: Medulla server
Version: 5.5 and higher
Environment: On-Premise
Category: PMAD / Guacamole / Diagnostics

If remote control (PMAD) via Guacamole does not work or if the remote connection fails, even though Guacamole is correctly installed and accessible, it is recommended to first check the configuration of the authorized HTTP Referer.

This issue can occur, in particular, when the FQDN configured in Apache does not match the URL actually used to access Medulla.


1. Check the Referer configured for Guacamole

On the Medulla server, check the Apache configuration files related to Guacamole:

/etc/apache2/conf-enabled/guacamole*.conf

Look for lines containing the following directive:

SetEnvIf Referer "^https?://<fqdn_in_use>/" GUACAMOLE_ALLOWED

The FQDN specified in this directive must match the URL actually used by users to access Medulla.

Example

If users access Medulla using the address:

https://medulla.exemple.fr

the configuration must allow this FQDN, for example:

SetEnvIf Referer "^https?://medulla\.exemple\.fr/" GUACAMOLE_ALLOWED

Important:
This directive appears twice in each of the relevant files. Check and, if necessary, correct both instances.


2. Verify the Apache configuration

After modifying the configuration, check its syntax before reloading Apache:

apache2ctl configtest

If the configuration is correct, the command should return:

Syntax OK

You can then reload Apache:

systemctl reload apache2

Caution:
Do not reload Apache if apache2ctl configtest returns an error. First correct the configuration indicated by the command.


3. Check for a reverse proxy

If Medulla is deployed behind a reverse proxy, verify that the reverse proxy correctly passes the HTTP header:

Referer

Guacamole uses this header to verify that the request comes from an authorized Medulla URL.

If the reverse proxy removes, replaces, or modifies the Referer, the PMAD may be rejected even if the Guacamole configuration on the Medulla server is correct.

You must therefore verify that the reverse proxy preserves and forwards the original Referer header to the Medulla server.

Note:
This check is particularly important when the public URL used to access Medulla differs from the name or address used between the reverse proxy and the Medulla server.


4. Retest the PMAD

After correcting the configuration:

  1. log back into the Medulla interface;
  2. select an online computer;
  3. restart a remote control session;
  4. verify that the Guacamole interface opens correctly and that the remote connection can be established.

5. Things to check

If the problem persists, check the following first:

  • that the FQDN in guacamole*.conf exactly matches the FQDN used to access Medulla;
  • that the two instances of SetEnvIf Referer have been checked and corrected in each of the relevant files;
  • that the protocol and FQDN used are authorized by the expression ^https?://...;
  • that the reverse proxy does not remove or modify the Referer header;
  • that the Apache configuration is valid when tested with apache2ctl configtest;
  • that Apache has been successfully reloaded after the change.

6. Summary

Check Verification
Medulla version 5.5 and higher
Environment On-Premise
Guacamole configuration /etc/apache2/conf-enabled/guacamole*.conf
FQDN Must match the URL used to access Medulla
Directive SetEnvIf Referer
Instances Check both instances in each of the relevant files
Reverse proxy Must forward the Referer header
Apache validation apache2ctl configtest
Apache reload systemctl reload apache2

Recommendation:
When a PMAD connection via Guacamole fails on a Medulla On-Premise installation, first verify that the FQDN used to access Medulla matches the Referer allowed in Guacamole’s Apache configuration. If a reverse proxy is used, also ensure that it correctly passes the HTTP Referer header.