[En-Nut-Discussion] Connection reset when trying to connect

Harald Kipp harald.kipp at egnite.de
Sun Oct 12 13:29:40 CEST 2003


Hi Martin,

mmhhh...quite interesting problem. I agree, that most
probably this is a Nut/Net problem. May be, that connect
retries fail somehow, so that Java got an established
connection but Ethernut didn't.

No solution right now, I'll have to look into it ASAP.

Harald

At 06:30 12.10.2003 +0200, you wrote:
>Hi there,
>
>I want my ethernut to establish a tcp connection to a server (my PC), that 
>might not always be available. If the serving application is already 
>running when I try to connect via NutTcpConnect(), the connection will be 
>established and everything works just fine.
>However, if I start the service after the ethernut is already trying to 
>connect to it (in a loop), something strange happens on the server side 
>(which is actually a Java application). The blocking accept() call 
>returns, I get a Socket object that represents the connection to my 
>ethernut and it looks like the connection is established. But 
>NutTcpConnect() is still blocked (it will eventually return with -1 and 
>tcp error set to ECONNREFUSED) and when I try to read or write to the 
>socket (on the serverside), I get a socket exception "Connection reset". I 
>know this sounds like a Java problem and this is not a Java forum, but I 
>am pretty sure that Java's underlying implementation is correct (as are my 
>5 lines of code), and that the problem lies somwhere within Nut/Net.
>Does anyone have any idea what might be the problem and how to avoid a 
>real ugly workaround on the server side?
>
>Sincerely,
>  Martin Kresse
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo/en-nut-discussion




More information about the En-Nut-Discussion mailing list