Tomcat SSL problem

General discussions.

Moderator: moderators

Tomcat SSL problem

Postby bushman4 » Tue Aug 02, 2011 3:45 pm

After reading some recent comments about the speed difference between Jetty and Tomcat, I've decided to give Tomcat a try to see if there is much difference. But I am having an issue...

First off I am following the directions in this post:
http://forum.subsonic.org/forum/viewtopic.php?t=4247&start=0&postdays=0&postorder=asc&highlight=tomcat+windows

I got everything set up correctly but the problem is that when Tomcat (and Subsonic) starts up, the address that is registered for my subsonic.org domain name redirect is incorrect.

Instead of https://name.subsonic.org:8443 it is redirecting to http://name.subsonic.org:8443. Notice that it is appending the SSL port number, but not using the https:// URI.

As a test I removed the SSL configuration from the Tomcat server and the server correctly registered the http port number with subsonic.org, and not the https port number.

UPDATE: While typing this out I had a brainstorm... turns out it worked. I will add the solution here in case anyone else needs it:

FIRST OFF: if you are switching from the Windows Jetty version to the Tomcat version, EXISTING FIREWALL EXCEPTIONS WILL NOT WORK! They are tied to "subsonic-service.exe" and not to a particular port. Check your Windows Firewall to make sure that the proper PORTS are opened.

Second, start up the "Configure Tomcat" tool, and on the Java tab, under Java Options, add two lines:
Code: Select all
-Dsubsonic.port=<non SSL port number>
-Dsubsonic.httpsport=<SSL port number>


Restart Tomcat and the proper (http) port should be registered with Sindre's servers.

Now I just have to figure out how to make Subsonic the default application that is served under Tomcat (so the direct address is http://ip.address:port instead of http://ip.address:port/subsonic) and I should be able to do an apples-to-apples comparison (and my old clients who have bookmarks to my real domain name instead of my subsonic.org domain name won't have to change).

Hope this helps someone,

Glenn
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Postby bushman4 » Wed Aug 03, 2011 2:35 pm

I just want to report that my testing has gone extremely well.

I still have not managed to get Tomcat to serve up the subsonic servlet at the "default" context path of "/" instead of "/subsonic" (anyone?) but I'll get that resolved shortly.

BUT, here is the real meat:

Time to login and completely display all frames:
  • Standalone (ie, Jetty) version: 11.6 seconds
  • Tomcat 6 version: 2.2 seconds!

(All tests done using the "Full Page Test" at PingDom.com)

I'd call that a drastic improvement!

Library statistics below in my sig.

YMMV,

Glenn
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Tomcat SSL problem

Postby headcase59 » Tue Dec 20, 2011 6:29 pm

I still have not managed to get Tomcat to serve up the subsonic servlet at the "default" context path of "/" instead of "/subsonic" (anyone?) but I'll get that resolved shortly.


There are a few official ways to solve this (according to Tomcat wiki). I chose the following method which works for me as I'm only using Tomcat to run Subsonic.

Replace the ROOT webapp with Subsonic
1. Stop the Tomcat service.
2. In the Tomcat webapps folder, delete 'ROOT' and 'subsonic'.
3. Rename subsonic.war to ROOT.war (the caps actually MATTER!).
4. Start the Tomcat service.
5. A new webapps\ROOT folder will be created with Subsonic's files.
6. Access Subsonic via 'http://ipaddress:port'.
headcase59
 
Posts: 8
Joined: Thu Jul 21, 2011 3:06 pm


Return to General

Who is online

Users browsing this forum: No registered users and 11 guests