Can't get SSL working with Lets Encrypt cert

Need help? Post your questions here.

Moderator: moderators

Can't get SSL working with Lets Encrypt cert

Postby mark213444 » Mon Mar 11, 2019 9:15 pm

Hi all,

I've been trying unsuccessfully to get Subsonic working with a Lets Encrypt cert by following the official guide http://www.subsonic.org/pages/getting-started.jsp
But wanted to get this working with the default self signed cert before adding the Lets Encrypt cert into the mix...

I'm running Subsonic 6.1.5 on Centos 7.6.

As soon as I enable ssl on a clean install by changing /etc/sysconfig/subsonic
Code: Select all
SUBSONIC_ARGS="--max-memory=150"
to
Code: Select all
SUBSONIC_ARGS="--max-memory=150 --https-port=4043"
and restart, Subsonic does not load with http on port 4040 but it will eventually redirect to https on port 4043 but that doesn't load either. According to the docs, this should be enough to enable SSL with the default self signed cert. (Both port 4040 & 4043 are open on the firewall, if I disable the https port in /etc/sysconfig/subsonic, Subsonic loads ok with http on port 4040).

With ssl enabled I see the following in /var/subsonic/subsonic_sh.log:

Code: Select all
59167 [main] INFO org.mortbay.log - Started SelectChannelConnector@0.0.0.0:4040
59230 [main] INFO org.mortbay.log - Started SslSocketConnector@0.0.0.0:4043
Subsonic running on: http://localhost:4040/                                                                                                                                                                               and: https://localhost:4043/
59457 [main] INFO org.springframework.remoting.rmi.RmiServiceExporter - Looking for RMI registry at port '9412'
59541 [main] INFO org.springframework.remoting.rmi.RmiServiceExporter - Could not detect RMI registry - creating new one
59666 [main] INFO org.springframework.remoting.rmi.RmiServiceExporter - Binding service 'SubsonicDeployerService' to RMI registry: RegistryImpl[UnicastServerRef [liveRef: [endpoint:[n.n.n.n:9412](local),objID:[0:0:0, 0]]]]
[GC (Allocation Failure)  71373K->48705K(91644K), 0.0615023 secs]
[GC (Allocation Failure)  74102K->52943K(91644K), 0.0865532 secs]
[GC (Allocation Failure)  78351K->53162K(91644K), 0.0374043 secs]


I read about increasing max memory to fix the allocation failure in other posts but the official docs don't say this is required...
Can anyone point me in the right direction?
mark213444
 
Posts: 4
Joined: Tue Feb 26, 2019 11:45 pm

Re: Can't get SSL working with Lets Encrypt cert

Postby LRanger » Wed Mar 13, 2019 3:50 am

Not much help, but:

SUBSONIC_ARGS="--max-memory=150 --https-port=4043"

works fine here.

Subsonic 6.1.5 on Ubuntu.
LRanger
 
Posts: 48
Joined: Thu Mar 03, 2016 10:51 am

Re: Can't get SSL working with Lets Encrypt cert

Postby mark213444 » Wed Mar 13, 2019 9:46 am

That is a help... at least I know the instructions are correct.

That suggests a problem with my Centos install.
mark213444
 
Posts: 4
Joined: Tue Feb 26, 2019 11:45 pm

Re: Can't get SSL working with Lets Encrypt cert

Postby mark213444 » Wed Mar 13, 2019 9:53 am

Looks like it was SELinux as restarting Subsonic after running 'setenforce 0' works. I can now log in on https with a self signed cert.
mark213444
 
Posts: 4
Joined: Tue Feb 26, 2019 11:45 pm

Re: Can't get SSL working with Lets Encrypt cert

Postby mark213444 » Wed Mar 13, 2019 10:15 am

Adding the following line to the java options in /usr/share/subsonic/subsonic.sh picked up the keystore formatted LetsEncrypt cert! (Note: The options are near the end of the file). I didn't zip it into the subsonic-booter-jar.

-Dsubsonic.ssl.keystore=/etc/letsencrypt/live/mydomain/subsonic.keystore \

I didn't need the password line, possibly because the keystore was created with the password 'subsonic'.

-Dsubsonic.ss.password=subsonic \

Now just have to figure out how to get it working with SELinux on...

Note: Keystore was created following this guide: http://www.richgrundy.com/blog/setting- ... -subsonic/
mark213444
 
Posts: 4
Joined: Tue Feb 26, 2019 11:45 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 19 guests