0

When setting up SSL for Solr (in windows OS), keystore password with special characters throws "keystore password was incorrect" error.

Sample Password: 7V4StJ!Qc%8V

  1. Is there any rule on having special characters in the password for Solr keystore?
  2. Should password start with alpha characters?
  3. If I add password with single quotes in Solr.in.cmd, I am still getting error. SOLR_SSL_KEY_STORE_PASSWORD='7V4StJ!Qc%8V'

How should I handle this?

  • My guess is that since `%` has special meaning in cmd scripts, in particular `%8` which is used to refer to "the eight parameter given to the command". To escape it and get a single percent sign, use two: `%%` – MatsLindh Oct 09 '20 at 18:21
  • It did not help. I tried to escape the characters by refering the link (https://www.robvanderwoude.com/escapechars.php) but it was again throwing wrong key store password. – Nehemiah Jeyakumar Oct 09 '20 at 20:59

1 Answers1

0

I am able to fix it by keeping the password with special character in a separate file (single line file) and while setting the variable in batch file, I am reading it from the file and setting it up. It worked.

set /p SOLR_SSL_TRUST_STORE_PASSWORD=<key

where key is the file with the password in single line. Check the arrow (<) near the file name.