Bryan,

The server's shutdown hook should be able to trigger with any SIG except
SIGKILL.

I just tried the following process and the stop script works for me:

1. bin/zookeeper-server-start.sh config/zookeeper.properties

2. bin/kafka-server-start.sh config/server.properties

3. bin/kafka-server-stop.sh

---- Kafka server logs ----

[2013-12-19 11:45:52,916] INFO Starting log flusher with a default period
of 9223372036854775807 ms. (kafka.log.LogManager)
[2013-12-19 11:45:52,960] INFO Awaiting socket connections on 0.0.0.0:9092.
(kafka.network.Acceptor)
[2013-12-19 11:45:52,961] INFO [Socket Server on Broker 0], Started
(kafka.network.SocketServer)
[2013-12-19 11:45:53,050] INFO Will not load MX4J, mx4j-tools.jar is not in
the classpath (kafka.utils.Mx4jLoader$)
[2013-12-19 11:45:53,070] INFO 0 successfully elected as leader
(kafka.server.ZookeeperLeaderElector)
[2013-12-19 11:45:53,192] INFO Registered broker 0 at path /brokers/ids/0
with address guwang-ld2.linkedin.biz:9092. (kafka.utils.ZkUtils$)
[2013-12-19 11:45:53,215] INFO [Kafka Server 0], started
(kafka.server.KafkaServer)
[2013-12-19 11:45:53,303] INFO New leader is 0
(kafka.server.ZookeeperLeaderElector$LeaderChangeListener)
[2013-12-19 11:45:53,381] INFO No state transitions triggered since no
partitions are assigned to brokers 0 (kafka.utils.ZkUtils$)
[2013-12-19 11:46:04,376] INFO [Kafka Server 0], shutting down
(kafka.server.KafkaServer)
[2013-12-19 11:46:04,380] INFO [Socket Server on Broker 0], Shutting down
(kafka.network.SocketServer)
[2013-12-19 11:46:04,386] INFO [Socket Server on Broker 0], Shutdown
completed (kafka.network.SocketServer)
[2013-12-19 11:46:04,387] INFO [Kafka Request Handler on Broker 0],
shutting down (kafka.server.KafkaRequestHandlerPool)
[2013-12-19 11:46:04,420] INFO [Kafka Request Handler on Broker 0], shut
down completely (kafka.server.KafkaRequestHandlerPool)
[2013-12-19 11:46:04,653] INFO [Replica Manager on Broker 0]: Shut down
(kafka.server.ReplicaManager)
[2013-12-19 11:46:04,654] INFO [ReplicaFetcherManager on broker 0] shutting
down (kafka.server.ReplicaFetcherManager)
[2013-12-19 11:46:04,655] INFO [ReplicaFetcherManager on broker 0] shutdown
completed (kafka.server.ReplicaFetcherManager)
[2013-12-19 11:46:04,661] INFO [Replica Manager on Broker 0]: Shutted down
completely (kafka.server.ReplicaManager)
[2013-12-19 11:46:04,673] INFO Terminate ZkClient event thread.
(org.I0Itec.zkclient.ZkEventThread)
[2013-12-19 11:46:04,684] INFO Session: 0x1430c64513b0000 closed
(org.apache.zookeeper.ZooKeeper)
[2013-12-19 11:46:04,684] INFO EventThread shut down
(org.apache.zookeeper.ClientCnxn)
[2013-12-19 11:46:04,685] INFO [Kafka Server 0], shut down completed
(kafka.server.KafkaServer)


Guozhang


On Wed, Dec 18, 2013 at 9:01 PM, Jun Rao <jun...@gmail.com> wrote:

> Maybe we should just change it to "kill -15". Could you try if that works?
> Could you also file a jira?
>
> Thanks,
>
> Jun
>
>
> On Tue, Dec 17, 2013 at 9:18 PM, Bryan Baugher <bjb...@gmail.com> wrote:
>
> > RHEL 6.4 64bit
> > Java 6u35
> >
> >
> > On Tue, Dec 17, 2013 at 10:57 PM, Jun Rao <jun...@gmail.com> wrote:
> >
> > > Which OS are you on?
> > >
> > > Thanks,
> > >
> > > Jun
> > >
> > >
> > > On Tue, Dec 17, 2013 at 11:15 AM, Bryan Baugher <bjb...@gmail.com>
> > wrote:
> > >
> > > > Hi,
> > > >
> > > > We have been trying out the kafka 0.8.0 beta1 for awhile and recently
> > > > attempted to upgrade to 0.8.0 but noticed that the stop server script
> > > > doesn't seem to stop the broker anymore. I noticed here[1] that a
> > commit
> > > > was made before the release to change the signal sent to stop the
> > broker
> > > > from SIGTERM to SIGINT. Changing this script back to using SIGTERM
> > seems
> > > to
> > > > fix the issue for me. Has anyone else noticed this, is there a bug or
> > > > should I log one?
> > > >
> > > > [1] -
> > > >
> > > >
> > >
> >
> https://github.com/apache/kafka/commit/51de7c55d2b3107b79953f401fc8c9530bd0eea0
> > > >
> > > > -Bryan
> > > >
> > >
> >
> >
> >
> > --
> > -Bryan
> >
>



-- 
-- Guozhang

Reply via email to