Uploaded image for project: 'AMQ Streams'
  1. AMQ Streams
  2. ENTMQST-1701

[DOC RHEL] Error starting Zookeeper with EXTRA_ARGS environment variable

XMLWordPrintable

    • Workaround Exists
    • Hide

      I have done the following workaround that works to me (don't know if there are undisclosed consequences, but it seems that everything is working fine):

      1. Edit the file "zookeeper-server-start.sh"
      2. Found the following line:
      EXTRA_ARGS="-daemon "$EXTRA_ARGS
      
      1. Change it using this one:
        EXTRA_ARGS="-daemon -name zookeeper -loggc "$EXTRA_ARGS
        
      Show
      I have done the following workaround that works to me (don't know if there are undisclosed consequences, but it seems that everything is working fine): Edit the file "zookeeper-server-start.sh" Found the following line: EXTRA_ARGS="-daemon "$EXTRA_ARGS Change it using this one: EXTRA_ARGS="-daemon -name zookeeper -loggc "$EXTRA_ARGS
    • Hide

      With a valid and running Zookeeper/Kafka installation on RHEL, and neither security nor authorization configured:

      1. Stop Zookeeper server
      2. Export the followin environtment variable:
        export EXTRA_ARGS="-Djava.security.auth.login.config=/opt/kafka/config/zookeeper-jaas.conf"
        
      1. Start Zookeeper server with the command:
        /opt/kafka/bin/zookeeper-server-start.sh -daemon /opt/kafka/config/zookeeper.properties
        
      2. Zookeeper boot fails and the following message appears:
        /opt/kafka/bin/kafka-run-class.sh: line 297: : No such file or directory
        
      Show
      With a valid and running Zookeeper/Kafka installation on RHEL, and neither security nor authorization configured: Stop Zookeeper server Export the followin environtment variable: export EXTRA_ARGS="-Djava.security.auth.login.config=/opt/kafka/config/zookeeper-jaas.conf" Start Zookeeper server with the command: /opt/kafka/bin/zookeeper-server-start.sh -daemon /opt/kafka/config/zookeeper.properties Zookeeper boot fails and the following message appears: /opt/kafka/bin/kafka-run-class.sh: line 297: : No such file or directory

      Following the official documentation link to enable Zookeeper authentication, when starting Zookeeper it will fail showing the error:

      /opt/kafka/bin/kafka-run-class.sh: line 297: : No such file or directory

      The referenced line in the script is in the 'nohup' execution:

      # Launch mode
      if [ "x$DAEMON_MODE" = "xtrue" ]; then
        nohup $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS "$@" > "$CONSOLE_OUTPUT_FILE" 2>&1 < /dev/null &
      else
        exec $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS "$@"
      fi
      

      I have checked that when you are starting Zookeeper in daemon mode, and the environment variable EXTRA_ARGS is set, the value for $CONSOLE_OUTPUT_FILE is empty, and then, redirect the output to 'nothing' fails.

              dlaing@redhat.com Daniel Laing (Inactive)
              ryanezil Rafael Yáñez Illescas
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: