Archived
This forum has been archived. Please start a new discussion on GitHub.
object adapter requires configuration
Hey,
I am trying to start my icegrid and keep getting the 'object adapter '{ServiceName} requires configuration' error message.
my application config is :
<?xml version="1.0" encoding="utf-8"?>
<icegrid>
<application name="HelloBartService">
<service-template id="HelloBartService">
<parameter name="name" />
<parameter name="binPath" />
<service name="${name}" entry="helloservice.dll:HelloServiceI">
<description>Barts Service</description>
<properties>
<property name="Hello.Identity" value="hello" />
</properties>
<adapter name="HelloBartService-${name}" endpoints="default" id="HelloBartService-${name}" replica-group="HelloBartServicegroup" server-lifetime="false" />
</service>
</service-template>
<server-template id="Glacier2">
<parameter name="instance-name" default="${application}.Glacier2" />
<parameter name="client-endpoints" />
<parameter name="server-endpoints" />
<parameter name="session-timeout" default="0" />
<server id="${instance-name}" activation="manual" exe="glacier2router">
<properties>
<property name="Ice.Admin.Endpoints" value="tcp -h 127.0.0.1" />
<property name="Glacier2.Client.Endpoints" value="${client-endpoints}" />
<property name="Glacier2.Server.Endpoints" value="${server-endpoints}" />
<property name="Glacier2.InstanceName" value="${instance-name}" />
<property name="Glacier2.SessionTimeout" value="${session-timeout}" />
</properties>
</server>
</server-template>
<replica-group id="HelloBartServicegroup">
<load-balancing type="random" n-replicas="2" />
<object identity="hello" type="::Demo::Hello" />
</replica-group>
<node name="RonsMachine">
<server-instance template="Glacier2" instance-name="DemoGlacier3" client-endpoints="tcp -h localhost -p 4063" server-endpoints="tcp">
<properties>
<property name="Glacier2.SessionManager" value="RonsReg/AdminSessionManager" />
<property name="Glacier2.PermissionsVerifier" value="DemoGlacier3/NullPermissionsVerifier" />
</properties>
</server-instance>
<icebox id="IceBox" activation="on-demand" exe="iceboxnet.exe">
<description>Barts Service</description>
<properties>
<property name="Ice.Admin.Endpoints" value="tcp -h 127.0.0.1" />
<property name="IceBox.InstanceName" value="${server}" />
<property name="IceBox.Trace.ServiceObserver" value="1" />
</properties>
<service-instance template="HelloBartService" name="Bart0" binPath="C:\IceGrid\icebox" />
<service-instance template="HelloBartService" name="Bart1" binPath="C:\IceGrid\icebox" />
</icebox>
</node>
</application>
</icegrid>
I have looked in the icegrid admin gui and it appears that the service entry point paths are absolute ... and wrong!
i.e. C:\IceGrid\icebox\\helloService.dll:HelloServiceI (too many \\'s)
where does it pick this address up from?
I have tried changing the above application config to include an absolute address and it doesn't seem to filter through to the GUI.
Any help would be appreciated
Cheers
Ronnie
I am trying to start my icegrid and keep getting the 'object adapter '{ServiceName} requires configuration' error message.
my application config is :
<?xml version="1.0" encoding="utf-8"?>
<icegrid>
<application name="HelloBartService">
<service-template id="HelloBartService">
<parameter name="name" />
<parameter name="binPath" />
<service name="${name}" entry="helloservice.dll:HelloServiceI">
<description>Barts Service</description>
<properties>
<property name="Hello.Identity" value="hello" />
</properties>
<adapter name="HelloBartService-${name}" endpoints="default" id="HelloBartService-${name}" replica-group="HelloBartServicegroup" server-lifetime="false" />
</service>
</service-template>
<server-template id="Glacier2">
<parameter name="instance-name" default="${application}.Glacier2" />
<parameter name="client-endpoints" />
<parameter name="server-endpoints" />
<parameter name="session-timeout" default="0" />
<server id="${instance-name}" activation="manual" exe="glacier2router">
<properties>
<property name="Ice.Admin.Endpoints" value="tcp -h 127.0.0.1" />
<property name="Glacier2.Client.Endpoints" value="${client-endpoints}" />
<property name="Glacier2.Server.Endpoints" value="${server-endpoints}" />
<property name="Glacier2.InstanceName" value="${instance-name}" />
<property name="Glacier2.SessionTimeout" value="${session-timeout}" />
</properties>
</server>
</server-template>
<replica-group id="HelloBartServicegroup">
<load-balancing type="random" n-replicas="2" />
<object identity="hello" type="::Demo::Hello" />
</replica-group>
<node name="RonsMachine">
<server-instance template="Glacier2" instance-name="DemoGlacier3" client-endpoints="tcp -h localhost -p 4063" server-endpoints="tcp">
<properties>
<property name="Glacier2.SessionManager" value="RonsReg/AdminSessionManager" />
<property name="Glacier2.PermissionsVerifier" value="DemoGlacier3/NullPermissionsVerifier" />
</properties>
</server-instance>
<icebox id="IceBox" activation="on-demand" exe="iceboxnet.exe">
<description>Barts Service</description>
<properties>
<property name="Ice.Admin.Endpoints" value="tcp -h 127.0.0.1" />
<property name="IceBox.InstanceName" value="${server}" />
<property name="IceBox.Trace.ServiceObserver" value="1" />
</properties>
<service-instance template="HelloBartService" name="Bart0" binPath="C:\IceGrid\icebox" />
<service-instance template="HelloBartService" name="Bart1" binPath="C:\IceGrid\icebox" />
</icebox>
</node>
</application>
</icegrid>
I have looked in the icegrid admin gui and it appears that the service entry point paths are absolute ... and wrong!
i.e. C:\IceGrid\icebox\\helloService.dll:HelloServiceI (too many \\'s)
where does it pick this address up from?
I have tried changing the above application config to include an absolute address and it doesn't seem to filter through to the GUI.
Any help would be appreciated
Cheers
Ronnie
0
Comments
-
Hi Ronnie,I am trying to start my icegrid and keep getting the 'object adapter '{ServiceName} requires configuration' error message.
This indicates a mismatch between the object adapter name in your code and the object adapter name in your configuration. It sounds like your code is using {ServiceName} as object adapter name, when you'd want something like "HelloBartServicegroup-Bart0". The implementation of createObjectAdapter does not perform any substitution on the name you provide.I have looked in the icegrid admin gui and it appears that the service entry point paths are absolute ... and wrong!
i.e. C:\IceGrid\icebox\\helloService.dll:HelloServiceI (too many \\'s)
This is unrelated to the object adapter name mismatch above.
Where do you see this string with too many \\? In the generated configuration file? In the 'Live deployment' tab of the IceGrid Admin GUI?
Could you also post your actual IceGrid XML descriptor? The one in your first post does not use binPath for the entry value.
Cheers,
Bernard0 -
Hey Bernard,
Sorry if I added confusion with the quotes. The error message does state the correct service group of "object adapter 'Hello-Bart0' requires configuration'. I placed the {ServiceName} comment in as it appears to occur with any service I create.
my descriptor config is as follows:
<?xml version="1.0" encoding="utf-8"?>
<icegrid>
<application name="HelloBartService">
<service-template id="HelloBartService">
<parameter name="name" />
<parameter name="binPath" />
<service name="${name}" entry="${binPath}helloService.dll:HelloServiceI">
<description>Barts Service</description>
<properties>
<property name="Hello.Identity" value="hello" />
</properties>
<adapter name="HelloBartService-${name}" endpoints="default" id="HelloBartService-${name}" replica-group="HelloBartServicegroup" server-lifetime="false" />
</service>
</service-template>
<server-template id="Glacier2">
<parameter name="instance-name" default="${application}.Glacier2" />
<parameter name="client-endpoints" />
<parameter name="server-endpoints" />
<parameter name="session-timeout" default="0" />
<server id="${instance-name}" activation="manual" exe="glacier2router">
<properties>
<property name="Ice.Admin.Endpoints" value="tcp -h 127.0.0.1" />
<property name="Glacier2.Client.Endpoints" value="${client-endpoints}" />
<property name="Glacier2.Server.Endpoints" value="${server-endpoints}" />
<property name="Glacier2.InstanceName" value="${instance-name}" />
<property name="Glacier2.SessionTimeout" value="${session-timeout}" />
</properties>
</server>
</server-template>
<replica-group id="HelloBartServicegroup">
<load-balancing type="random" n-replicas="2" />
<object identity="hello" type="::Demo::Hello" />
</replica-group>
<node name="SE101269">
<server-instance template="Glacier2" instance-name="DemoGlacier3" client-endpoints="tcp -h localhost -p 4063" server-endpoints="tcp">
<properties>
<property name="Glacier2.SessionManager" value="RonsReg/AdminSessionManager" />
<property name="Glacier2.PermissionsVerifier" value="DemoGlacier3/NullPermissionsVerifier" />
</properties>
</server-instance>
<icebox id="IceBox" activation="on-demand" exe="iceboxnet.exe">
<description>Barts Service</description>
<properties>
<property name="Ice.Admin.Endpoints" value="tcp -h 127.0.0.1" />
<property name="IceBox.InstanceName" value="${server}" />
<property name="IceBox.Trace.ServiceObserver" value="1" />
</properties>
<service-instance template="HelloBartService" name="Bart0" binPath="C:\IceTest\" />
<service-instance template="HelloBartService" name="Bart1" binPath="C:\IceTest\" />
</icebox>
</node>
</application>
</icegrid>
my node config is as follows:
#
# Node properties
IceGrid.Node.Endpoints=tcp
IceGrid.Node.Name=SE101269
IceGrid.Node.Data=c:\icegrid\icebox\db
Ice.Default.Locator=RonsReg/Locator:tcp -h LN7S9438 -p 50001
and my registry config is as follows:
#
# The IceGrid instance name.
#
IceGrid.InstanceName=RonsReg
#
# The IceGrid locator proxy.
#
Ice.Default.Locator=RonsReg/Locator:tcp -h LN7S9438 -p 50001
#
# IceGrid registry configuration.
#
IceGrid.Registry.Client.Endpoints=tcp -h LN7S9438 -p 50001
IceGrid.Registry.Server.Endpoints=tcp
IceGrid.Registry.Internal.Endpoints=tcp
#
# Enable the admin session manager for use with Glacier2.
#
IceGrid.Registry.AdminSessionManager.Endpoints=tcp
IceGrid.Registry.Data=C:\IceGrid\icebox\db/master
IceGrid.Registry.PermissionsVerifier=RonsReg/NullPermissionsVerifier
IceGrid.Registry.AdminPermissionsVerifier=RonsReg/NullPermissionsVerifier
IceGrid.Registry.SSLPermissionsVerifier=RonsReg/NullSSLPermissionsVerifier
IceGrid.Registry.AdminSSLPermissionsVerifier=RonsReg/NullSSLPermissionsVerifier
#
# Dummy username and password for icegridadmin.
#
IceGridAdmin.Username=foo
IceGridAdmin.Password=bar
as for the too many "\\"s it appears only in the adminGUI as you can see from my config, the extra slash is not present for binPath0 -
I fixed it!
it turns out there was a mismatch in names ...
in the config I was stating "HelloBartService-${name}"
however in the Service code I was using :
_adapter = communicator.createObjectAdapter("Hello-" + name);
therefore I simply changed it to :
_adapter = communicator.createObjectAdapter("HelloBartService-" + name);
and it worked.0 -
Hi Ronnie,as for the too many "\\"s it appears only in the adminGUI as you can see from my config, the extra slash is not present for binPath
This could be a small bug.
Keep in mind that in config files, backslash is the escape character. So '\\' in a config file is the encoding for a single '\'. This is fully documented here: http://www.zeroc.com/doc/Ice-3.4.1-IceTouch/manual/Properties.31.3.html
In config files, \ in front of most characters is preserved; the exceptions are '#', '=', '\' and whitespace.
Cheers,
Bernard0