4

Strange behavior, i working on configuring Kafka broker on my home server PC and trying to connect from another computer over wifi. The firewall port is opened on 9092 using following command

netsh advfirewall firewall add rule name="TCP Port 9092" dir=in action=allow protocol=TCP localport=9092

However when i try to use Test-NetConnection to test the port connectivity it fails. I cannot connect to any port that is configured as open in windows firewall settings not sure why. I have disabled ipv6 on client and server

PS C:\Users\ram> Test-NetConnection 10.58.35.113 -Port 9092 -Verbose
WARNING: TCP connect to (10.58.35.113 : 9092) failed
VERBOSE: 113.35.58.10.in-addr.arpa
VERBOSE: 113.35.58.10.in-addr.arpa
VERBOSE: 113.35.58.10.in-addr.arpa
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = QueryIsolationType,'className'
 = MSFT_NetAddressFilter,'namespaceName' = root\standardcimv2'.
VERBOSE: Operation 'Invoke CimMethod' complete.


ComputerName           : 10.58.35.113
RemoteAddress          : 10.58.35.113
RemotePort             : 9092
InterfaceAlias         : Wi-Fi
SourceAddress          : 10.58.35.134
PingSucceeded          : True
PingReplyDetails (RTT) : 1 ms
TcpTestSucceeded       : False

Update

Kafka broker is running with in windows linux subsystem, hence this odd behavior. When i install the kafka broker on window Test-Netconnection successful

ram4sof
  • 365
  • 1
  • 4
  • 14
  • if you stop firewall on the server, does the Test-Connection succeed ? – Christophe Feb 24 '21 at 07:34
  • @Christophe No it still fails, i completely turned off firewall for both private and public networks still the port 9092 fails – ram4sof Feb 24 '21 at 07:42
  • Can you call the command with `-Verbose`. Maybe you get some additional information. – Moerwald Feb 24 '21 at 08:20
  • @Moerwald updated post with -Verbose results without any firewall configured on server – ram4sof Feb 24 '21 at 08:28
  • Is anything actually using that port? Maybe try another port that you know is in use – T-Me Feb 24 '21 at 11:39
  • You shouldn't need a firewall opening in the same LAN since windows designates this as a trusted private network. Seems to me like your server isn't running or accepting remote connections (Kafka only binds locally, by default) if the connection is failing with the firewall off – OneCricketeer Feb 24 '21 at 15:25

0 Answers0