Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3077 Quorum-based protocol for reading and writing edit logs
  3. HDFS-3840

JournalNodes log JournalNotFormattedException backtrace error before being formatted

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • QuorumJournalManager (HDFS-3077)
    • None
    • None

    Description

      I started 3 JournalNodes for the first time. Then I formatted the NN. The JournalNodes, log the following error backtrace:

      [root@cs-10-20-193-121 ~]# sudo -u hdfs hdfs journalnode
      12/08/22 00:52:22 INFO impl.MetricsConfig: loaded properties from hadoop-metrics2.properties
      12/08/22 00:52:22 INFO impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s).
      12/08/22 00:52:22 INFO impl.MetricsSystemImpl: JournalNode metrics system started
      12/08/22 00:52:22 INFO server.JournalNodeHttpServer: Starting web server as: hdfs
      12/08/22 00:52:22 INFO mortbay.log: Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
      12/08/22 00:52:22 INFO http.HttpServer: Added global filter 'safety' (class=org.apache.hadoop.http.HttpServer$QuotingInputFilter)
      12/08/22 00:52:22 INFO http.HttpServer: Added filter static_user_filter (class=org.apache.hadoop.http.lib.StaticUserWebFilter$StaticUserFilter) to context journal
      12/08/22 00:52:22 INFO http.HttpServer: Added filter static_user_filter (class=org.apache.hadoop.http.lib.StaticUserWebFilter$StaticUserFilter) to context static
      12/08/22 00:52:22 INFO http.HttpServer: Added filter static_user_filter (class=org.apache.hadoop.http.lib.StaticUserWebFilter$StaticUserFilter) to context logs
      12/08/22 00:52:22 INFO http.HttpServer: Jetty bound to port 8480
      12/08/22 00:52:22 INFO mortbay.log: jetty-6.1.26.cloudera.1
      12/08/22 00:52:23 INFO mortbay.log: Started SelectChannelConnector@qjm6.cs1cloud.internal:8480
      12/08/22 00:52:23 INFO server.JournalNodeHttpServer: Journal Web-server up at: qjm6.cs1cloud.internal/10.20.193.121:8480:8480
      12/08/22 00:52:23 INFO ipc.Server: Starting Socket Reader #1 for port 8485
      12/08/22 00:52:23 INFO ipc.Server: IPC Server Responder: starting
      12/08/22 00:52:23 INFO ipc.Server: IPC Server listener on 8485: starting
      12/08/22 00:52:41 INFO server.JournalNode: Initializing journal in directory /dfs/jn/journal
      12/08/22 00:52:41 INFO common.Storage: Storage directory /dfs/jn/journal does not exist.
      12/08/22 00:52:41 ERROR security.UserGroupInformation: PriviledgedActionException as:hdfs (auth:SIMPLE) cause:org.apache.hadoop.hdfs.qjournal.protocol.JournalNotFormattedException: Journal lv=0;cid=;nsid=0;c=0 not formatted
      12/08/22 00:52:41 INFO ipc.Server: IPC Server handler 0 on 8485, call org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocol.getJournalState from 10.20.187.169:44857: error: org.apache.hadoop.hdfs.qjournal.protocol.JournalNotFormattedException: Journal lv=0;cid=;nsid=0;c=0 not formatted
      org.apache.hadoop.hdfs.qjournal.protocol.JournalNotFormattedException: Journal lv=0;cid=;nsid=0;c=0 not formatted
              at org.apache.hadoop.hdfs.qjournal.server.Journal.checkFormatted(Journal.java:265)
              at org.apache.hadoop.hdfs.qjournal.server.Journal.getLastPromisedEpoch(Journal.java:152)
              at org.apache.hadoop.hdfs.qjournal.server.JournalNodeRpcServer.getJournalState(JournalNodeRpcServer.java:97)
              at org.apache.hadoop.hdfs.qjournal.protocolPB.QJournalProtocolServerSideTranslatorPB.getJournalState(QJournalProtocolServerSideTranslatorPB.java:71)
              at org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos$QJournalProtocolService$2.callBlockingMethod(QJournalProtocolProtos.java:12230)
              at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:453)
              at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:898)
              at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1693)
              at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1689)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAs(Subject.java:396)
              at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1332)
              at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1687)
      12/08/22 00:52:41 INFO server.Journal: Formatting org.apache.hadoop.hdfs.qjournal.server.Journal@61128f5a with namespace info: lv=-40;cid=CID-296bea3a-f126-4e91-aa64-477b37e505f4;nsid=1541406824;c=0;bpid=BP-998067398-10.20.187.169-1345621962294
      12/08/22 00:52:41 INFO common.Storage: Formatting journal storage directory Storage Directory /dfs/jn/journal with nsid: 1541406824
      12/08/22 00:52:42 INFO common.Storage: Lock on /dfs/jn/journal/in_use.lock acquired by nodename 2315@cs-10-20-193-121.cloud.cloudera.com
      12/08/22 01:06:52 INFO server.Journal: Scanning storage FileJournalManager(root=/dfs/jn/journal)
      

      Seems like we should not log this backtrace in this startup scenario? When I read it, I was confused and thought there might have been a problem, but the JN was formatted fine.

      Attachments

        1. hdfs-3840.txt
          12 kB
          Todd Lipcon

        Activity

          People

            tlipcon Todd Lipcon
            schu Stephen Chu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: