Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-4372

Docker entrypoint delete file too later cause ZK started by HBase crash

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: v3.0.0-alpha2
    • Fix Version/s: v3.0.2
    • Component/s: Others
    • Labels:
      None

      Description

      In docker/entrypoint.sh

       

      # start hbase
      $HBASE_HOME/bin/start-hbase.sh
      
      
      # start kafka
      rm -rf /tmp/kafka-logs
      rm -rf /data/zookeeper/*
      nohup $KAFKA_HOME/bin/kafka-server-start.sh $KAFKA_HOME/config/server.properties &
      

      rm -rf /data/zookeeper/*  should before starting HBase instead of before starting Kafka.

      It executes after HBase will cause ZK started by HBase crash.

      The crash logs of /home/admin/hbase-1.1.2/logs/hbase--master-9aef5f427eb6.log:

      2020-02-10 09:25:56,402 INFO [SyncThread:0] persistence.FileTxnLog: Creating new log file: log.1 2020-02-10 09:25:56,402 ERROR [SyncThread:0] server.SyncRequestProcessor: Severe unrecoverable error, exiting java.io.FileNotFoundException: /data/zookeeper/zookeeper_0/version-2/log.1 (No such file or directory) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(FileOutputStream.java:270) at java.io.FileOutputStream.<init>(FileOutputStream.java:213) at java.io.FileOutputStream.<init>(FileOutputStream.java:162) at org.apache.zookeeper.server.persistence.FileTxnLog.append(FileTxnLog.java:205) at org.apache.zookeeper.server.persistence.FileTxnSnapLog.append(FileTxnSnapLog.java:314) at org.apache.zookeeper.server.ZKDatabase.append(ZKDatabase.java:476) at org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:140)
      
      

       I think the shell should be like this

      # start hbase 
      rm -rf /data/zookeeper/*
      $HBASE_HOME/bin/start-hbase.sh
      
      # start kafka 
      rm -rf /tmp/kafka-logs  
      nohup $KAFKA_HOME/bin/kafka-server-start.sh $KAFKA_HOME/config/server.properties & 

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                codingforfun weibin0516
                Reporter:
                cijianzy Yue Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: