Problem
When creating an exam, you get a status code 504 error in the UMC and it’s not possible to create the exam successfully.
This error can occur if you are using a reverse proxy server such as Nginx or HAproxy to allow connections to the nodes from outside the domain.
Investigation
If there is a large number of users in a class or a high number of Windows clients, this error may occur.
The decisive factor here is the size of the data volume generated by the number of objects transferred through the proxy. If the transfer of the entire data set is not completed within the specified time, the proxy will return a 504 timeout at this point. Therefore, the error can be found in the logs of the reverse proxy.
The error will be passed through the UMC and will therefore be displayed as a 504 error, as it originates from the reverse proxy.
The actual error in the UMC appears as a 502 in /var/log/apache2/error.log.
192.168.xxx.xxx - - [11/Oct/2024:15:54:54 +0200] "POST /univention/command/schoolexam/exam/start HTTP/1.1" 502 646 "https://portal.test.de/univention/management/?header=try-hide&overview=false&menu=false" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:
Possible Configuration
The nginx configuration could look like this:
location /univention/command/schoolexam/exam/ {
proxy_pass https://10.1.1.3/univention/command/schoolexam/exam/;
proxy_connect_timeout 600s;
proxy_read_timeout 600s;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forward-Proto $scheme;
proxy_set_header X-Nginx-Proxy true;
proxy_buffering off;
proxy_max_temp_file_size 0;
proxy_redirect off;
}
location / {
proxy_pass https://10.1.1.3/;
Thx to @DirkS
Solution
You will need to increase the timeout settings on the reverse proxy. In my case nginx was used as the reverse proxy and the default setting is 60 seconds. Increasing the setting to 120 seconds or 180 seconds will solve this problem.
