Archived
This forum has been archived. Please start a new discussion on GitHub.
IcePack + Debian Linux + Mono + NoEndpointException
When I start C# IcePack demos (simple and Hello) as is written in readme file, it wrotes on my debian linux normaly this:
When I get my network interface down with this command:
it works fine! I have Ice 2.1.2 (compiled from sources), Mono 1.1.8.1 (from standard debian packages). I dont see any other problems with network.
Ice.NoEndpointException: NoEndpointException in <0x00297> IceInternal.IndirectReference:getConnection (System.Boolean comp) in <0x00042> Ice._ObjectDelM:setup (IceInternal.Reference rf) in <0x000e2> Ice.ObjectPrxHelperBase:__getDelegate () in <0x0004a> Ice.ObjectPrxHelperBase:ice_isA (System.String __id, Ice.Context __context)
When I get my network interface down with this command:
ifdown eth0
it works fine! I have Ice 2.1.2 (compiled from sources), Mono 1.1.8.1 (from standard debian packages). I dont see any other problems with network.
0
Comments
-
At which step do you get this message?
Do you have a firewall configured for eth0?
Cheers,
Bernard0 -
everything works till starting client.exe - that message wrotes client.exe.
I think I have no firewall.
I am ataching file with installed debian packages and file with running processes.0 -
Hi,
When using IcePack, the most likely reason for a client receiving NoEndpointException is if the IcePack node failed to start a server.
It would be helpful for us to see the output from the IcePack node when running with the command-line options --Ice.Trace.Network=2 and --IcePack.Node.Trace.Activator=3. It might also be useful to see the output from the client when running with --Ice.Trace.Network=2. Try these options with eth0 up and down and let us know the outcome.
Also, for an IcePack node to be able to successfully launch a Mono-based server, the node's environment must be configured correctly. Specifically, the mono interpreter must be in the PATH, and the Ice DLLs must be in the GAC, or your MONO_PATH must be defined appropriately.
Take care,
- Mark0 -
trace
OK, so icepacknode:michal@deskbook:/download/ice/IceCS-2.1.2/demo/IcePack/simple$ icepacknode --Ice .Config=config --warn icepacknode: warning: administrative endpoints `IcePack.Registry.Admin.Endpoints ' enabled [ icepacknode: Network: attempting to bind to tcp socket 127.0.0.1:0 ] [ icepacknode: Network: accepting tcp connections at 127.0.0.1:32786 ] [ icepacknode: Network: attempting to bind to tcp socket 127.0.0.1:12000 ] [ icepacknode: Network: accepting tcp connections at 127.0.0.1:12000 ] [ icepacknode: Network: attempting to bind to tcp socket 127.0.0.1:0 ] [ icepacknode: Network: accepting tcp connections at 127.0.0.1:32787 ] [ icepacknode: Network: attempting to bind to tcp socket 127.0.0.1:0 ] [ icepacknode: Network: accepting tcp connections at 127.0.0.1:32788 ] [ icepacknode: Network: attempting to bind to tcp socket 127.0.0.1:0 ] [ icepacknode: Network: accepting tcp connections at 127.0.0.1:32789 ] [ icepacknode: Network: accepted tcp connection local address = 127.0.0.1:12000 remote address = 127.0.0.1:57331 ] [ icepacknode: Network: accepted tcp connection local address = 127.0.0.1:32787 remote address = 127.0.0.1:56622 ] [ icepacknode: Server: created server `Server' ] [ icepacknode: Adapter: created server adapter `Server.Hello' ] [ icepacknode: Network: shutting down tcp connection for writing local address = 127.0.0.1:12000 remote address = 127.0.0.1:57331 ] [ icepacknode: Network: closing tcp connection local address = 127.0.0.1:12000 remote address = 127.0.0.1:57331 ] [ icepacknode: Network: shutting down tcp connection for writing local address = 127.0.0.1:32787 remote address = 127.0.0.1:56622 ] [ icepacknode: Network: closing tcp connection local address = 127.0.0.1:32787 remote address = 127.0.0.1:56622 ]
admin:michal@deskbook:/download/ice/IceCS-2.1.2/demo/IcePack/simple$ icepackadmin --Ice.Config=config -e"application add 'application.xml'" [ icepackadmin: Network: trying to establish tcp connection to 127.0.0.1:12000 ] [ icepackadmin: Network: tcp connection established local address = 127.0.0.1:57331 remote address = 127.0.0.1:12000 ] [ icepackadmin: Network: trying to establish tcp connection to 127.0.0.1:32787 ] [ icepackadmin: Network: tcp connection established local address = 127.0.0.1:56622 remote address = 127.0.0.1:32787 ] [ icepackadmin: Network: shutting down tcp connection for writing local address = 127.0.0.1:57331 remote address = 127.0.0.1:12000 ] [ icepackadmin: Network: closing tcp connection local address = 127.0.0.1:57331 remote address = 127.0.0.1:12000 ] [ icepackadmin: Network: shutting down tcp connection for writing local address = 127.0.0.1:56622 remote address = 127.0.0.1:32787 ] [ icepackadmin: Network: closing tcp connection local address = 127.0.0.1:56622 remote address = 127.0.0.1:32787 ]
client with ifup:michal@deskbook:/download/ice/IceCS-2.1.2/demo/IcePack/simple$ ./client.exe [ Network: trying to establish tcp connection to 192.168.0.4:12000 ] [ Network: trying to establish tcp connection to 192.168.0.4:12000 ] [ Network: trying to establish tcp connection to 192.168.0.4:12000 ] [ Network: trying to establish tcp connection to 192.168.0.4:12000 ] Ice.NoEndpointException: NoEndpointException in <0x00297> IceInternal.IndirectReference:getConnection (System.Boolean comp) in <0x00042> Ice._ObjectDelM:setup (IceInternal.Reference rf) in <0x000e2> Ice.ObjectPrxHelperBase:__getDelegate () in <0x0004a> Ice.ObjectPrxHelperBase:ice_isA (System.String __id, Ice.Context __context)
(192.168.0.4 is my IP address on eth0)
client with ifdown:michal@deskbook:/download/ice/IceCS-2.1.2/demo/IcePack/simple$ ./client.exe [ Network: trying to establish tcp connection to 127.0.0.1:12000 ] [ Network: tcp connection established local address = 127.0.0.1:57339 remote address = 127.0.0.1:12000 ] [ Network: trying to establish tcp connection to 127.0.0.1:32791 ] [ Network: tcp connection established local address = 127.0.0.1:49599 remote address = 127.0.0.1:32791 ] usage: t: send greeting as twoway o: send greeting as oneway O: send greeting as batch oneway d: send greeting as datagram D: send greeting as batch datagram f: flush all batch requests T: set a timeout s: shutdown server x: exit ?: help ==>
Config file (only added last trace line):# # The IcePack locator proxy. # Ice.Default.Locator=IcePack/Locator:default -p 12000 # # IcePack registry configuration. # IcePack.Registry.Client.Endpoints=default -p 12000 IcePack.Registry.Server.Endpoints=default IcePack.Registry.Internal.Endpoints=default IcePack.Registry.Admin.Endpoints=default IcePack.Registry.Data=db/registry # # IcePack node configuration. # IcePack.Node.Name=node IcePack.Node.Endpoints=default IcePack.Node.Data=db/node IcePack.Node.CollocateRegistry=1 #IcePack.Node.Output=db #IcePack.Node.RedirectErrToOut=1 # # Trace properties. # IcePack.Node.Trace.Activator=3 IcePack.Node.Trace.Adapter=2 IcePack.Node.Trace.Server=3 Ice.Trace.Network=2
0 -
Ok, from the tracing output it's clear that the NoEndpointException occurs because the IcePack node's endpoint uses the address 127.0.0.1 but the client (with the eth0 interface up) attempts to establish a connection to address 192.168.0.4.
The configuration files included with the IcePack demos do not specify a hostname or address for any endpoints, which means the Ice run time uses the address associated with the default hostname. If you run the command 'hostname' and then look up the result in /etc/hosts, that will tell you the address of the default hostname.
I'm not sure why the IcePack node and your client are using different addresses in their endpoints, unless you are running things in the following sequence:
1. ifdown eth0
2. icepacknode ...
3. ifup eth0
4. mono client.exe ...
Also, I would have expected that a failure would occur in a program when the default hostname is associated with an interface that is disabled. I'm surprised that the program quietly falls back to using 127.0.0.1, unless your default hostname is listed in /etc/hosts for both addresses.
Anyway, one way to avoid this confusion is to modify the configuration file to use a particular address in all endpoints. To do this you would need to add "-h 192.168.0.4" to all properties containing endpoints, including Ice.Default.Locator and all properties with names like "xxx.Endpoints=...".
Take care,
- Mark0 -
I suspect your system is misconfigured, i.e. in /etc/hosts you have two IP addresses for you host name, something like:
127.0.0.1 deskbook
192.168.0.4 deskbook
while it should be:
127.0.0.1 localhost.localdomain localhost
192.168.0.4 deskbook.<your domain> deskbook
And somehow, Ice for C++ (IcePack and IcePack admin) picks one address (127.0.0.1) while Ice for C# (the client and server) picks the other one when both interfaces are up.
The best solution is to fix your /etc/hosts. If you can't, then specify the desired address everywhere (as suggested by Mark); an alternative is to set Ice.Default.Host to the desired address in both the config file and the server.xml file (and don't forget to do an application update 'application.xml' with icepackadmin).
Cheers,
Bernard0 -
hostname command give: deskbook
my /etc/hosts file:127.0.0.1 localhost.localdomain localhost deskbook 192.168.0.1 kovac 192.168.0.2 michal 192.168.0.1 kovac.homeip.net # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts
(I know that it is not best to have deskbook on 127.0.0.1 but it should not be problem for ICE)
I started both IcePack and client when interface was up.
so I don't know still where is the problem...
I can set Ice.Default.Host (I havent try yet), but still I think it's bug on your side.0 -
what if I make change in /etc/hosts
I tried to change /etc/hosts:
If I only delete deskbook from 127.0.0.1 (so there is no deskbook in hosts file):
icepacknode try to bind on IP adres of my server! (I use ipmasq on server) So the problem:michal@deskbook:/download/ice/IceCS-2.1.2/demo/IcePack/simple$ icepacknode --Ice.Config=config --warn icepacknode: warning: administrative endpoints `IcePack.Registry.Admin.Endpoints' enabled [ icepacknode: Network: attempting to bind to tcp socket 62.24.78.121:0 ] icepacknode: error: service caught unhandled Ice exception: Network.cpp:425: Ice::SocketException: socket exception: Cannot assign requested address
but client still use 192.168.0.4
When I add 192.168.0.4 deskbook to hosts file it works (on 192.168.0.4)0 -
By default Ice will use the numeric IP address associated to the hostname returned by the "gethostname" system call if you don't explicitly set the host in the endpoint configuration of an object adapter or proxy.
I would expect Ice for C++ and Ice for C# to behave the same way but from what you describe it doesn't look like it's the case.
I couldn't reproduce the problem with a similar /etc/host and hostname configuration with mono-1.1.7. However, I'm able to reproduce it with mono-1.1.8.2. It looks like something changed in this area in the mono runtime... we will have a closer look at this!
Benoit.0 -
thank you,
Michal0