Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-12953

Ambari Agent logging set up incorrect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.3.0
    • ambari-agent
    • None

    Description

      PROBLEM: The customer wanted to change their Ambari Agent logging location for the default /var/log/ambari-agent location to another place. They initially changed the LOGFILE and OUTFILE environment variables in /usr/sbin/ambari-agent and although this changed the displayed log and out file location when starting the Ambari Agent, only the out file was written to the new location.

      BUSINESS IMPACT: Customer not able to write logs to correct location

      SUPPORT ANALYSIS: Digging in to the code it seems that the Ambari Agent will honour the path specified by the environment variable AMBARI_AGENT_LOG_DIR. However:

      • The /usr/sbin/ambari-agent script uses the environment variable AMBARI_LOG_DIR (lines 91 and 92) and doesn't set LOGFILE to the correct location if AMBARI_AGENT_LOG_DIR is set.
      • /etc/init.d/ambari-agent doesn't use the -l switch on the bash command line when starting the Ambari Agent as root (line 27) so all environment variables defined in the profile for root are ignored.

      Attachments

        Activity

          People

            smnaha Nahappan Somasundaram
            smnaha Nahappan Somasundaram
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: