After upgrade to 4.2: Can't open management console

ucs-4-2

#1

I have just upgraded our test system to UCS 4.2.
After the upgrade and a reboot, I can no longer connect to the management console.
I checked the service status using the terminal and found out that apache2 couldn’t start any more.
I fixed that by removing the offending “LockFile” directive from /etc/apache2/apache2.conf. (Seems related to differences between Apache 2.2 and 2.4)
Now Apache can be started, but the management console still doesn’t run.
In the browser I see the following error:
The path '/index.html' was not found. Webfrontend-Fehler: Die angegebene Anfrage ist nicht bekannt. The path '/index.html' was not found.

I also checked the log file
/var/log/univention/management-console-web-server.log
which contains the following stacktrace:
06.04.17 15:12:50.592 MAIN ( ERROR ) : Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 670, in respond response.body = self.handler() File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 217, in __call__ self.body = self.oldhandler(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/cherrypy/_cperror.py", line 411, in __call__ raise self NotFound: (404, "The path '/index.html' was not found.")

How can I fix this?

Best regards
Florian


#2

Can you paste the URL you are trying to reach (to get to the management console)?


#3

I have tried the URL http://10.1.1.95/ (which is the IP address of the test server).
This one automatically redirects to http://10.1.1.95/univention/ which then shows the error message described above.


#4

Hi!

What is the join status of the machine, i.e., what is the output of univention-check-join-status?

Can you show which files can be found below /etc/apache2 via the following command ls -l /etc/apache2/{.,sites-*} ? It might be that there are conflicts with older files.


#5

The machine has perfect join status
root@domserver:~# univention-check-join-status Joined successfully
The following sites are listed
`root@domserver:~# ls -l /etc/apache2/{.,sites-*}
/etc/apache2/.:
insgesamt 104
-rw-r–r-- 1 root root 9644 Apr 6 15:10 apache2.conf
-rw-r–r-- 1 root root 7115 Jul 20 2016 apache2.conf.dpkg-dist
drwxr-xr-x 2 root root 4096 Apr 6 14:36 conf-available
drwxr-xr-x 3 root root 4096 Apr 6 15:11 conf.d
drwxr-xr-x 2 root root 4096 Apr 6 14:36 conf-enabled
-rw-r–r-- 1 root root 1782 Jul 5 2016 envvars
-rw-r–r-- 1 root root 31063 Mai 25 2014 magic
drwxr-xr-x 2 root root 12288 Apr 6 14:31 mods-available
drwxr-xr-x 2 root root 4096 Apr 6 14:31 mods-enabled
-rw-r–r-- 1 root root 437 Apr 6 14:31 ports.conf
-rw-r–r-- 1 root root 320 Jul 5 2016 ports.conf.debian
drwxr-xr-x 2 root root 4096 Apr 7 07:08 sites-available
drwxr-xr-x 2 root root 4096 Apr 6 14:42 sites-enabled
drwxr-xr-x 2 root root 4096 Apr 6 14:38 ucs-sites.conf.d

/etc/apache2/sites-available:
insgesamt 44
-rw-r–r-- 1 root root 728 Apr 7 07:08 000-default.conf
-rw-r–r-- 1 root root 722 Jan 18 09:08 000-default.conf.debian
-rw-r–r-- 1 root root 1332 Jul 5 2016 000-default.conf.dpkg-new
-rw-r–r-- 1 root root 1390 Apr 7 07:08 default-ssl.conf
-rw-r–r-- 1 root root 1344 Jan 18 09:08 default-ssl.conf.debian
-rw-r–r-- 1 root root 6437 Jul 20 2016 default-ssl.conf.dpkg-new
-rw-r–r-- 1 root root 3703 Apr 6 14:39 univention.conf
-rw-r–r-- 1 root root 555 Apr 6 14:38 univention-directory-manager.conf
-rw-r–r-- 1 root root 2153 Apr 6 14:39 univention-proxy.conf
-rw-r–r-- 1 root root 1715 Apr 6 14:38 univention-saml.conf

/etc/apache2/sites-enabled:
insgesamt 0
lrwxrwxrwx 1 root root 35 Apr 6 13:58 000-default.conf -> …/sites-available/000-default.conf
lrwxrwxrwx 1 root root 35 Apr 6 14:31 default-ssl.conf -> …/sites-available/default-ssl.conf
lrwxrwxrwx 1 root root 34 Apr 6 14:39 univention.conf -> …/sites-available/univention.conf
lrwxrwxrwx 1 root root 39 Apr 6 14:38 univention-saml.conf -> …/sites-available/univention-saml.conf`


#6

This is the output that I get on an updated UCS 4.2 test machine:

root@ucs-3542:~# ls -l /etc/apache2/{.,sites-*}
/etc/apache2/.:
insgesamt 92
-rw-r--r-- 1 root root  7115 Jul 20  2016 apache2.conf
drwxr-xr-x 2 root root  4096 Apr  3 11:45 conf-available
drwxr-xr-x 2 root root  4096 Apr  3 11:43 conf.d
drwxr-xr-x 2 root root  4096 Apr  3 11:45 conf-enabled
-rw-r--r-- 1 root root  1782 Jul  5  2016 envvars
-rw-r--r-- 1 root root 31063 Mai 25  2014 magic
drwxr-xr-x 2 root root 12288 Apr  3 11:43 mods-available
drwxr-xr-x 2 root root  4096 Apr  3 21:06 mods-enabled
-rw-r--r-- 1 root root   437 Apr  3 11:43 ports.conf
-rw-r--r-- 1 root root   320 Jul  5  2016 ports.conf.debian
drwxr-xr-x 2 root root  4096 Apr  3 21:06 sites-available
drwxr-xr-x 2 root root  4096 Apr  3 21:06 sites-enabled
drwxr-xr-x 2 root root  4096 Apr  3 11:47 ucs-sites.conf.d

/etc/apache2/sites-available:
insgesamt 52
-rw-r--r-- 1 root root  728 Apr  3 12:09 000-default.conf
-rw-r--r-- 1 root root  692 Dez 22  2014 000-default.conf.debian
-rw-r--r-- 1 root root 1332 Jul  5  2016 000-default.conf.dpkg-new
-rw-r--r-- 1 root root 1406 Apr  3 12:09 default-ssl.conf
-rw-r--r-- 1 root root 1360 Jan  9 15:42 default-ssl.conf.debian
-rw-r--r-- 1 root root 6437 Jul 20  2016 default-ssl.conf.dpkg-new
-rw-r--r-- 1 root root 1375 Apr  3 21:06 localhost.conf
-rw-r--r-- 1 root root 3739 Apr  3 11:47 univention.conf
-rw-r--r-- 1 root root  555 Apr  3 11:47 univention-directory-manager.conf
-rw-r--r-- 1 root root 2170 Apr  3 11:47 univention-proxy.conf
-rw-r--r-- 1 root root 1760 Apr  3 11:47 univention-saml.conf
-rw-r--r-- 1 root root   70 Mär 28 19:34 univention-self-service.conf

/etc/apache2/sites-enabled:
insgesamt 0
lrwxrwxrwx 1 root root 35 Apr  3 11:41 000-default.conf -> ../sites-available/000-default.conf
lrwxrwxrwx 1 root root 35 Apr  3 11:43 default-ssl.conf -> ../sites-available/default-ssl.conf
lrwxrwxrwx 1 root root 33 Apr  3 21:06 localhost.conf -> ../sites-available/localhost.conf
lrwxrwxrwx 1 root root 34 Apr  3 11:47 univention.conf -> ../sites-available/univention.conf
lrwxrwxrwx 1 root root 39 Apr  3 11:47 univention-saml.conf -> ../sites-available/univention-saml.conf
lrwxrwxrwx 1 root root 47 Apr  3 11:46 univention-self-service.conf -> ../sites-available/univention-self-service.conf
root@ucs-3542:~#

It seems that there have been manual changes in the old apache2.conf file. As there have been changes to that config file, dpkg has not touched it. Instead, the new apache2.conf file has been placed aside with the suffix .dpkg.dist. The easiest way is to extract and move your custom configurations into an extra file below sites-available/, rename apache2.conf.dpkg-dist to apache2.conf, and activate your custom configuration via

a2ensite <customConfigFile>
systemctl reload apache2

Hope that helps.


#7

Yes, that helped. Thank you.
However, one more question for that:
I think the problem is partially due to the update process in UCS, which is not interactive. That means one isn’t made aware of this kind of problems, which will happen when major upgrades are installed.
With a basic Debian installation one would run the dist-upgrade from a terminal and get a prompt when config files need to be replaced.
Is it possible to do the same with an UCS installation?


#8

Glad to hear that it helped :slight_smile: .

Well, for either way (interactive or not) you have pros and cons. Yes, you are right in the sense that you will not be notified about manual changes in config files it can be seen as problematic.

I would not recommend trying to run an interactive update as most update processes are tailored towards the non-interactive case. Instead I would recommend trying to leave config files untouched where possible and using config directories such as the ones mentioned for apache.

Otherwise, run a find /etc -name "*.dist-dpgk" after the update.


#9

Thank you for the explanation. I will try to use the config directories where possible. Also, the find command you mentioned is helpful.