Skip to content

FluentD domain socket is not compliant with Proto v1 - no ack #1843

Open
@arcivanov

Description

Ack is not sent when using domain sockets. Domain sockets are reliable but this does not guarantee at-least-once promise of "chunk" and they should be otherwise treated as TCP as far as reliability goes.

FluentD: v1.1.0
OS: Fedora 27

TCP:

Establishing connection to ('127.0.0.1', 24224)
2018-02-03 23:51:09 +0000 [trace]: #0 connected fluent socket addr="172.17.0.1" port=57326
2018-02-03 23:51:09 +0000 [trace]: #0 accepted fluent socket addr="172.17.0.1" port=57326
2018-02-03 23:51:09 +0000 [trace]: #0 [output1] adding metadata instance=47187495938860 metadata=#<struct Fluent::Plugin::Buffer::Metadata timekey=1517616000, tag=nil, variables=nil>
2018-02-03 23:51:09 +0000 [trace]: #0 [output1] writing events into buffer instance=47187495938860 metadata_size=1
2018-02-03 23:51:09 +0000 [trace]: #0 sent response to fluent socket address="172.17.0.1" response={"ack"=>"G1zwYgk9EeiRN+SzGGe9Aw=="}
2018-02-03 23:51:09 +0000 [trace]: #0 [output1] adding metadata instance=47187495938860 metadata=#<struct Fluent::Plugin::Buffer::Metadata timekey=1517616000, tag=nil, variables=nil>
2018-02-03 23:51:09 +0000 [trace]: #0 [output1] adding metadata instance=47187495938860 metadata=#<struct Fluent::Plugin::Buffer::Metadata timekey=1517616000, tag=nil, variables=nil>
2018-02-03 23:51:09 +0000 [trace]: #0 [output1] writing events into buffer instance=47187495938860 metadata_size=1
Sending ['tag-name', 1517701869, {'value-x': 'a', 'value-y': 1}, {'size': 1, 'chunk': b'G1zwYgk9EeiRN+SzGGe9Aw=='}]
Sending ['tag-name', ((1517701869, {'value-x': 'a', 'value-y': 1}), (1517701869, {'value-x': 'm', 'value-b': 200})), {'size': 2, 'chunk': b'G10bggk9EeiRN+SzGGe9Aw=='}]
On <TcpConnection(EP (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 24224)), started daemon 140366872520448)> received: {'ack': b'G1zwYgk9EeiRN+SzGGe9Aw=='}
2018-02-03 23:51:09 +0000 [trace]: #0 sent response to fluent socket address="172.17.0.1" response={"ack"=>"G10bggk9EeiRN+SzGGe9Aw=="}
On <TcpConnection(EP (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 24224)), started daemon 140366872520448)> received: {'ack': b'G10bggk9EeiRN+SzGGe9Aw=='}
Connection <TcpConnection(EP (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 24224)), started daemon 140366872520448)> remote closed while reading
Scheduling close on <TcpConnection(EP (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 24224)), started daemon 140366872520448)>
Acknowledging chunk b'G1zwYgk9EeiRN+SzGGe9Aw=='
Acknowledging chunk b'G10bggk9EeiRN+SzGGe9Aw=='
Closing <TcpConnection(EP (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 24224)), started daemon 140366872520448)>

UNIX:

Establishing connection to /home/<snip>/fluent-logger-python/tests/fluent_sock/fluent.sock
Sending ['tag-name', 1517701872, {'value-x': 'a', 'value-y': 1}, {'size': 1, 'chunk': b'HSeVlgk9EeiRN+SzGGe9Aw=='}]
Sending ['tag-name', ((1517701872, {'value-x': 'a', 'value-y': 1}), (1517701872, {'value-x': 'm', 'value-b': 200})), {'size': 2, 'chunk': b'HSev/gk9EeiRN+SzGGe9Aw=='}]
2018-02-03 23:51:12 +0000 [trace]: #0 accepted fluent socket from ':': object_id=47187497540320
2018-02-03 23:51:12 +0000 [trace]: #0 [output1] adding metadata instance=47187495938860 metadata=#<struct Fluent::Plugin::Buffer::Metadata timekey=1517616000, tag=nil, variables=nil>
2018-02-03 23:51:12 +0000 [trace]: #0 [output1] writing events into buffer instance=47187495938860 metadata_size=1
2018-02-03 23:51:12 +0000 [trace]: #0 [output1] adding metadata instance=47187495938860 metadata=#<struct Fluent::Plugin::Buffer::Metadata timekey=1517616000, tag=nil, variables=nil>
2018-02-03 23:51:12 +0000 [trace]: #0 [output1] adding metadata instance=47187495938860 metadata=#<struct Fluent::Plugin::Buffer::Metadata timekey=1517616000, tag=nil, variables=nil>
2018-02-03 23:51:12 +0000 [trace]: #0 [output1] writing events into buffer instance=47187495938860 metadata_size=1
2018-02-03 23:51:12 +0000 [trace]: #0 [output1] adding metadata instance=47187495938860 metadata=#<struct Fluent::Plugin::Buffer::Metadata timekey=1517616000, tag=nil, variables=nil>
2018-02-03 23:51:12 +0000 [trace]: #0 [output1] writing events into buffer instance=47187495938860 metadata_size=1
Closing <UnixConnection(EP (<AddressFamily.AF_UNIX: 1>, <SocketKind.SOCK_STREAM: 1>, 6, '', '/home/<snip>/fluent-logger-python/tests/fluent_sock/fluent.sock'), started daemon 140366872520448)>
2018-02-03 23:51:15 +0000 [trace]: #0 closed fluent socket object_id=47187497540320

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions