Home Help Center

Question on working with the IceGridAdmin tool

stephanstephan Member Stephan StapelOrganization: Stephan StapelProject: BristolNG
Hi!

A few posts ago I asked about using IceBox with IceGrid and C#. I decided to give the new admin UI a try and did the following:

Start the IceGrid Registry on the command line, start an IceGrid node on the command line. Start the UI, connect to the registry. At that time, the node is present in the UI (obviously). Now I added a new IceBox Server to the node, added a Service to this Server and did the following entries:

Server:

path to executable = ....\iceboxnet.exe
working directory = directory where the dll is located that is to be hosted by IceBox
activation-mode = on-demand
distribution = disable IcePatch distribution

for the service:
entry point = dllname.dll:namespace.classname

apply everything. Are there any more steps that I have to perform to make my application available? I think I'm puzzled with IceGrid once more. When trying:

string type = moduleName.InterfaceClassDisp_.ice_staticId();
Ice.ObjectPrx rgProxy = query.findObjectByType(type);

no valid proxy is returned. Could you give me a hint what to search for?

regs,

Stephan

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Did you save the application with the "Save to IceGrid registry" button from the toolbar (or the Save menu item from the "File" menu)? Once you saved the application, it should be available to your clients and visible to other IceGrid admin tools.

    The "findObjectByType" method from the IceGrid::Query interface searches for an object by type. You need to register an object with its type either with the IceGrid admin GUI, tool or with the IceGrid::Admin interface if you want to be able to look it up. See the section 36.5 in the Ice manual for more information on this.

    Let me know if this is still not clear!

    Cheers,
    Benoit.
  • stephanstephan Member Stephan StapelOrganization: Stephan StapelProject: BristolNG
    benoit wrote:
    Did you save the application with the "Save to IceGrid registry" button from the toolbar (or the Save menu item from the "File" menu)? Once you saved the application, it should be available to your clients and visible to other IceGrid admin tools.

    jap :)

    I think the problem might be in the 'Adapters' section under my service. If I understand correctly, I simply add an adapter here, give it a proper name ('adapter'), set the endpoint ('tcp') and done. Is that right?

    However, I cannot start the service when I have such an adapter enabled but receive a time-out. Are there additional things I have to take into account? For example, do I have to enter some registered objects here or is this optional?

    regs,

    Stephan
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    No, you don't have to add objects. In general, the server activation times out because the registered object adapters aren't being activated by your service. What is the status of your object adapter named "adapter" when the activation times out, is it activated? Is there any other object adapters registered for your service?

    Cheers,
    Benoit.
  • stephanstephan Member Stephan StapelOrganization: Stephan StapelProject: BristolNG
    benoit wrote:
    What is the status of your object adapter named "adapter" when the activation times out, is it activated?

    Can I monitor the status of the adapter or did you mean the status of the service? The service stays in the status 'Activating' until the timeout.
    benoit wrote:
    Is there any other object adapters registered for your service?

    no, just one adapter. Simple scenario as in the IceBox hello demo.

    Stephan
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Yes, you can check the status of the adapter with the GUI by clicking on the adapter in the object tree. The current status of the adapter will be shown in the right panel.

    Did you make sure that the object adapter has the same name in your service implementation and in your service descriptor? Could you copy/paste your descriptor here (you can print the descriptor with the icegridadmin command "server describe <name>")? It would also be useful to see the traces of your IceGrid node with the properties IceGrid.Node.Trace.Adapter=2 and IceGrid.Node.Trace.Server=2 set.

    Cheers,
    Benoit.
  • stephanstephan Member Stephan StapelOrganization: Stephan StapelProject: BristolNG
    ok, it was indeed the adapter name. I changed it, now the service is running. Thanks a lot!

    This is the descriptor:
    icebox `MyIceBoxServer'
    {
        service manager endpoints = `tcp -h 127.0.0.1'
        application = `Extractor'
        node = `localhost'
        exe = `d:\ice-3.0.0\bin\iceboxnet.exe'
        pwd = `D:\MyApp.MyService\bin\Debug'
        activation = `on-demand'
        application distribution = `false'
        properties
        {
            IceBox.ServiceManager.Endpoints = `tcp -h 127.0.0.1'
        }
        adapter `IceBox.ServiceManager'
        {
            endpoints = `tcp -h 127.0.0.1'
            register process = `true'
            wait for activation = `true'
        }
        service `ExtractorService'
        {
            entry = `MyService.dll:Namespace.MyServiceI
            properties
            {
                Adapter.Endpoints = `'
                adapter.Endpoints = `tcp'
                ExtractorService.Endpoints = `tcp'
            }
            adapter `MyService
            {
                id = `MyIceBoxServer.MyService.MyService
                endpoints = `tcp'
                register process = `false'
                wait for activation = `true'
            }
        }
    }
    

    the only thing I still wonder about (sorry for such dumb questions :) ) why object list doesn't show the object I host in my IceBox-based server. Do I need to publish it's existence separately ?
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Yes, only objects which are explicitly registered with the descriptor or with the admin tool or interface will show up with the "object list" command. The Ice manual documents this in detail in the "36.5 Well-known objects" section.

    Cheers,
    Benoit.
  • stephanstephan Member Stephan StapelOrganization: Stephan StapelProject: BristolNG
    benoit wrote:
    Yes, only objects which are explicitly registered with the descriptor or with the admin tool or interface will show up with the "object list" command. The Ice manual documents this in detail in the "36.5 Well-known objects" section.

    Thanks a lot for your help. Everything is working fine now! When things finally work, I always ask myself why I failed with my first tries :)

    Wouldn't it make sense to give a brief introduction (tutorial) of the UI in your newsletter?

    And another recommendation. Wouldn't it be nice if objects are automatically registered to IceGrid (by option) when they are added to an adapter? This would really simplify deployment and remove one error source (one doesn't have to fill in the object identifier/ type form in the UI...

    And, my final thought :) on this topic. Wouldn't it also be a nice article for the newsletter to talk about monitoring of Ice objects/ servers with IceGrid? I mean, how to detect if they fail and how to find the reason they fail.

    regs,

    Stephan
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Stephan,
    stephan wrote:
    Thanks a lot for your help. Everything is working fine now! When things finally work, I always ask myself why I failed with my first tries :)

    Wouldn't it make sense to give a brief introduction (tutorial) of the UI in your newsletter?

    And another recommendation. Wouldn't it be nice if objects are automatically registered to IceGrid (by option) when they are added to an adapter? This would really simplify deployment and remove one error source (one doesn't have to fill in the object identifier/ type form in the UI...

    In general, you only register few well-known objects with the IceGrid registry. These well-known objects (factories, managers, etc) allow you to access other objects from your application. I'm not sure adding an option to allow to register the object with the registry when you add it with the object adapter is really worth the added complexity. It would also be inefficient, if you use indirect proxies, you only need to register the object once with the registry -- you don't need to register it each time you add it to the object adapter.
    And, my final thought :) on this topic. Wouldn't it also be a nice article for the newsletter to talk about monitoring of Ice objects/ servers with IceGrid? I mean, how to detect if they fail and how to find the reason they fail.
    regs,

    Stephan

    Thanks for your suggestions, we'll give them some thougths! I'm not sure there would be enough to write an article but we should certainly improve the "Solving Problems" section of the manual in the IceGrid chapter :).

    Cheers,
    Benoit.
Sign In or Register to comment.