Tomcat Will Not Start

Finding cause

Most common issue with Tomcat note starting is that Java is not configured properly, user trying to start Tomcat does not have permissions to do so, or another program is using port 8080 on that server.

Permissions issue

If your user ID doesn’t have permission to start Tomcat, you will get an Application System Error that reads Access is Denied. Unable to open the service ‘TomcatX’. To fix this, log-in as administrator of the server.

Other program using port 8080

While on your server try going to http://LocalHost:8080 if you get anything other than a a message like Page cannot be displayed or 404 type error, you will need to find the other program using the 8080 port.

Determining what version of Java is installed

Java’s default path for installing is in the C:\Program Files\Java\ it’s also a good Idea to check this path on any other hard drive that might be installed on the server.

Java6 will be in C:\Program Files\Java\jre6 folder
Java5 will be in C:\Program Files\Java\jre1.5.X_XX

What version is configured to work with CourseMill

There are a few places where Java is configured to work with Tomcat and CourseMill.

If Tomcat was installed in the default location, you should find the worker.Properties file in the C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\ folder. In the Wokers.properties file around line 47 you will find a variable called workers.java_home, this is where CourseMill will find the version of Java that it will use.

If Tomcat is installed in the default location you will find the Tomcat Configuration tool at C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\tomcat7w.exe In the Java tab of this tool you can define the Java Virtual Machine. Here you will want to see what folder the bin\client\jvm.dll file is in.

Java6 will be in C:\Program Files\Java\jre6 folder
Java5 will be in C:\Program Files\Java\jre1.5.X_XX

Determining what version of Java is Running

Open the Command Prompt window and type java –version then press return. You should see something like this.

Java6 will show “1.6.X_XX”
Java5 will show “1.5.X_XX”

What to do if you find two versions of Java (or version running is not configured)

It’s a good idea to only have one version of java install and that is your only version. First you will need to figure out which one to keep. Generally speaking it’s a good idea to keep the latest version.

Before making any changes to a server it’s a good idea to back up your server before making any changes to the server and schedule some down time with your users.

MsSQL and JDBC

If you using JDBC to connect to CourseMill to your MsSQL database, you will need to also update your database driver.

In your CourseMill.cfg file you will see JDBCDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver if your MsSQL is using JDBC.

The JDBC drivers can be downloaded here http://msdn.microsoft.com/en-us/data/aa937724.aspx

Use sqljdbc.jar if you have java 5.5 or older
Use sqljdbc4.jar if you have java 6 or newer

These files will need to be placed in the C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\cm6\web-inf\bin\ folder. You only want one of these driver in the bin folder, so only have the version that you are using in this folder.

Configure CourseMill to work with the new version of Java

Backup the C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\workers.properties and then edit it to have the workers.java_home to be set to the new version of Java.

Example

Change workers.java_home=C:\Program Files\Java\jre1.5.0_13 to workers.java_home=C:\Program Files\Java\jre6

Configure Tomcat to work with new version of Java

If Tomcat is installed in the default location you will find the Tomcat Configuration tool at C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\tomcat7w.exe In the Java tab of this tool you can define the Java Virtual Machine. Here you will want to point this to your new Java’s bin\client\jvm.dll file.

Example

Change C:\Program Files\Java\jre1.5.0_13\bin\client\jvm.dll to C:\Program Files\Java\jre6\bin\client\jvm.dll

Uninstall all other versions of Java

Go to the Control Panel of your server, and go to the Add/Remove Programs or the Programs section to remove any other version of Java that might be installed.