How to fix "connection lost cannot connect to server" error on minecraft?

I have been trying to connect to my friends minecraft server for 2 Days now and every time I try to connect it gives me the same error... "connection lost" can someone please tell me what I can do"..
Update: The other error it gives me is "Internal exception: connection reset"
"End of stream"
1 answer 1