one melo a day

moon indicating dark mode
sun indicating light mode

DSM 6 Adventures: Restoring Tomcat

May 01, 2016

Finally here it is, the third post in my DSM 6 Adventures series. I described what went wrong during the update and the required steps I took to get this blog up and running again. This time it is Tomcat’s turn. In case you run Tomcat 7 and plan to update to DSM 6, read along and prepare to backup some configuration files.

What the update will wipe

I am going to make this quick, since I do not know any means to prevent the loss of Tomcat configuration files during the update. So I will just summarize the files you need to backup, so you can restore your settings after the update, instead of restarting from scratch. Here is the list of files that got lost during my update from DSM 5.2 to 6.0: The web.xml file, which for me is located in /volume1/@appstore/Tomcat7/src/webapps/manager/WEB-INF/ got lost. I edited the max-file-size attribute in there to host Jenkins. The context.xml in /volume1/@appstore/Tomcat7/src/conf/ got lost, too. This is where I configure the environment variables that declare the path to the home folders for my Jenkins and GitBlit installations. Last file you want to back up is the server.xml, which I found in /volume1/@appstore/Tomcat7/src/conf/ . This is were I defined the encoding and HTTPS for the port 8443 connector in the past and where I define the encoding and reverse proxy attributes in the port 7070 connector at the moment.

Be sure to backup

These are the 3 files I lost during the update (while others were preserved for some reason1) and since I made some necessary changes to them, losing them during the update made quite a difference. However I can not guarantee that these are the only 3 files that get wiped by the update. So if you have modified other configuration files, be on the safe side and add them to your backup, too. Also, if you noticed other files getting lost during the update, feel free to share in the comments.

Upcoming

Next post in line for this DSM 6 Adventures series will be about Piwik, since the DSM 6 update messed with that, too. After that one I will have something positive to share about DSM 6, finally, namely the Let’s Encrypt integration for easy certificate creation and the use of the new reverse proxy feature, which can be used for HTTPS access to your DiskStation, DSM apps like Audio, Video and Photo Station and to Tomcat, without the need to configure HTTPS in multiple places.


  1. For the record: The tomcat-users.xml in /volume1/@appstore/Tomcat7/src/conf/ was preserved. Same goes for the setenv.sh in /volume1/@appstore/Tomcat7/src/bin , where I define CATALINA_OPTS to ALLOW_ENCODED_SLASH for GitBlit URLs to work correctly