An Ice novice here. I'm using Ice 3.4.1 on Mac OS X 10.6.7.
I am trying to get my first Ice C++ code to run. I'm having trouble in Ice::Communicator::createObjectAdapter(). I've specified the endpoints as "tcp -p 13011", and it seems to open the correct port on the Ethernet/WiFi interfaces. However, it seems to be using port 0 on the loopback interface. Any suggestions?
Here is a transcript with Ice.Trace.Network set to 2 and Ice.PrintStackTraces set to 1:
razor:bin cfry$ ./runExec
-- 06/14/11 16:40:57.049 /Users/cfry/src/asa/bin/asaExec: Network: attempting to bind to tcp socket 0.0.0.0:13011
-- 06/14/11 16:40:57.050 /Users/cfry/src/asa/bin/asaExec: Network: accepting tcp connections at 0.0.0.0:13011
local interfaces: 128.102.109.67, 128.102.242.13, 127.0.0.1
-- 06/14/11 16:40:57.050 /Users/cfry/src/asa/bin/asaExec: Network: published endpoints for object adapter `AsaExec':
tcp -h 128.102.109.67 -p 13011:tcp -h 128.102.242.13 -p 13011
-- 06/14/11 16:40:57.050 /Users/cfry/src/asa/bin/asaExec: Network: trying to establish tcp connection to 127.0.0.1:0
-- 06/14/11 16:40:57.050 /Users/cfry/src/asa/bin/asaExec: Network: failed to establish tcp connection to 127.0.0.1:0
Network.cpp:1184: Ice::SocketException:
socket exception: Can't assign requested address
-- 06/14/11 16:40:57.050 /Users/cfry/src/asa/bin/asaExec: Network: trying to establish tcp connection to 127.0.0.1:0
-- 06/14/11 16:40:57.050 /Users/cfry/src/asa/bin/asaExec: Network: failed to establish tcp connection to 127.0.0.1:0
Network.cpp:1184: Ice::SocketException:
socket exception: Can't assign requested address
!! 06/14/11 16:40:57.050 /Users/cfry/src/asa/bin/asaExec: error: Network.cpp:1184: Ice::SocketException:
socket exception: Can't assign requested address
-- 06/14/11 16:40:57.050 /Users/cfry/src/asa/bin/asaExec: Network: stopping to accept tcp connections at 0.0.0.0:13011
razor:bin cfry$ ./runExec
-- 06/14/11 16:44:02.958 /Users/cfry/src/asa/bin/asaExec: Network: attempting to bind to tcp socket 0.0.0.0:13011
-- 06/14/11 16:44:02.958 /Users/cfry/src/asa/bin/asaExec: Network: accepting tcp connections at 0.0.0.0:13011
local interfaces: 128.102.109.67, 128.102.242.13, 127.0.0.1
-- 06/14/11 16:44:02.958 /Users/cfry/src/asa/bin/asaExec: Network: published endpoints for object adapter `AsaExec':
tcp -h 128.102.109.67 -p 13011:tcp -h 128.102.242.13 -p 13011
-- 06/14/11 16:44:02.958 /Users/cfry/src/asa/bin/asaExec: Network: trying to establish tcp connection to 127.0.0.1:0
-- 06/14/11 16:44:03.010 /Users/cfry/src/asa/bin/asaExec: Network: failed to establish tcp connection to 127.0.0.1:0
Network.cpp:1184: Ice::SocketException:
socket exception: Can't assign requested address
-- 06/14/11 16:44:03.011 /Users/cfry/src/asa/bin/asaExec: Network: trying to establish tcp connection to 127.0.0.1:0
-- 06/14/11 16:44:03.011 /Users/cfry/src/asa/bin/asaExec: Network: failed to establish tcp connection to 127.0.0.1:0
Network.cpp:1184: Ice::SocketException:
socket exception: Can't assign requested address
!! 06/14/11 16:44:03.012 /Users/cfry/src/asa/bin/asaExec: error: Network.cpp:1184: Ice::SocketException:
socket exception: Can't assign requested address
libIce.34.dylib: IceInternal::doConnect(int, sockaddr_storage const&)
libIce.34.dylib: IceInternal::TcpTransceiver::connect(sockaddr_stor age const&)
libIce.34.dylib: IceInternal::TcpConnector::connect()
libIce.34.dylib: IceInternal::OutgoingConnectionFactory::ConnectCal lback::nextConnector()
libIce.34.dylib: IceInternal::OutgoingConnectionFactory::getConnect ion(std::vector<IceInternal::OutgoingConnectionFac tory::ConnectorInfo, std::allocator<IceInternal::OutgoingConnectionFact ory::ConnectorInfo> > const&, IceUtil::Handle<IceInternal::OutgoingConnectionFac tory::ConnectCallback> const&, bool&)
libIce.34.dylib: IceInternal::OutgoingConnectionFactory::ConnectCal lback::getConnection()
libIce.34.dylib: IceInternal::OutgoingConnectionFactory::ConnectCal lback::connectors(std::vector<IceInternal::Handle< IceInternal::Connector>, std::allocator<IceInternal::Handle<IceInternal::Co nnector> > > const&)
libIce.34.dylib: IceInternal::EndpointHostResolver::resolve(std::st ring const&, int, IceInternal::Handle<IceInternal::EndpointI> const&, IceUtil::Handle<IceInternal::EndpointI_connectors> const&)
libIce.34.dylib: IceInternal::TcpEndpointI::connectors_async(IceUti l::Handle<IceInternal::EndpointI_connectors> const&) const
libIce.34.dylib: IceInternal::OutgoingConnectionFactory::ConnectCal lback::nextEndpoint()
libIce.34.dylib: IceInternal::OutgoingConnectionFactory::create(std ::vector<IceInternal::Handle<IceInternal::Endpoint I>, std::allocator<IceInternal::Handle<IceInternal::En dpointI> > > const&, bool, Ice::EndpointSelectionType, IceUtil::Handle<IceInternal::OutgoingConnectionFac tory::CreateConnectionCallback> const&)
libIce.34.dylib: IceInternal::RoutableReference::createConnection(s td::vector<IceInternal::Handle<IceInternal::Endpoi ntI>, std::allocator<IceInternal::Handle<IceInternal::En dpointI> > > const&, IceUtil::Handle<IceInternal::Reference::GetConnect ionCallback> const&) const
libIce.34.dylib: IceInternal::RoutableReference::getConnectionNoRou terInfo(IceUtil::Handle<IceInternal::Reference::Ge tConnectionCallback> const&) const
libIce.34.dylib: IceInternal::RoutableReference::getConnection(IceU til::Handle<IceInternal::Reference::GetConnectionC allback> const&) const
libIce.34.dylib: IceInternal::ConnectRequestHandler::connect()
libIce.34.dylib: IceDelegateM::Ice::Object::setup(IceInternal::Hand le<IceInternal::Reference> const&, IceInternal::ProxyHandle<IceProxy::Ice::Object> const&, bool)
libIce.34.dylib: IceProxy::Ice::Object::createDelegate(bool)
libIce.34.dylib: IceProxy::Ice::Object::__getDelegate(bool)
libIce.34.dylib: IceProxy::Ice::Object::ice_isA(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std:air<std::string const, std::string> > > const*)
libIceExec.dylib: IceProxy::Ice::Object::ice_isA(std::string const&)
libIceExec.dylib: IceInternal::ProxyHandle<IceProxy::IceStorm::Topic Manager> IceInternal::checkedCastImpl<IceInternal::ProxyHan dle<IceProxy::IceStorm::TopicManager> >(IceInternal::ProxyHandle<IceProxy::Ice::Object > const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std:air<std::string const, std::string> > > const*)
libIceExec.dylib: IceInternal::ProxyHandle<IceProxy::IceStorm::Topic Manager> IceInternal::checkedCastHelper<IceProxy::IceStorm: :TopicManager, IceProxy::Ice::Object>(IceInternal::ProxyHandle<Ic eProxy::Ice::Object> const&, void*, std::map<std::string, std::string, std::less<std::string>, std::allocator<std:air<std::string const, std::string> > > const*)
libIceExec.dylib: IceInternal::ProxyHandle<IceProxy::IceStorm::Topic Manager> IceInternal::ProxyHandle<IceProxy::IceStorm::Topic Manager>::checkedCast<IceProxy::Ice::Object>(IceIn ternal::ProxyHandle<IceProxy::Ice::Object> const&)
libIceExec.dylib: PLEXIL::AsaExec::run(int, char**)
libIce.34.dylib: Ice::Application::doMain(int, char**, Ice::InitializationData const&)
libIce.34.dylib: Ice::Application::main(int, char**, Ice::InitializationData const&)
asaExec: main()
asaExec: start()
???: 0x0()
-- 06/14/11 16:44:03.012 /Users/cfry/src/asa/bin/asaExec: Network: stopping to accept tcp connections at 0.0.0.0:13011
razor:bin cfry$

air<std::string const, std::string> > > const*)
Reply With Quote