[tao-users] After an upgrade of ACE/TAO from 2.2.2 to 2.3.3, the behaviour of the portspan parameter of -ORBListenEndpoints seems to have changed.
Maarten Van Hout
Maarten.VanHout at get.be
Wed May 18 08:37:29 CDT 2016
TAO VERSION: 2.3.3
ACE VERSION: 6.3.3
HOST MACHINE and OPERATING SYSTEM:
Windows 7, Winsock2
COMPILER NAME AND VERSION (AND PATCHLEVEL):
Visual Studio 2015 Express Edition 19.00.23918 for x86
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]:
ace/config-win32.h
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
(used by MPC when you generate your own makefiles):
-
AREA/CLASS/EXAMPLE AFFECTED:
-
DOES THE PROBLEM AFFECT:
COMPILATION? No
LINKING? No
EXECUTION? Yes
The problem affects all our server applications.
SYNOPSIS:
After an upgrade of ACE/TAO from 2.2.2 to 2.3.3, the behaviour
of the portspan parameter of -ORBListenEndpoints seems to have
changed.
DESCRIPTION:
The following options are used to start our servers:
-ORBListenEndpoints iiop://192.168.205.48:2001/portspan=31
-ORBInitRef NameService=corbaloc:iiop:GET12022:1570/NameService
With the first option, we use portspan=31 so our servers listen on
the first free port, starting at 2001 till 2031.
This has always worked, but ever since the upgrade, it didn't.
What we saw when using TAO 2.3.3 was the following. After startup,
all our servers where listening on port 2001, but only the first server
to start was able to establish a connection with the naming service.
With TAO 2.2.2 the behaviour was different. The first server started
would use port 2001, the second 2002, and so on. What we expected our
servers to continue doing after the upgrade to 2.3.3.
We managed to get the needed behaviour by changing the first option to
-ORBListenEndpoints iiop://192.168.205.48:2001/portspan=31&reuse_addr=0
Is this the way to go now? Why did this behaviour change? Was it a bug that
has been fixed? Or is it a bug now?
REPEAT BY:
Please adjust the ip address in the following program. When executing
this application twice, you should see the 2 applications listen
on the same port (2001).
#include "tao/TAO_Internal.h"
#include "tao/PortableServer/PortableServer.h"
int main()
{
CORBA::ORB_var orb = CORBA::ORB::_nil();
PortableServer::POA_var poa = PortableServer::POA::_nil();
PortableServer::POAManager_var poa_manager
= PortableServer::POAManager::_nil();
if(! CORBA::is_nil(orb)) return 1;
char* oargv[] = {
"dummy",
"-ORBListenEndpoints",
const_cast<char*>(
"iiop://192.168.205.48:2001/portspan=31"),
0
};
int oargc = (sizeof(oargv)/sizeof(char*)) - 1;
orb = CORBA::ORB_init(oargc,oargv,"TAO_orb");
CORBA::Object_var poa_object
= orb->resolve_initial_references("RootPOA");
poa = PortableServer::POA::_narrow(poa_object);
poa_manager = poa->the_POAManager();
poa_manager->activate();
while(1);
return 0;
}
SAMPLE FIX/WORKAROUND:
Changing the first option to
-ORBListenEndpoints iiop://192.168.205.48:2001/portspan=31&reuse_addr=0
did the trick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.isis.vanderbilt.edu/pipermail/tao-users/attachments/20160518/dc14ff87/attachment.html>
More information about the tao-users
mailing list