1

I am using Apache SOLR 6.6.5 as my search engine running on port 8983. I just wanted to enable SSL for solr and followed this guide to make it work under 8984 port with SSL.

Here my problem is that I am not able to see any cores on 8984 which is already created under the port 8983(port without SSL).

http://mywebsite.com:8983/solr/#/ ==> This have 3 cores

https://mywebsite.com:8984/solr/#/ ==> This don't have any cores

It will be really appreciated if anyone could provide the solution for having the same cores for both 8983 and 8984 ports.

Thanks

Ewall Team
  • 31
  • 4
  • The easiest way would be to start solr in cloud mode and set replica on all cores in another solr node. Let me know if you need details of how to do it. – raghu777 Dec 24 '18 at 11:38
  • 2
    Use a separate http server for terminating ssl traffic (and regular http traffic) - for example nginx. Let nginx query the same Solr server behind it over plain HTTP. Make sure to bind Solr to localhost. – MatsLindh Dec 24 '18 at 19:05
  • hi @raghu777, could you please send more details on how to do it? For your additional info, I have done the manual installation of SOLR on AWS cloud – Ewall Team Dec 26 '18 at 04:59

1 Answers1

0

Following are the steps. Make sure zookeeper is installed and is up and running. Mostly zookeeper runs on port 2181 so our zk_host will be localhost:2181.

SOLRHOME is your extracted directory from solr-x.y.z.tar.gz.

  1. Go to SOLRHOME.
  2. We will be creating two solr nodes. Make copies of SOLRHOME/server directory in SOLRHOME with dir names SOLRHOME/node1 and SOLRHOME/node2.
  3. From SOLRHOME dir start node1 in cloud mode using the following command
          ./bin/solr -c -d node1 -z localhost:2181
          Here,
                -c : Sepcifies cloud node
                -d : Solr home directory store node logs and core data
                -z : Zookeeper to maintain Config files 
  1. Start node2 using the following
          ./bin/solr -c -d node2 -z localhost:2181 
  2. Upload config to zookeeper using following command,
       ./bin/solr zk upconfig -z localhost:2181 -n core1_schema -d ~/core1_schema_dir
          Here,
                ~/core1_schema_dir : this dir will contain conf dir which you must have in your current core1 collection, 
                                     so your managed-schema file path will be ~/core1_schema_dir/conf/managed-schema 
                core1_schema : This is name we have given to the uploaded schema 
  3. Create collection with replication using following curl command or hit enclosed url in browser,
      curl "http://localhost:8983/solr/admin/collections?action=CREATE&name=core1&numShards=1&replicationFactor=2&maxShardsPerNode=1&collection.configName=core1_schema" 
    This will return response like below,
               {
                        "responseHeader": {
                            "QTime": 7494,
                            "status": 0
                        },
                        "success": {
                            "127.0.1.1:8983_solr": {
                                "core": "core1_shard1_replica_n2",
                                "responseHeader": {
                                    "QTime": 6093,
                                    "status": 0
                                }
                            },
                            "127.0.1.1:8984_solr": {
                                "core": "core1_shard1_replica_n1",
                                "responseHeader": {
                                    "QTime": 5802,
                                    "status": 0
                                }
                            }
                        }
                    } 
    As you can see in response a replication of core1 has been created on node2. Now you will have to repeat step 5 and 6 for other two cores.
raghu777
  • 319
  • 2
  • 11