If your environment is setup with Load Balancer and all traffic is being routed to HTTPS. You are trying to access the Solr server and getting 502 Badway Gateway error then the problem is with the SSL configuration on your Solr instance. The SSL is not configured or the configuration are incorrect. You can follow the instructions below to make sure that your SSL is configured and it's working properly with Solr instance.
First of all check these two locations to see if you already have SSL installed and configured in Solr Server.
1) Open where your solr server files are: C:\Program Files\solr-6.6.3\Server\etc
Make sure you have .jks and ssl files in this folder. If not then it's time to generate your SSL and install this SSL in your server.
If the SSL files are there then open solr.in.cmd and make sure ssl is enabled.
Ok. So if these settings are not there and your SSL are not in the folder then it's about time that you follow the instructions below to complete your Solr installation.
Generating and Enabling SSL in Solr
1) Open command prompt as Administrator and change the directory to: C:\Program Files\Java\jre-10.0.2\bin
2) Run the below commands
keytool.exe -genkeypair -alias solr-ssl -keyalg RSA -keysize 2048 -keypass secret -storepass secret -validity 9999 -keystore solr-ssl.keystore.jks -ext SAN=DNS:localhost,IP:127.0.0.1 -dname "CN=localhost, OU=Organization, O=Organization, L=City, ST=State, C=USA"
keytool.exe -importkeystore -srckeystore solr-ssl.keystore.jks -destkeystore solr-ssl.keystore.p12 -srcstoretype jks -deststoretype pkcs12
3) Open
C:\Program Files\Java\jre-10.0.2\bin and copy both files "solr-ssl.keystore" and "solr-ssl.keystore.jks"
4) Paste these files in C:\Program Files\solr-6.6.3\Server\etc
5) Open
solr.in.cmd and enabled SSL in Solr.
Installing SSL on your Server
1) Double-click on the SSL cert "solr-ssl.keystore" that you generated in the section above.
2) Select Local Machine
2) Click Next
3) Enter the password and click Next
4) Place your certificate in "Trusted Root Certification Authorities" and Click Next
Ok. This is it. You just did an awesome job by generating, installing and configuring SSL in the Solr server. You derve a salary increase. Good Luck with that :)