Slow connection establishment C# <-> Java

in Help Center
We have a problem concerning ICE in C# and Java. We use Ice 3.4.2
We have 2 applications, that are communicating via ICE. One is written in Java and
the other in C#. All applications are running on the same machine.
The problem:
First RPC-Call from Java-App to C#-App needs long time (app. 1 minute). All other calls, after
the first one, are very fast... This also happens, if there were no RPCs for over 1 minute, then the
first is slow again.
The problemprogress:
If both applications are in Java, the ICE-RPCs are fast and there are no problems.
The problem is exactly the same, as mentioned in "Why is my .NET application so slow to start? - ZeroC Documentation - ZeroC" .
We already tried this (added this, to the app.config of the C#-application), without success. Is it, cause one application is in Java? How to fix it?
We have 2 applications, that are communicating via ICE. One is written in Java and
the other in C#. All applications are running on the same machine.
The problem:
First RPC-Call from Java-App to C#-App needs long time (app. 1 minute). All other calls, after
the first one, are very fast... This also happens, if there were no RPCs for over 1 minute, then the
first is slow again.
The problemprogress:
- C#-App creates a proxy {A} to itself (server proxy)
- C#-App gets the proxy {B} to the Java-App (client proxy)
- C#-App sends the proxy {A} via ICE-RPC to the Java-App {B} => {B}.registerObserver({A}* proxy) (This call is fast)
- The Java-App sends an ICE-RPC to this observerproxy {A}.onUpdate(...) (This call hangs up in Java for app. 1 minute)
- All next ICE-RPCs from Java are fast, until the connection is disconnected again (no use for more than 1 minute)
If both applications are in Java, the ICE-RPCs are fast and there are no problems.
The problem is exactly the same, as mentioned in "Why is my .NET application so slow to start? - ZeroC Documentation - ZeroC" .
We already tried this (added this, to the app.config of the C#-application), without success. Is it, cause one application is in Java? How to fix it?
0
Comments
Welcome to the forum.
Also, thank you for checking the FAQ before posting!
We need more information about what the Java app is doing during this delay. The most likely reasons are network issues or configuration problems, such as attempting to connect to an IP address that is inaccessible.
Please run both programs with Ice.Trace.Network=3 and Ice.Trace.Protocol=1, and post both log files.
Best regards,
Mark
I should say, that we have got 3 apps and one of that is not running, it uses port 10200, that why these connection fail to establish.
After that, this log repeats:
Because, we update the position and say to the observer, that it changed. I think the fault is in this lines
"-- 29.10.11 13:20:56:562 Network: trying to establish tcp connection to 169.254.197.14:10300
-- 29.10.11 13:21:17:592 Network: failed to establish tcp connection
local address = <not available>:45052
remote address = 169.254.197.14:10300"
Here it tries, to connect ip 169.254.197.14:10300 and this takes approx. 20 seconds. But how to prevent this?
It looks like you have a second network interface on this computer that fails to get an address through DHCP and gets the IP address 169.254.197.14 ... and you don't want to use that interface.
The solution is to specify '-h <address>' in your object adapter endpoint configuration, instead of -h * or no -h at all, which means listen on all interfaces.
I don't know why you don't have this issue for all your object adapters:
here you listen on all interfaces but don't get this 169.254.197.14.
In any case, use: or
to fix this issue.
Best regards,
Bernard