1

Hi StackOverflow family.

I am stuck with an issue from months ago. I have a domain with SSL configured which is working perfectly and everything is showing secured. After that, I installed apache solr on the same. (I am using ubuntu with java 8 installed there in the server).

In solr working fine with any of the ports like mydomain.com:8443, which is without HTTPS. No, I have configured the SSL for the solr as well, but it showing me not secure on mydomain.com:8443 with HTTPS

Here are the commands and screenshots I used to configure SSL and how it shows in the browser. Please note - I am using Java 8 (java 1.8) version and apache solr 6.6

command exactly I used to configure SSL ---

sudo keytool -genkeypair -alias solr-ssl -keyalg RSA -keysize 2048 -keypass **mysecret** -storepass **mysecret** -validity 365 -keystore solr-ssl.keystore.jks -ext SAN=DNS:localhost,IP:**ip of my domain**,IP:127.0.0.1 -dname "CN=**ip of my domain**, OU=xxxx, O=xxxxx, L=xxxx, ST=CA, C=US"

it creates the jks file in /mysolrdir/server/etc, then i created the .p12 file ...

keytool -importkeystore -srckeystore solr-ssl.keystore.jks -destkeystore solr-ssl.keystore.p12 -srcstoretype jks -deststoretype pkcs12

after that, I created the pem file ...

openssl pkcs12 -in solr-ssl.keystore.p12 -out solr-ssl.pem

Then I updated the solr.in.sh file under /mysolrdir/bin directory as follows --

SOLR_HOST="xx.xx.xx.xx" //my domain ip

SOLR_SSL_ENABLED=true
SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.jks
SOLR_SSL_KEY_STORE_PASSWORD=**mysecret**      //same as creating the jks file
SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.jks
#SOLR_SSL_TRUST_STORE=etc/solr-ssl.pem
SOLR_SSL_TRUST_STORE_PASSWORD=**mysecret**
SOLR_SSL_NEED_CLIENT_AUTH=false
SOLR_SSL_WANT_CLIENT_AUTH=false

SOLR_SSL_KEY_STORE_TYPE=JKS
SOLR_SSL_TRUST_STORE_TYPE=JKS

After this, I am able to run the solr with HTTPS, but it showing not secured as in screenshots...

enter image description here enter image description here

Please help me out... Thanks in advance

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
PHP Geek
  • 3,949
  • 1
  • 16
  • 32
  • hi, so for certificate invalid, perhaps this might be of interest – jspcal Nov 16 '21 at 04:22
  • jspcal, I am sure the SSL certificates are not invalid as without solr it working fine will https. just the error when I use mydomain.com:8443 with https – PHP Geek Nov 16 '21 at 04:24
  • Try to remove SOLR_SSL_ENABLED as the bin/solr script uses nested conditions and somehow it does not work. https://github.com/apache/solr/blob/6b0e1bc974d0a49968c92f83436ba0560641a636/solr/bin/solr#L187 – Jordan Borisov Feb 16 '22 at 15:27

0 Answers0