Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4AB8A200C88 for ; Fri, 2 Jun 2017 23:29:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 49E12160BBA; Fri, 2 Jun 2017 21:29:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6931C160BD2 for ; Fri, 2 Jun 2017 23:29:08 +0200 (CEST) Received: (qmail 56896 invoked by uid 500); 2 Jun 2017 21:29:07 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 56885 invoked by uid 99); 2 Jun 2017 21:29:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jun 2017 21:29:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0C793181338 for ; Fri, 2 Jun 2017 21:29:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.702 X-Spam-Level: X-Spam-Status: No, score=-98.702 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_NUMSUBJECT=0.5, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id NpS2mG4Jjqk9 for ; Fri, 2 Jun 2017 21:29:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E4BAF5F24C for ; Fri, 2 Jun 2017 21:29:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6E5C6E0662 for ; Fri, 2 Jun 2017 21:29:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2B4DD20DF5 for ; Fri, 2 Jun 2017 21:29:04 +0000 (UTC) Date: Fri, 2 Jun 2017 21:29:04 +0000 (UTC) From: "Kevin Chen (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (KAFKA-5070) org.apache.kafka.streams.errors.LockException: task [0_18] Failed to lock the state directory: /opt/rocksdb/pulse10/0_18 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Jun 2017 21:29:09 -0000 [ https://issues.apache.org/jira/browse/KAFKA-5070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035452#comment-16035452 ] Kevin Chen edited comment on KAFKA-5070 at 6/2/17 9:28 PM: ----------------------------------------------------------- we saw the similar exceptions in our stream applications too, we are using 10.2 client/server. We have 6 threads per instance. we have 12 partitions on the incoming topic. so total 12 tasks, we are running total 2 instances on 2 nodes(one instance each). We got the following exceptions in different situations ! org.apache.kafka.streams.errors.LockException: task [0_1] Failed to lock the state directory: at one time, the root cause is rocskdb.flush() exception(we are not using custom implementation), restart fix the problem. only saw that once. But most time it happens when to re-balance, like we need bring down a node. In this case, no apparent root cause, and restart not always solve it. here is all I got from the stack trace WARN [2017-06-02 21:23:47,591] org.apache.kafka.streams.processor.internals.StreamThread: Could not create task 0_6. Will retry. ! org.apache.kafka.streams.errors.LockException: task [0_6] Failed to lock the state directory: /tmp/aggregator-one/kafka-streams-state/aggregator-one-1/0_6 ! at org.apache.kafka.streams.processor.internals.ProcessorStateManager.(ProcessorStateManager.java:102) ! at org.apache.kafka.streams.processor.internals.AbstractTask.(AbstractTask.java:73) ! at org.apache.kafka.streams.processor.internals.StreamTask.(StreamTask.java:108) ! at org.apache.kafka.streams.processor.internals.StreamThread.createStreamTask(StreamThread.java:834) ! at org.apache.kafka.streams.processor.internals.StreamThread$TaskCreator.createTask(StreamThread.java:1207) ! at org.apache.kafka.streams.processor.internals.StreamThread$AbstractTaskCreator.retryWithBackoff(StreamThread.java:1180) ! at org.apache.kafka.streams.processor.internals.StreamThread.addStreamTasks(StreamThread.java:937) ! at org.apache.kafka.streams.processor.internals.StreamThread.access$500(StreamThread.java:69) ! at org.apache.kafka.streams.processor.internals.StreamThread$1.onPartitionsAssigned(StreamThread.java:236) ! at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.onJoinComplete(ConsumerCoordinator.java:255) ! at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.joinGroupIfNeeded(AbstractCoordinator.java:339) ! at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureActiveGroup(AbstractCoordinator.java:303) ! at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:286) ! at org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:1030) ! at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:995) ! at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:582) ! at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:368) was (Author: kchen): we saw the similar exceptions in our stream applications too, we are using 10.2 client/server. We have 6 threads per instance. we have 12 partitions on the incoming topic. so total 12 tasks, we are running total 2 instances on 2 nodes(one instance each). We got the following exceptions in different situations ! org.apache.kafka.streams.errors.LockException: task [0_1] Failed to lock the state directory: at one time, the root cause is rocskdb.flush() exception(we are not using custom implementation), restart fix the problem. only saw that once. But most time it happens when to re-balance, like we need bring down a node. In this case, no apparent root cause, here is all I got from the stack trace WARN [2017-06-02 21:23:47,591] org.apache.kafka.streams.processor.internals.StreamThread: Could not create task 0_6. Will retry. ! org.apache.kafka.streams.errors.LockException: task [0_6] Failed to lock the state directory: /tmp/aggregator-one/kafka-streams-state/aggregator-one-1/0_6 ! at org.apache.kafka.streams.processor.internals.ProcessorStateManager.(ProcessorStateManager.java:102) ! at org.apache.kafka.streams.processor.internals.AbstractTask.(AbstractTask.java:73) ! at org.apache.kafka.streams.processor.internals.StreamTask.(StreamTask.java:108) ! at org.apache.kafka.streams.processor.internals.StreamThread.createStreamTask(StreamThread.java:834) ! at org.apache.kafka.streams.processor.internals.StreamThread$TaskCreator.createTask(StreamThread.java:1207) ! at org.apache.kafka.streams.processor.internals.StreamThread$AbstractTaskCreator.retryWithBackoff(StreamThread.java:1180) ! at org.apache.kafka.streams.processor.internals.StreamThread.addStreamTasks(StreamThread.java:937) ! at org.apache.kafka.streams.processor.internals.StreamThread.access$500(StreamThread.java:69) ! at org.apache.kafka.streams.processor.internals.StreamThread$1.onPartitionsAssigned(StreamThread.java:236) ! at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.onJoinComplete(ConsumerCoordinator.java:255) ! at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.joinGroupIfNeeded(AbstractCoordinator.java:339) ! at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureActiveGroup(AbstractCoordinator.java:303) ! at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:286) ! at org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:1030) ! at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:995) ! at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:582) ! at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:368) > org.apache.kafka.streams.errors.LockException: task [0_18] Failed to lock the state directory: /opt/rocksdb/pulse10/0_18 > ------------------------------------------------------------------------------------------------------------------------ > > Key: KAFKA-5070 > URL: https://issues.apache.org/jira/browse/KAFKA-5070 > Project: Kafka > Issue Type: Bug > Components: streams > Affects Versions: 0.10.2.0 > Environment: Linux Version > Reporter: Dhana > Assignee: Matthias J. Sax > Attachments: RocksDB_LockStateDirec.7z > > > Notes: we run two instance of consumer in two difference machines/nodes. > we have 400 partitions. 200 stream threads/consumer, with 2 consumer. > We perform HA test(on rebalance - shutdown of one of the consumer/broker), we see this happening > Error: > 2017-04-05 11:36:09.352 WARN StreamThread:1184 StreamThread-66 - Could not create task 0_115. Will retry. > org.apache.kafka.streams.errors.LockException: task [0_115] Failed to lock the state directory: /opt/rocksdb/pulse10/0_115 > at org.apache.kafka.streams.processor.internals.ProcessorStateManager.(ProcessorStateManager.java:102) > at org.apache.kafka.streams.processor.internals.AbstractTask.(AbstractTask.java:73) > at org.apache.kafka.streams.processor.internals.StreamTask.(StreamTask.java:108) > at org.apache.kafka.streams.processor.internals.StreamThread.createStreamTask(StreamThread.java:834) > at org.apache.kafka.streams.processor.internals.StreamThread$TaskCreator.createTask(StreamThread.java:1207) > at org.apache.kafka.streams.processor.internals.StreamThread$AbstractTaskCreator.retryWithBackoff(StreamThread.java:1180) > at org.apache.kafka.streams.processor.internals.StreamThread.addStreamTasks(StreamThread.java:937) > at org.apache.kafka.streams.processor.internals.StreamThread.access$500(StreamThread.java:69) > at org.apache.kafka.streams.processor.internals.StreamThread$1.onPartitionsAssigned(StreamThread.java:236) > at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.onJoinComplete(ConsumerCoordinator.java:255) > at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.joinGroupIfNeeded(AbstractCoordinator.java:339) > at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureActiveGroup(AbstractCoordinator.java:303) > at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:286) > at org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:1030) > at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:995) > at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:582) > at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:368) -- This message was sent by Atlassian JIRA (v6.3.15#6346)