Issues with rsdemodb and re-registering the Windows Service

It seems that most of the problems I’ve encountered with ReportServer revolve around issues with the H2 database rsdemodb.

I recently wanted to upgrade my Java Runtime Environment (JRE). When the old version was removed, the Windows Service would no longer start. I then pieced together the service is created not through the standard service.bat that’s included with Tomcat7 but through a command line.

The following is the command required to re-register the windows service with different JVM options:

C:\Program Files\reportserver\tomcat\bin>tomcat7.exe //IS//Tomcat7 --DisplayName="reportserver-tomcat" --Install="C:\Program Files\reportserver\tomcat\bin\tomcat7.exe" --Jvm="C:\Program Files\Java\jre7\bin\server\jvm.dll" --Classpath="C:\Program Files\reportserver\tomcat\bin\bootstrap.jar;C:\Program Files\reportserver\tomcat\bin\tomcat-juli.jar" --JvmMs=256 --JvmMx=1536 --JvmSs=1024 ++JvmOptions="-Dcatalina.home=C:\Program Files\reportserver\tomcat" ++JvmOptions="-Dcatalina.base=C:\Program Files\reportserver\tomcat" ++JvmOptions="-Djava.endorsed.dirs=C:\Program Files\reportserver\tomcat\endorsed" ++JvmOptions="-Djava.io.tmpdir=C:\Program Files\reportserver\tomcat\temp" ++JvmOptions="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" ++JvmOptions="-Djava.util.logging.config.file=C:\Program Files\reportserver\tomcat\conf\logging.properties" ++JvmOptions="-XX:MaxPermSize=256m" ++JvmOptions="-Dfile.encoding=UTF-8" --StartMode=jvm --StopMode=jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop --Startup auto

Keep in mind this string will vary depending on the version of the JRE you’re using: C:\Program Files\Java\jre7\bin\server\jvm.dll

If you need to make adjustments to the settings governing your installation, you’ll need to either update or delete the service BEFOREHAND:

C:\Program Files\reportserver\tomcat\bin>tomcat7.exe //DS//Tomcat7

I completely removed the service and installed it again. I haven’t attempted an update.

This is a useful reference: http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html

Why am I posting this you say? Well, I’m curious why this demo can’t be apart of the Postgres database? I have been trying to figure out how I can connect to this H2 database but to-date I have not had any success in doing so.

I was able to execute this command successfully to get a dump of all the data contained in this database.

C:\Program Files\reportserver\tomcat\webapps\reportserver\WEB-INF\lib>java -cp h2-1.4.180.jar org.h2.tools.Recover -dir "C:\Program%20Files\reportserver\tomcat\temp\rsidb"

There doesn’t appear to be anything of importance in this database. I consider this to be a serious stability issue. Releases to the Java Runtime are fairly frequent, so I can see Systems Administrators grappling with this problem from time-to-time.

After re-installing the Windows Service, I found it necessary to purge (delete) the rsdemodb directory (C:\Program%20Files\reportserver\tomcat\temp\rsidb) entirely. Otherwise, I receive the following types of error messages and the login page in Report Server will not load:

UPDATE:
Also, I thought I’d mention that attempting to register the Tomcat7 service using the service.bat file causes all sorts of complications. So unless you are a seasoned Tomcat veteran, I don’t recommend going this route. I’m still recovering from my battle wounds, although my familiarity with Tomcat has improved. :smiley:

Hi Tom,

thank you for taking the time to write down these issues and their solutions. I’m sure this will be very useful for everyone else who stumbles upon this.

We are also unsatisfied with the reliability of the current implementation and will very likely move away from h2 and just use the main database for these purposes.

Cheers,
Thorsten

One additional piece of information.

I had more problems after re-installing the Windows Service.

Make sure you also purge (delete) ALL the files and sub-directories in this folder: C:\Program Files\reportserver\tomcat\temp

I kept getting these error messages when trying to look at audit logs (a Dynamic List report that came with Report Server):