Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 02-04-2005
ssergei ssergei is offline
Registered User
 
Name: Sergey Shumko
Organization: BBSO/NJIT
Project: New Solar Telescope
 
Join Date: Jan 2005
Location: California
Posts: 16
Question How to detect an invalid proxy?

My question is, is there a way to detect if a proxy is bad, i.e. the server exited uncleanly, simply crashed? If a client tries to use proxy when server crashed the remote calls will never return. At least if you use an indirect proxy. I tried ice_ping() - it didn't return too.

Thanks,
Sergei.
Reply With Quote
  #2 (permalink)  
Old 02-04-2005
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
If the server process crashes, then ice_ping() should return with an exception (usually ConnectFailedException or ConnectionLostExcpetion). I do not know why it doesn't return such an exception in your case. The only case I can think of is if the server host (not just the server process) crashes. In this case, it might either take a very long time until the TCP stack detects that the server is not reachable, or it might not detect it at all. Setting a timeout on the calling proxy is the best option to avoid this problem.

In any case, you should be able to get more information about what's going on by analyzing the network tracing output of the client (with Ice.Trace.Network=2).
Reply With Quote
  #3 (permalink)  
Old 02-04-2005
ssergei ssergei is offline
Registered User
 
Name: Sergey Shumko
Organization: BBSO/NJIT
Project: New Solar Telescope
 
Join Date: Jan 2005
Location: California
Posts: 16
Thanks, Marc. No the server's host is ok. I think, it has something to do with an indirect proxy I use. The server registers an object with the registry and when server crashes, the object doesn't exist anymore but is still registered. When I remove the object from the registry manually, then ice_ping throws the "ObjectNotRegistered" exception.

Sergei.
Reply With Quote
  #4 (permalink)  
Old 02-04-2005
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
You should still get an exception when your client tries to connect to the server that is not running (after the client received the endpoint information for the server from IcePack). What is the tracing output of the client with Ice.Trace.Network=2?
Reply With Quote
  #5 (permalink)  
Old 02-04-2005
ssergei ssergei is offline
Registered User
 
Name: Sergey Shumko
Organization: BBSO/NJIT
Project: New Solar Telescope
 
Join Date: Jan 2005
Location: California
Posts: 16
Here is the trace output: "trying to establish tcp connection to <server's IP address:4471>. And this message repeats endlessly. And it stops and throws NotRegistered exception after I removed the object manually.

Sergei.
Reply With Quote
  #6 (permalink)  
Old 02-04-2005
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
Hmm... perhaps there is a bug with retry and indirect proxies. Can you run with Ice.Trace.Retry=2 and post the output here?
Reply With Quote
  #7 (permalink)  
Old 02-04-2005
ssergei ssergei is offline
Registered User
 
Name: Sergey Shumko
Organization: BBSO/NJIT
Project: New Solar Telescope
 
Join Date: Jan 2005
Location: California
Posts: 16
The output with trace.retry and trace.network:
----------------
Network: trying to establish tcp connection to <server's IP number>:1783
Retry: connection to endpoint failed, trying next endpoint
.\Network.cpp:536: Ice::ConnectionRefusedException:
connection refused: WSAECONNREFUSED ]
Retry: connection to cached endpoints failed
removing endpoints from cache and trying one more time
----------------
And again, this repeats endlessly.
Reply With Quote
  #8 (permalink)  
Old 02-04-2005
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
OK, looks as if there is a bug

Thanks for the report, we will investigate this.
Reply With Quote
  #9 (permalink)  
Old 02-05-2005
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,534
I was able to reproduce the problem. I believe this occurs only for indirect proxies containing only the identity of the object (let me know if that's not your case however). To work-around the problem for now, you could specify the adapter id in your proxy, i.e.: use 'identity@AdapterId' instead of just 'identity'.

We'll fix this bug ASAP and thanks again for the report!

Benoit.
Reply With Quote
  #10 (permalink)  
Old 02-07-2005
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,534
I've posted a patch here that should fix this bug. Thanks again for reporting this!

Benoit.
Reply With Quote
  #11 (permalink)  
Old 02-08-2005
ssergei ssergei is offline
Registered User
 
Name: Sergey Shumko
Organization: BBSO/NJIT
Project: New Solar Telescope
 
Join Date: Jan 2005
Location: California
Posts: 16
Thanks, Benoit. The program is working now. But C# part doesn't work. I guess, there is the same bug in C# (icecs library) code. Could you provide C# patch?

Thanks again,
Sergei.
Reply With Quote
  #12 (permalink)  
Old 02-09-2005
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,534
I've added the patch for C# here.

Benoit.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a HTTP-Proxy with ICE? Farmer Help Center 7 11-28-2006 11:02 AM
"Invalid UTF8 string" when transer chinese chars between cpp server and csharp client raygo Help Center 8 03-21-2006 09:34 PM
Python interactive mode - invalid value for element 0 JavaJack Help Center 2 11-16-2005 08:23 PM
Proxy to 127.0.0.1 Nis Baggesen Help Center 3 02-16-2005 05:04 PM
OpenSSLPluginI.cpp, invalid static cast on FreeBSD rodrigc Patches 0 02-27-2003 01:08 PM


All times are GMT -4. The time now is 02:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.