thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Craig <bencr...@apache.org>
Subject Re: Thrift server binding to (already) binded port
Date Wed, 09 Oct 2013 13:23:28 GMT
> From: "Duives, J. (Jelle)" <jelle.duives@tno.nl>
> To: "user@thrift.apache.org" <user@thrift.apache.org>, 
> Date: 10/09/2013 02:54 AM
> Subject: Thrift server binding to (already) binded port
> 
> Hi,
> 
> I'm using Thrift to transport information from one language to 
> another. Therefore I have created a TServer and a Client connecting 
> to it. When creating the server I (logically) need to set a port to 
> its TServerTransport. The strange thing is that when creating a 
> second server on the same port next to an already existing server, 
> it won't throw any exception. It will happily (try to) connect to 
> the same port. Shouldn't an exception be thrown?
> 
> Jelle

Which OS and language are you using?  It you are using C++ and a POSIX 
like operating system, you may be getting this behavior because of 
SO_REUSEADDR.  Try going into TServerSocket.cpp, searching for 
THRIFT_NO_SOCKET_CACHING, and commenting out the appropriate setsockopt 
block of code.

Mime
View raw message