[ 
https://issues.apache.org/jira/browse/KAFKA-14494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Zhovtanyuk updated KAFKA-14494:
------------------------------------
    Description: 
When Kafka Java client sits behind the SOCK5 proxy, it connects to the cluster, 
gets the list of brokers, but enters the infinite loop trying to detect the 
least loaded broker.

To the contrary, NodeJS client (a wrapper for librdkafka) with exactly the same 
setup, performs the same, but proceeds further to the binary data exchange.

 

Both clients and their execution logs are attached.

Java client logs looks like

 

As Java client ignores JVM proxy options (it uses custom socket factory), I've 
employed 
[socksify|https://manpages.debian.org/testing/dante-client/socksify.1.en.html] 
native library, that forcefully forwards all socket calls to the proxy server.

It can be installed with the package manager on any UNIX, e.g. for Ubuntu
{code:java}
sudo apt-get install dante-client{code}
 

Java client can be run as 
 * Kafka cluster URI + credentials -> 'client.properties',
 * 
{code:java}
mvn clean package{code}

 * 
{code:java}
./run-with-socksify.sh{code}

NodeJS client can be run as 
 * Kafka cluster URI + credentials -> 'consumer.js',
 * 
{code:java}
npm install .{code}

 * 
{code:java}
./run-with-socksify.sh {code}

 

 

 

  was:
When Kafka Java client sits behind the SOCK5 proxy, it can connect to the 
cluster, get the list of brokers, but enters the infinite loop trying to detect 
the least loaded broker.

To the contrary, NodeJS client (a wrapper for librdkafka) perform the same 
steps, but proceeds further to the binary data exchange.


> Kafka Java client can't send data when behind SOCKS proxy - while native 
> client can
> -----------------------------------------------------------------------------------
>
>                 Key: KAFKA-14494
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14494
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 3.3.1
>            Reporter: Oleg Zhovtanyuk
>            Priority: Major
>         Attachments: client-java.tar.gz, client-nodejs.tar.gz
>
>
> When Kafka Java client sits behind the SOCK5 proxy, it connects to the 
> cluster, gets the list of brokers, but enters the infinite loop trying to 
> detect the least loaded broker.
> To the contrary, NodeJS client (a wrapper for librdkafka) with exactly the 
> same setup, performs the same, but proceeds further to the binary data 
> exchange.
>  
> Both clients and their execution logs are attached.
> Java client logs looks like
>  
> As Java client ignores JVM proxy options (it uses custom socket factory), 
> I've employed 
> [socksify|https://manpages.debian.org/testing/dante-client/socksify.1.en.html]
>  native library, that forcefully forwards all socket calls to the proxy 
> server.
> It can be installed with the package manager on any UNIX, e.g. for Ubuntu
> {code:java}
> sudo apt-get install dante-client{code}
>  
> Java client can be run as 
>  * Kafka cluster URI + credentials -> 'client.properties',
>  * 
> {code:java}
> mvn clean package{code}
>  * 
> {code:java}
> ./run-with-socksify.sh{code}
> NodeJS client can be run as 
>  * Kafka cluster URI + credentials -> 'consumer.js',
>  * 
> {code:java}
> npm install .{code}
>  * 
> {code:java}
> ./run-with-socksify.sh {code}
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to