Configuring the cron job

Hadoop is configured to access by using the sifsuser user account. The sifsuser ticket will expire every day, which will restrict access to HDFS unless the ticket is renewed. You can automate the ticket renewal by using a cron job.

Procedure

  1. Log on to the Hadoop master node as the root user.
  2. Copy /opt/IBM/IBM_Surveillance_Analytics_2.0.3_Multiplatform_English/bin/renewTicket.sh to the /home/sifsuser directory.
    cp /opt/IBM/IBM_Surveillance_Analytics_2.0.3_Multiplatform_English/bin/renewTicket.sh /home/sifsuser
  3. Create a new file that is named renewSolrTicket.sh in the /home/solruser directory, and add the following content:
    kinit -kt /etc/security/keytabs/solr.keytab solruser/<ambari_server>

    Replace <ambari_server> with the Ambari server host name.

  4. As the root user, run the following commands:
    chown sifsuser:sifsuser /home/sifsuser/renewTicket.sh
    chown solruser:solruser /home/solruser/renewSolrTicket.sh
    chmod 755 /home/sifsuser/renewTicket.sh /home/solruser/renewSolrTicket.sh
  5. Copy the /home/sifsuser/renewTicket.sh and /home/solruser/renewSolrTicket.sh files to each Hadoop node.
    scp /home/sifsuser/renewTicket.sh root@<hadoop_cluster>:/home/sifsuser
    scp /home/sifsuser/renewSolrTicket.sh root@<hadoop_cluster>:/home/solruser

    Replace <hadoop_cluster> with the host name of the Hadoop cluster node.

  6. Run the following command on each Hadoop node:
    crontab -u sifsuser -e
  7. In the blank screen, enter the following content and save the file.
    00 09-21 * * * /home/sifsuser/renewTicket.sh
  8. Run the following command on each Hadoop node:
    crontab -u solruser -e
  9. In the blank screen, enter the following content and save the file.
    00 09-21 * * * /home/solruser/renewSolrTicket.sh