Upload aliases.json to the upgraded cluster
You can upload the existing aliases.json
file to the upgraded
cluster to recreate aliases.
-
Create a
jaas.conf
file:- If you have a keytab for the
solr
user (for example from the latest Solr process directory under/var/run/cloudera-scm-agent/process
), create the file with the following contents:Client { com.sun.security.auth.module.Krb5LoginModule required useKeyTab=true useTicketCache=false principal="solr@[***EXAMPLE.COM***]"; };
-
Replace [***EXAMPLE.COM***] with your Kerberos realm name.
-
Make sure that the principal specified in the
jaas.conf
matches that in the keytab file. When pointing the keytab parameter directly to thesolr.keytab
in the process directories, be aware that those are only readable by theroot
user.
-
-
If you have a password for the
solr
user and you want to use the Kerberos ticket cache:Client { com.sun.security.auth.module.Krb5LoginModule required useKeyTab=false useTicketCache=true principal="solr@[***EXAMPLE.COM***]"; };
Replace [***EXAMPLE.COM***] with your Kerberos realm name.
- If you have a keytab for the
-
Set the LOG4J_PROPS environment variable to a log4j.properties file:
export LOG4J_PROPS=/etc/zookeeper/conf/log4j.properties
-
If you use a password, you need to authenticate as the
solr
user. If you authenticate with a keytab, skip this step.kinit solr@[***EXAMPLE.COM***]
Replace [***EXAMPLE.COM***] with your Kerberos realm name.
-
Run the
zkcli.sh
script as follows:/opt/cloudera/parcels/CDH/lib/solr/bin/zkcli.sh -zkhost [***zk01.example.com***]:2181/solr -cmd putfile /aliases.json [***/PATH/TO/aliases.json***]
-
Replace [***zk01.example.com***] with the hostname of a ZooKeeper server.
- Replace [***/PATH/TO/aliases.json***] with the target
location where you want to copy
aliases.json
-