createObjectAdapter() attempts to connect to 127.0.0.1:0

ChuckoChucko Member Chuck FryOrganization: Dell Services Federal Gov't @ NASA AmesProject: Autonomous Mission Operations
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_storage const&)
libIce.34.dylib: IceInternal::TcpConnector::connect()
libIce.34.dylib: IceInternal::OutgoingConnectionFactory::ConnectCallback::nextConnector()
libIce.34.dylib: IceInternal::OutgoingConnectionFactory::getConnection(std::vector<IceInternal::OutgoingConnectionFactory::ConnectorInfo, std::allocator<IceInternal::OutgoingConnectionFactory::ConnectorInfo> > const&, IceUtil::Handle<IceInternal::OutgoingConnectionFactory::ConnectCallback> const&, bool&)
libIce.34.dylib: IceInternal::OutgoingConnectionFactory::ConnectCallback::getConnection()
libIce.34.dylib: IceInternal::OutgoingConnectionFactory::ConnectCallback::connectors(std::vector<IceInternal::Handle<IceInternal::Connector>, std::allocator<IceInternal::Handle<IceInternal::Connector> > > const&)
libIce.34.dylib: IceInternal::EndpointHostResolver::resolve(std::string const&, int, IceInternal::Handle<IceInternal::EndpointI> const&, IceUtil::Handle<IceInternal::EndpointI_connectors> const&)
libIce.34.dylib: IceInternal::TcpEndpointI::connectors_async(IceUtil::Handle<IceInternal::EndpointI_connectors> const&) const
libIce.34.dylib: IceInternal::OutgoingConnectionFactory::ConnectCallback::nextEndpoint()
libIce.34.dylib: IceInternal::OutgoingConnectionFactory::create(std::vector<IceInternal::Handle<IceInternal::EndpointI>, std::allocator<IceInternal::Handle<IceInternal::EndpointI> > > const&, bool, Ice::EndpointSelectionType, IceUtil::Handle<IceInternal::OutgoingConnectionFactory::CreateConnectionCallback> const&)
libIce.34.dylib: IceInternal::RoutableReference::createConnection(std::vector<IceInternal::Handle<IceInternal::EndpointI>, std::allocator<IceInternal::Handle<IceInternal::EndpointI> > > const&, IceUtil::Handle<IceInternal::Reference::GetConnectionCallback> const&) const
libIce.34.dylib: IceInternal::RoutableReference::getConnectionNoRouterInfo(IceUtil::Handle<IceInternal::Reference::GetConnectionCallback> const&) const
libIce.34.dylib: IceInternal::RoutableReference::getConnection(IceUtil::Handle<IceInternal::Reference::GetConnectionCallback> const&) const
libIce.34.dylib: IceInternal::ConnectRequestHandler::connect()
libIce.34.dylib: IceDelegateM::Ice::Object::setup(IceInternal::Handle<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::pair<std::string const, std::string> > > const*)
libIceExec.dylib: IceProxy::Ice::Object::ice_isA(std::string const&)
libIceExec.dylib: IceInternal::ProxyHandle<IceProxy::IceStorm::TopicManager> IceInternal::checkedCastImpl<IceInternal::ProxyHandle<IceProxy::IceStorm::TopicManager> >(IceInternal::ProxyHandle<IceProxy::Ice::Object> const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const*)
libIceExec.dylib: IceInternal::ProxyHandle<IceProxy::IceStorm::TopicManager> IceInternal::checkedCastHelper<IceProxy::IceStorm::TopicManager, IceProxy::Ice::Object>(IceInternal::ProxyHandle<IceProxy::Ice::Object> const&, void*, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const*)
libIceExec.dylib: IceInternal::ProxyHandle<IceProxy::IceStorm::TopicManager> IceInternal::ProxyHandle<IceProxy::IceStorm::TopicManager>::checkedCast<IceProxy::Ice::Object>(IceInternal::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$

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Welcome Chuck!

    It would help us to see the configuration properties you're using for this program. Can you paste those?

    Thanks,
    Mark
  • ChuckoChucko Member Chuck FryOrganization: Dell Services Federal Gov't @ NASA AmesProject: Autonomous Mission Operations
    OOPS. Never mind.

    I found the problem: the string I was using to contact the IceStorm topic manager was truncated in command line processing.

    Sorry to bother you.
Sign In or Register to comment.