Archived

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

Automatic Adapter registration

Hi,

I was going through ICE Pack Registry chapter, in that it is specified that Adapters automatically register their endpoint information with ICE Pack Registery if Ice.Default.Locator is specified and the adapterId attribute is specified for a given Adapter.

I have the following ICE Box Services:
Ice.Default.Locator=IcePack/Locator:tcp -p 12000
#Ice.Trace.Network=1
#Ice.Trace.Protocol=1
IceBox.ServiceManager.Endpoints=tcp -p 10000
IceBox.ServiceManager.AdapterId=theServiceManager

IceBox.Service.FCAMasterSearch=test.FCASearchServiceI
FCAMasterSearch.Endpoints=default
FCAMasterSearch.AdapterId=theFCAMasterSearch
FCAMasterSearch.Proxy=SimpleFCASearch@theFCAMasterSearch

IceBox.Service.QFSearchService=test.QFAgentServiceI
QFSearchService.Endpoints=default
QFSearchService.AdapterId=theQFSearchService
QFSearchService.Proxy=QFSearchAgent@theQFSearchService

IceBox.Service.GoogleSearchService=test.GoogleAgentServiceI
GooglSearchService.Endpoints=default
GoogleSearchService.AdapterId=theGoogleSearchService
GoogleSearchService.Proxy=GoogleSearchAgent@theGoogleSearchService

Here's my icepack registry config file:
#
# 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.Admin.Endpoints=default -p 13000
IcePack.Registry.Internal.Endpoints=default
IcePack.Registry.Data=c:/src/IdeaProjects/FCA/ICE/src/conf/db/registry
IcePack.Registry.DynamicRegistration=1

#
# IcePack node configuration.
#
IcePack.Node.Name=node
IcePack.Node.Endpoints=default
IcePack.Node.Data=c:/src/IdeaProjects/FCA/ICE/src/conf/db/node
IcePack.Node.CollocateRegistry=1

Started Ice Pack Registry/Node:
icepacknode --Ice.Config=registry.properties

Started the IceBox.Server with appropriate classpath
java -classpath %CLASSPATH% IceBox.Server --Ice.Config=icebox.properties

When trying to obtain the proxy of any of the services I get
Ice.NoEndpointException
proxy = "SimpleFCASearch -t @ theFCAMasterSearch"
at IceInternal.Reference.getConnection(Reference.java:646)
at Ice._ObjectDelM.setup(_ObjectDelM.java:184)
at Ice.ObjectPrxHelperBase.__getDelegate(ObjectPrxHelperBase.java:622)
at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:41)
at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:29)
at com.gale.fca.search.FCASearchServicePrxHelper.checkedCast(FCASearchServicePrxHelper.java:88)
at test.FCAIceBoxTestClient.main(FCAIceBoxTestClient.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)

Any idea? How to debug this?

I tried icepackadmin and did an adapter list and I get the following:
>>> adapter list
IcePack.Node.node
theServiceManager
theFCAMasterSearch
theQFSearchService
theGoogleSearchService
IcePack.Registry.Internal

Thanks,
--Venkat.

Comments

  • mes
    mes California
    Hi Venkat,

    Is Ice.Default.Locator defined for your test client?

    Take care,
    - Mark
  • Hi Mark,

    Yes, it is. I am using the same icebox.properties as the --Ice.Config= property on my clients command line.

    Sorry, I did not provide my ICE configuration: ICE 1.5.1, Windows 2000, java 1.4.2_03

    Thanks,
    --Venkat.
  • mes
    mes California
    Hi Venkat,

    I just finished an attempt to reproduce this problem. The only way I am able to cause the NoEndpointException is when I do not define Ice.Default.Locator. After I define it, my test client works fine.

    Can you run your test client with --Ice.Trace.Network=3 --Ice.Trace.Protocol=1 and paste the output?

    - Mark
  • Hi Mark,

    Here's the output of the client:

    C:\j2sdk1.4.2\bin\java -Xdebug -Xrunjdwp:transport=dt_socket,address=FHWS6690:3080,suspend=y,server=n -Dfile.encoding=windows-1252 -classpath C:\j2sdk1.4.2\jre\lib\charsets.jar;C:\j2sdk1.4.2\jre\lib\jce.jar;C:\j2sdk1.4.2\jre\lib\jsse.jar;C:\j2sdk1.4.2\jre\lib\plugin.jar;C:\j2sdk1.4.2\jre\lib\rt.jar;C:\j2sdk1.4.2\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2\jre\lib\ext\sunjce_provider.jar;D:\GOLD\test\application\classes;D:\GOLD\application\classes;C:\src\IdeaProjects\GOLD\extlib\sun\jars\mail-1.3.1.jar;C:\src\IdeaProjects\GOLD\extlib\sun\jars\activation-1.0.2.jar;D:\GOLD\common\classes;C:\src\IdeaProjects\GOLD\extlib\commons-beanutils\jars\commons-beanutils-1.6.jar;C:\src\IdeaProjects\GOLD\extlib\commons-collections\jars\commons-collections-2.1.jar;C:\src\IdeaProjects\GOLD\extlib\commons-lang\jars\commons-lang-2.0.jar;C:\src\IdeaProjects\GOLD\extlib\ehcache\jars\ehcache-0.7.jar;C:\src\IdeaProjects\GOLD\extlib\GOLD\jars\abc-clio-1.0-SNAPSHOT.jar;C:\src\IdeaProjects\GOLD\extlib\GOLD\jars\helpxmlbeans-1.0-SNAPSHOT.jar;C:\src\IdeaProjects\GOLD\extlib\GOLD\jars\hitsxmlbeans-1.0-SNAPSHOT.jar;C:\src\IdeaProjects\GOLD\extlib\GOLD\jars\pregoldxmlbeans-1.0-SNAPSHOT.jar;C:\src\IdeaProjects\GOLD\extlib\GOLD\jars\productconfig-1.0-SNAPSHOT.jar;C:\src\IdeaProjects\GOLD\extlib\jfig\jars\jfig-1.2.jar;C:\src\IdeaProjects\GOLD\extlib\junit\jars\junit-3.8.1.jar;C:\src\IdeaProjects\GOLD\extlib\log4j\jars\log4j-1.2.8.jar;C:\src\IdeaProjects\GOLD\extlib\mockobjects\jars\mockobjects-0.9.1.jar;C:\src\IdeaProjects\GOLD\extlib\mockobjects\jars\mockobjects-jdk1.3-j2ee1.3-0.09.jar;C:\src\IdeaProjects\GOLD\extlib\xerces\jars\xercesImpl-2.5.jar;C:\src\IdeaProjects\GOLD\extlib\xerces\jars\xmlParserAPIs-2.2.jar;C:\src\IdeaProjects\GOLD\extlib\commons-logging\jars\commons-logging-1.0.3.jar;C:\src\IdeaProjects\GOLD\extlib\sybase\jars\jconn2-5.5.jar;C:\src\IdeaProjects\GOLD\extlib\xml-beans\jars\xbean-1.0.3.jar;C:\src\IdeaProjects\GOLD\extlib\xml-beans\jars\xbean_xpath-1.0.3.jar;C:\src\IdeaProjects\GOLD\extlib\jaxen\jars\jaxen-1.1-beta-2.jar;C:\apps\googleapi\googleapi.jar;C:\Ice-1.5.1\lib\Ice.jar;C:\tomcat-5.0.27\common\lib\commons-dbcp-1.2.1.jar;C:\tomcat-5.0.27\common\lib\commons-pool-1.2.jar;C:\IntelliJ-EAP\lib\idea_rt.jar test.FCAIceBoxTestClient --Ice.Config=icebox.properties "--Ice.Default.Locator=IcePack/Locator:tcp -p 12000"
    [ Network: trying to establish tcp connection to 140.244.111.254:12000 ]
    [ Network: tcp connection established
    local address = 140.244.111.254:3082
    remote address = 140.244.111.254:12000 ]
    [ Network: received 14 of 14 bytes via tcp
    local address = 140.244.111.254:3082
    remote address = 140.244.111.254:12000 ]
    [ Protocol: received validate connection
    message type = 3 (validate connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 78
    request id = 1
    identity = IcePack/Locator
    facet =
    operation = findAdapterById
    nonmutating = true
    context = ]
    [ Network: sent 78 of 78 bytes via tcp
    local address = 140.244.111.254:3082
    remote address = 140.244.111.254:12000 ]
    [ Network: received 14 of 14 bytes via tcp
    local address = 140.244.111.254:3082
    remote address = 140.244.111.254:12000 ]
    [ Network: received 13 of 13 bytes via tcp
    local address = 140.244.111.254:3082
    remote address = 140.244.111.254:12000 ]
    [ Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 27
    request id = 1
    reply status = 0 (ok) ]
    [ Protocol: sending request
    message type = 0 (request)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 78
    request id = 2
    identity = IcePack/Locator
    facet =
    operation = findAdapterById
    nonmutating = true
    context = ]
    [ Network: sent 78 of 78 bytes via tcp
    local address = 140.244.111.254:3082
    remote address = 140.244.111.254:12000 ]
    [ Network: received 14 of 14 bytes via tcp
    local address = 140.244.111.254:3082
    remote address = 140.244.111.254:12000 ]
    [ Network: received 13 of 13 bytes via tcp
    local address = 140.244.111.254:3082
    remote address = 140.244.111.254:12000 ]
    [ Protocol: received reply
    message type = 2 (reply)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 27
    request id = 2
    reply status = 0 (ok) ]
    Ice.NoEndpointException
    proxy = "QFSearchAgent -t @ theQFSearchService"
    at IceInternal.Reference.getConnection(Reference.java:646)
    at Ice._ObjectDelM.setup(_ObjectDelM.java:184)
    at Ice.ObjectPrxHelperBase.__getDelegate(ObjectPrxHelperBase.java:622)
    at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:41)
    at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:29)
    at com.gale.fca.search.agent.SearchAgentPrxHelper.checkedCast(SearchAgentPrxHelper.java:88)
    at test.FCAIceBoxTestClient.main(FCAIceBoxTestClient.java:49)
    [ Protocol: sending close connection
    message type = 4 (close connection)
    compression status = 0 (not compressed; do not compress response, if any)
    message size = 14 ]
    [ Network: sent 14 of 14 bytes via tcp
    local address = 140.244.111.254:3082
    remote address = 140.244.111.254:12000 ]
    [ Network: shutting down tcp connection
    local address = 140.244.111.254:3082
    remote address = 140.244.111.254:12000 ]
    [ Network: closing tcp connection
    local address = 140.244.111.254:3082
    remote address = 140.244.111.254:12000 ]

    Process finished with exit code 1

    Thanks,
    --Venkat.
  • mes
    mes California
    Hi,

    We are still investigating this issue. I was able to reproduce this exception when I did the following:
    1. Start the node with empty database directories.
    2. Manually start IceBox (although I don't think IceBox has anything to do with this, it could be any server)
    3. Stop IceBox.
    4. Stop the node.
    5. Restart the node using the existing database directories.
    6. Restart IceBox.
    Is this similar to what you've done? If so, does your test client work correctly if you restart the node using new database directories?

    - Mark
  • Hi Mark,

    Yes, you are right. It works if I start with new db directories.

    Thanks,
    --Venkat.
  • Hi Mark,

    Another interesting thing is if I use default for the end points. Something screws up, even when I start with new db directories. Here's the output of icepackadmin --Ice.Config=registry.properties

    >>> adapter list
    IcePack.Node.node
    IcePack.Registry.Internal
    >>> adapter list
    IcePack.Node.node
    theServiceManager
    theFCAMasterSearch
    theQFSearchService
    theGoogleSearchService
    IcePack.Registry.Internal
    >>> adapter endpoints theGoogleSearchService
    dummy -t
    >>> adapter endpoints theQFSearchService
    dummy -t:tcp -h 140.244.111.254 -p 4267
    >>> adapter endpoints theFCASearchService
    [ icepackadmin: Location: retrieved endpoints from locator, adding to locator ta
    ble
    object = IcePack/Admin
    endpoints = tcp -h 140.244.111.254 -p 4233 ]
    error: .\Outgoing.cpp:378: Ice::UnknownException:
    unknown exception
    unknown exception text:
    unknown c++ exception
    >>>

    Only theQFSearchService endpoints are shown correctly. for theFCAMasterSearch I get an exception and for theGoogleSearchService I don't see any endpoint info.

    However in my previous run I had set the setpoints to default -p 15000, default -p 15001 and default -p 15002 for Master search, QF and GoogleSearchService respectively and every thing was running smooth with new directories.

    Thanks,
    --Venkat.
  • Hi Mark,

    I have started fresh today with new db directories etc., rebooted my windoze m/c etc...

    I stared icepacknode --Ice.Config=registry

    I started icepackadmin --Ice.Config=registry

    I started the IceBox.Server -classpath %CLASSPATH% --Ice.Config=config

    I get the following from icepackadmin adapter endpoints output:

    >>> adapter list
    IcePack.Node.node
    theServiceManager
    theFCAMasterSearch
    theQFSearchService
    theGoogleSearchService
    IcePack.Registry.Internal
    >>> adapter endpoints theFCAMasterSearch
    dummy -t:tcp -h 140.244.111.254 -p 3363
    >>> adapter endpoints theQFSearchService
    dummy -t:tcp -h 140.244.111.254 -p 3376
    >>> adapter endpoints theGoogleSearchService
    dummy -t
    >>>

    Look at the google one, no endpoint information. I don't know if the ICE libraries are getting confused with two services of the same type with default end points.

    Also, what does dummy mean in the above output.

    Thanks for your time,
    --Venkat.
  • mes
    mes California
    Hi Venkat,

    We're stilll looking into this issue, but we appreciate the additional information.

    The "dummy" value you're seeing is simply a fake identity that IcePack uses in a proxy to communicate an adapter's endpoints.

    - Mark
  • Hi Mark,

    I have a typo my configuration which was causing google to not have endpoints.

    GooglSearchService.Endpoints=default

    I was missing the e in Google that is why Google Service was not coming up with any endpoints. It might be useful to spit out a warning saying that a given Service is missing EndPoints.

    So the bottom line - is if I start with new directories, everything works but if I start with existing db directories I get NoEndPoint exception.

    Thanks,
    --Venkat.
  • benoit
    benoit Rennes, France
    Hi,

    Thanks again for the detailed bug report. I just wanted to let you know that we've found what was the problem. Expect a patch beginning of next week!

    Benoit.
  • benoit
    benoit Rennes, France
    Hi,

    I've just posted a patch that should fix this problem. Let me know if you still have issue after using this patch. See http://www.zeroc.com/vbulletin/showthread.php?s=&threadid=913

    Benoit.