Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1613

There is one defect in start script for ranger-usersync process

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • usersync
    • Patch, Important

    Description

      1.In install.properties, I configure 'ranger_base_dir=/etc/ranger/xiehh'
      2.I execute ranger-usersync-services.sh to start
      [root@zdh41 ranger-1.0.0-SNAPSHOT-usersync]# ./ranger-usersync-services.sh start
      Starting Apache Ranger Usersync Service
      Apache Ranger Usersync Service with pid 23417 has started.
      3.[root@zdh41 ranger-1.0.0-SNAPSHOT-usersync]# ps -ef|grep 23417
      root 23417 1 31 15:39 pts/1 00:00:03 java -Dproc_rangerusersync -Dlog4j.configuration=file:/etc/ranger/usersync/conf/log4j.properties -Duser=root -Dhostname=zdh41 -Dlogdir=logs -cp /home/rangerusersync/ranger-1.0.0-SNAPSHOT-usersync/dist/:/home/rangerusersync/ranger-1.0.0-SNAPSHOT-usersync/lib/:/home/rangerusersync/ranger-1.0.0-SNAPSHOT-usersync/conf:/etc/hadoop/conf/* org.apache.ranger.authentication.UnixAuthenticationService -enableUnixAuth

      The Configuration '-Dlog4j.configuration=file:/etc/ranger/usersync/conf/log4j.properties' will not find the file log4j.properties,because the dir '/etc/ranger/usersync/conf' is not right ,it should be '/etc/ranger/xiehh/usersync/conf'

      So we should change

      nohup java -Dproc_rangerusersync -Dlog4j.configuration=file:/etc/ranger/usersync/conf/log4j.properties ${JAVA_OPTS} -Duser=${USER} -Dhostname=${HOSTNAME} -Dlogdir="${logdir}" -cp "${cp}" org.apache.ranger.authentication.UnixAuthenticationService -enableUnixAuth > ${logdir}/auth.log 2>&1 &
      

      in ranger-usersync-services.sh

      Change

      -Dlog4j.configuration=file:/etc/ranger/usersync/conf/log4j.properties
      

      to

      -Dlog4j.configuration=file:${RANGER_BASE_DIR}/usersync/conf/log4j.properties
      

      for dynamic configuration.

      Attachments

        Activity

          People

            zhangqiang2 Qiang Zhang
            zhangqiang2 Qiang Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: