Archived

This forum has been archived. Please start a new discussion on GitHub.

socket error creating endpoint on localhost

Hi,
I am trying to get back into using Ice, it has been a long time. I downloaded v 3.3, and wrote a very simple server application that inherits from Ice.Application. I pass in the path to the config.server file, and try to call

Ice.ObjectAdapter adapter =
communicator().createObjectAdapter("foo");

My server.config is right out of Hello World. The line that configures my endpoint is:

#
# The server creates one single object adapter with the name
# "Hello". The following line sets the endpoints for this
# adapter.
#
foo.Endpoints=tcp -h 127.0.0.1 -p 10000

but I always get this stack trace complaining about trying to create more than one listener on any given port/socket:

[ 8/11/2008 10:06:52:562 foo.cmd.vshost.exe: Network: attempt
ing to bind to tcp socket 127.0.0.1:10000 ]
Ice.SocketException
error = 0
at IceInternal.Network.doBind(Socket socket, EndPoint addr) in d:\builds\dist
builds\release\Ice-3.3.0\cs\src\Ice\Network.cs:line 554
at IceInternal.TcpAcceptor..ctor(Instance instance, String host, Int32 port)
in d:\builds\distbuilds\release\Ice-3.3.0\cs\src\Ice\TcpAcceptor.cs:line 149
at IceInternal.TcpEndpointI.acceptor(EndpointI& endpoint, String adapterName)
in d:\builds\distbuilds\release\Ice-3.3.0\cs\src\Ice\TcpEndpointI.cs:line 385
at IceInternal.IncomingConnectionFactory..ctor(Instance instance, EndpointI e
ndpoint, ObjectAdapter adapter, String adapterName) in d:\builds\distbuilds\rele
ase\Ice-3.3.0\cs\src\Ice\ConnectionFactory.cs:line 1445
at Ice.ObjectAdapterI..ctor(Instance instance, Communicator communicator, Obj
ectAdapterFactory objectAdapterFactory, String name, String endpointInfo, Router
Prx router, Boolean noConfig) in d:\builds\distbuilds\release\Ice-3.3.0\cs\src\I
ce\ObjectAdapterI.cs:line 929
at IceInternal.ObjectAdapterFactory.createObjectAdapter(String name, String e
ndpoints, RouterPrx router) in d:\builds\distbuilds\release\Ice-3.3.0\cs\src\Ice
\ObjectAdapterFactory.cs:line 166
at Ice.CommunicatorI.createObjectAdapter(String name) in d:\builds\distbuilds
\release\Ice-3.3.0\cs\src\Ice\CommunicatorI.cs:line 64
at qim.trading.indicators.network.QimNetworkIndicatorServer.run(String[] args
) in C:\qim\projects\qim.trading.indicators.network\qim.trading.indicators.netwo
rk\QimNetworkIndicatorServer.cs:line 28
Caused by: System.Net.Sockets.SocketException: Only one usage of each socket add
ress (protocol/network address/port) is normally permitted
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress
socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at IceInternal.Network.doBind(Socket socket, EndPoint addr) in d:\builds\distbuilds\release\Ice-3.3.0\cs\src\Ice\Network.cs:line 548

I rebooted the machine I am testing on, and I see no competing processes trying to use port 10000. I tried changing the port too, it does not help. If anyone has experienced an issue like this I would appreciate any assistance you can render.

thx
George Coles

Comments

  • bernard
    bernard Jupiter, FL
    Hi George,

    It's hard to tell what's wrong here. Can you run any of the Ice for .NET demo on this system (for example the hello demo)?

    If your server is very simple, the easiest could be to post the full source here (including Slice and config file): we should be able to spot the problem quickly!

    Best regards,
    Bernard