Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ServerSocket(5000) does not respond to client

 
Arend van der Kolk
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am doing a client-server exercise from the book "Head First Java 2nd Edition" with 2 laptops on the same network.
My chat client (192.168.2.8) sends out a tcp request but it gets no response from the chat server(192.168.2.5). Any idea why?

It is all on one network (192.168.2.0/24)
The wireshark logging shows the TCP request from the client(x.x.2.8) but no response from the server(x.x.2.5). Only a retransmit by the client.


The CMD output show that the server is listening on port 5000:
C:\Users\Media Markt Apeldoor>netstat -ano | find "5000"
TCP 0.0.0.0:5000 0.0.0.0:0 LISTENING 10112
TCP [::]:5000 [::]:0 LISTENING 10112

chat server(192.168.2.5)



chat client (192.168.2.8)
 
henk eetvis
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using

Instead of
 
Campbell Ritchie
Marshal
Posts: 52621
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
 
Arend van der Kolk
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Henk,

No, that didn't work either. I was about to respond in dutch, ;-)

but i'll park the problem for now and try to solve it in a later stage.

thank you for the input
 
Henry Wong
author
Sheriff
Posts: 22542
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arend van der Kolk wrote:
I am doing a client-server exercise from the book "Head First Java 2nd Edition" with 2 laptops on the same network.
My chat client (192.168.2.8) sends out a tcp request but it gets no response from the chat server(192.168.2.5). Any idea why?

It is all on one network (192.168.2.0/24)


These "two laptops on the same network", by chance, are they windows machines? If so, one possibility is the Windows firewall.

Henry
 
Arend van der Kolk
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Henry,

You are so right!

It was indeed the d*#$m windows firewall that was on. Turned it off on both laptops and got a nice TCP handshake.

Thank you very much.
 
Arend van der Kolk
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can even try it yourself if you are interested to try this chat app via this server-client set up.

Run the client side on your side with my external IP 77.172.234.229

But you will have to give me the IP you are coming from so i can allow it in the firewall.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!