Broker closes client connections that are idle for a configurable period of
time (broker property connections.max.idle.ms). The default idle time is 10
minutes which matches the close time in the logs.

On Wed, Nov 2, 2016 at 2:43 PM, Jaikiran Pai <jai.forums2...@gmail.com>
wrote:

> Which exact version of Kafka installation and Kafka client is this? And
> which language/library of Kafka client? Also, are you describing this
> situation in the context of producing messages? Can you post your relevant
> code from the application where you deal with this?
>
> Connection management is an internal detail of Kafka client libraries and
> usually won't end up outside of it, so you shouldn't really notice any of
> these issues.
>
>
> -Jaikiran
>
>
> On Friday 28 October 2016 05:50 AM, Jianbin Wei wrote:
>
>> In our environment we notice that sometimes Kafka would close the
>> connection after one message is sent over.  The client does not detect that
>> and tries to send another message again.  That triggers a RST packet.
>>
>> Any idea why the Kafka broker would close the connection?
>>
>> Attached you can find the packets between our client and kafka broker.
>>
>>
>> 20:55:40.834543 IP 172.18.69.194.34445 > 172.18.69.180.9092: Flags [S],
>> seq 31787730, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 9],
>> length 0
>>         0x0000:  4500 0034 8cc1 4000 4006 ca67 ac12 45c2  E..4..@
>> .@..g..E.
>>         0x0010:  ac12 45b4 868d 2384 01e5 0ad2 0000 0000  ..E...#.........
>>         0x0020:  8002 3908 e3c1 0000 0204 05b4 0101 0402  ..9.............
>>         0x0030:  0103 0309                                ....
>> 20:55:40.834744 IP 172.18.69.180.9092 > 172.18.69.194.34445: Flags [S.],
>> seq 1238329644, ack 31787731, win 14600, options [mss
>> 1460,nop,nop,sackOK,nop,wscale 1], length 0
>>         0x0000:  4500 0034 0000 4000 4006 5729 ac12 45b4  E..4..@
>> .@.W)..E.
>>         0x0010:  ac12 45c2 2384 868d 49cf 692c 01e5 0ad3  ..E.#...I.i,....
>>         0x0020:  8012 3908 e89e 0000 0204 05b4 0101 0402  ..9.............
>>         0x0030:  0103 0301                                ....
>> 20:55:40.834787 IP 172.18.69.194.34445 > 172.18.69.180.9092: Flags [.],
>> ack 1, win 29, length 0
>>         0x0000:  4500 0028 8cc2 4000 4006 ca72 ac12 45c2  E..(..@.@..r..E.
>>         0x0010:  ac12 45b4 868d 2384 01e5 0ad3 49cf 692d  ..E...#.....I.i-
>>         0x0020:  5010 001d e3b5 0000                      P.......
>> 20:55:40.834921 IP 172.18.69.194.34445 > 172.18.69.180.9092: Flags [P.],
>> seq 1:691, ack 1, win 29, length 690
>>         0x0000:  4500 02da 8cc3 4000 4006 c7bf ac12 45c2  E.....@
>> .@.....E.
>>         0x0010:  ac12 45b4 868d 2384 01e5 0ad3 49cf 692d  ..E...#.....I.i-
>>         0x0020:  5018 001d e667 0000 0000 02ae 0000 0000  P....g..........
>>         0x0030:  0000 0003 000c 6b61 666b 612d 7079 7468  ......kafka-pyth
>>         0x0040:  6f6e 0001 0000 03e8 0000 0001 000e 6576  on............ev
>>         0x0050:  656e 745f 6e73 706f 6c69 6379 0000 0001  ent_nspolicy....
>>         0x0060:  0000 0000 0000 0272 0000 0000 0000 0000  .......r........
>>         0x0070:  0000 0266 4ff3 bd11 0000 0000 0004 3131  ...fO.........11
>>         0x0080:  3238 0000 0254 5b30 2c7b 2261 7022 3a22  28...T[0,{"ap":"
>>
>> 20:55:40.835297 IP 172.18.69.180.9092 > 172.18.69.194.34445: Flags [.],
>> ack 691, win 7990, length 0
>>         0x0000:  4500 0028 e872 4000 4006 6ec2 ac12 45b4  E..(.r@
>> .@.n...E.
>>         0x0010:  ac12 45c2 2384 868d 49cf 692d 01e5 0d85  ..E.#...I.i-....
>>         0x0020:  5010 1f36 408b 0000 0000 0000 0000       P..6@.........
>> 20:55:40.837837 IP 172.18.69.180.9092 > 172.18.69.194.34445: Flags [P.],
>> seq 1:47, ack 691, win 7990, length 46
>>         0x0000:  4500 0056 e873 4000 4006 6e93 ac12 45b4  E..V.s@
>> .@.n...E.
>>         0x0010:  ac12 45c2 2384 868d 49cf 692d 01e5 0d85  ..E.#...I.i-....
>>         0x0020:  5018 1f36 ece3 0000 0000 002a 0000 0003  P..6.......*....
>>         0x0030:  0000 0001 000e 6576 656e 745f 6e73 706f  ......event_nspo
>>         0x0040:  6c69 6379 0000 0001 0000 0000 0000 0000  licy............
>>         0x0050:  0000 0003 6527                           ....e'
>> 20:55:40.837853 IP 172.18.69.194.34445 > 172.18.69.180.9092: Flags [.],
>> ack 47, win 29, length 0
>>         0x0000:  4500 0028 8cc4 4000 4006 ca70 ac12 45c2  E..(..@.@..p..E.
>>         0x0010:  ac12 45b4 868d 2384 01e5 0d85 49cf 695b  ..E...#.....I.i[
>>         0x0020:  5010 001d e3b5 0000                      P.......
>>
>> Closed here
>>>>>
>>>> 21:05:40.839440 IP 172.18.69.180.9092 > 172.18.69.194.34445: Flags
>> [F.], seq 47, ack 691, win 7990, length 0
>>         0x0000:  4500 0028 e874 4000 4006 6ec0 ac12 45b4  E..(.t@
>> .@.n...E.
>>         0x0010:  ac12 45c2 2384 868d 49cf 695b 01e5 0d85  ..E.#...I.i[....
>>         0x0020:  5011 1f36 405c 0000 0000 0000 0000       P..6@\........
>> 21:05:40.876047 IP 172.18.69.194.34445 > 172.18.69.180.9092: Flags [.],
>> ack 48, win 29, length 0
>>         0x0000:  4500 0028 8cc5 4000 4006 ca6f ac12 45c2  E..(..@.@..o..E.
>>         0x0010:  ac12 45b4 868d 2384 01e5 0d85 49cf 695c  ..E...#.....I.i\
>>         0x0020:  5010 001d e3b5 0000                      P.......
>>
>> 21:06:17.673188 IP 172.18.69.194.34445 > 172.18.69.180.9092: Flags [P.],
>> seq 691:1414, ack 48, win 29, length 723
>>         0x0000:  4500 02fb 8cc6 4000 4006 c79b ac12 45c2  E.....@
>> .@.....E.
>>         0x0010:  ac12 45b4 868d 2384 01e5 0d85 49cf 695c  ..E...#.....I.i\
>>         0x0020:  5018 001d e688 0000 0000 02cf 0000 0000  P...............
>>         0x0030:  0000 0008 000c 6b61 666b 612d 7079 7468  ......kafka-pyth
>>         0x0040:  6f6e 0001 0000 03e8 0000 0001 000e 6576  on............ev
>>         0x0050:  656e 745f 6e73 706f 6c69 6379 0000 0001  ent_nspolicy....
>>         0x0060:  0000 0000 0000 0293 0000 0000 0000 0000  ................
>>         0x0070:  0000 0287 e9e7 30d7 0000 0000 0004 3131  ......0.......11
>>         0x0080:  3238 0000 0275 5b30 2c7b 2261 7022 3a22  28...u[0,{"ap":"
>>
>> a RST is received here
>>>>>
>>>> 21:06:17.673391 IP 172.18.69.180.9092 > 172.18.69.194.34445: Flags [R],
>> seq 1238329692, win 0, length 0
>>         0x0000:  4500 0028 0000 4000 4006 5735 ac12 45b4  E..(..@.@.W5..E.
>>         0x0010:  ac12 45c2 2384 868d 49cf 695c 0000 0000  ..E.#...I.i\....
>>         0x0020:  5004 0000 6f08 0000 0000 0000 0000       P...o.........
>>
>>
>>
>>
>>
>


-- 
Regards,

Rajini

Reply via email to