how can icepackadmin remotely manage icepackregistry?

in Help Center
ice newbie needs your help for 1.5.1 ice version
1.icepackregistry started with config
IcePack.Registry.Data=/opt/Ice-1.5.1/slice/db
IcePack.Registry.Client.Endpoints=default -h 192.168.4.93 -p 12000
IcePack.Registry.Server.Endpoints=default
IcePack.Registry.Admin.Endpoints=default
IcePack.Registry.DynamicRegistration=1
so the registry listen on port 12000
2.i manully started the server (the same host where registry locates) which
createObjectAdapter("SimplePrinterAdapter")
and adapter->add(object, Ice::stringToIdentity("SimplePrinter"));
adapter->activate();
with the config
SimplePrinterAdapter.Endpoints=default -h 192.168.4.93 -p 11000
SimplePrinterAdapter.AdapterId=theadapter1
Ice.Default.Locator=IcePack/Locator:default -h 192.168.4.93 -p 12000
IcePack.Registry.Client.Endpoints=default -h 192.168.4.93 -p 12000
IcePack.Registry.Server.Endpoints=default -h 192.168.4.93
IcePack.Registry.Internal.Endpoints=default
IcePack.Registry.Admin.Endpoints=default
IcePack.Registry.Data=/opt/Ice-1.5.1/slice/db
3.in icepackadmin interacitve commandline
i find the adapter1 i had just created
but when i try to find object with the identifier SimplePrinter
>>> object find SimplePrinter
error: IcePack::ObjectNotExistException
is given
????????????does that mean i should use icepack::admin::addobject to explicitly add the object or i did something wrong
????????????and it seems fail to remotely to connect the registry for nether icepackadmin nor even server
4.my client could connect to server successfully if config is:
Proxy=SimplePrinter:default -h 192.168.4.93 -p 11000
????????????but if i add
Ice.Default.Locator=IcePack/Locator:default -h 192.168.4.93 -p 12000
and change the proxy entry to
[email protected]
should have the client try to connect the registry to query the [email protected] mapping but that always failed work why?
1.icepackregistry started with config
IcePack.Registry.Data=/opt/Ice-1.5.1/slice/db
IcePack.Registry.Client.Endpoints=default -h 192.168.4.93 -p 12000
IcePack.Registry.Server.Endpoints=default
IcePack.Registry.Admin.Endpoints=default
IcePack.Registry.DynamicRegistration=1
so the registry listen on port 12000
2.i manully started the server (the same host where registry locates) which
createObjectAdapter("SimplePrinterAdapter")
and adapter->add(object, Ice::stringToIdentity("SimplePrinter"));
adapter->activate();
with the config
SimplePrinterAdapter.Endpoints=default -h 192.168.4.93 -p 11000
SimplePrinterAdapter.AdapterId=theadapter1
Ice.Default.Locator=IcePack/Locator:default -h 192.168.4.93 -p 12000
IcePack.Registry.Client.Endpoints=default -h 192.168.4.93 -p 12000
IcePack.Registry.Server.Endpoints=default -h 192.168.4.93
IcePack.Registry.Internal.Endpoints=default
IcePack.Registry.Admin.Endpoints=default
IcePack.Registry.Data=/opt/Ice-1.5.1/slice/db
3.in icepackadmin interacitve commandline
i find the adapter1 i had just created
but when i try to find object with the identifier SimplePrinter
>>> object find SimplePrinter
error: IcePack::ObjectNotExistException
is given
????????????does that mean i should use icepack::admin::addobject to explicitly add the object or i did something wrong
????????????and it seems fail to remotely to connect the registry for nether icepackadmin nor even server
4.my client could connect to server successfully if config is:
Proxy=SimplePrinter:default -h 192.168.4.93 -p 11000
????????????but if i add
Ice.Default.Locator=IcePack/Locator:default -h 192.168.4.93 -p 12000
and change the proxy entry to
[email protected]
should have the client try to connect the registry to query the [email protected] mapping but that always failed work why?
0
Comments
Yes. You didn't provide any information about the failure (such as the exception that's occurring), but if you're using multiple hosts then the reason is probably because your IcePack.Server.Endpoints and IcePack.Admin.Endpoints properties do not contain "-h 192.168.4.93". When the -h option is not specified, the object adapter generally binds to 127.0.0.1, which would prevent clients on other hosts from connecting to ti. How does it fail?
Take care,
- Mark
so now the problem is simplified and looks like this
i try to run client on one host 192.168.4.100
[[email protected] samples]# more clientconfig
[email protected]
#Proxy=SimplePrinter:default -h 192.168.4.93 -p 11000
IcePack.Registry.Client.Endpoints=default -h 192.168.4.93 -p 12000
IcePack.Registry.Admin.Endpoints=default -h 192.168.4.93 -p 14000
Ice.Default.Locator=IcePack/Locator:default -h 192.168.4.93 -p 12000
----as my server on 192.168.4.93 is with serverconfig which says---
[[email protected] samples]# more serverconfig
SimplePrinterAdapter.Endpoints=default -h 192.168.4.93 -p 11000
SimplePrinterAdapter.AdapterId=theadapter1
IcePack.Registry.Server.Endpoints=default -h 192.168.4.93 -p 13000
Ice.Default.Locator=IcePack/Locator:default -h 192.168.4.93 -p 12000
and registry config file is like
IcePack.Registry.Data=/opt/Ice-1.5.1/slice/db
IcePack.Registry.Client.Endpoints=default -h 192.168.4.93 -p 12000
IcePack.Registry.Server.Endpoints=default -h 192.168.4.93 -p 13000
IcePack.Registry.Admin.Endpoints=default -h 192.168.4.93 -p 14000
IcePack.Registry.DynamicRegistration=1
if i startup with the clientconfig it says:
[[email protected] samples]# ./client --Ice.Config=clientconfig
[email protected]
Reference.cpp:712: Ice::NoEndpointException:
no suitable endpoint available for proxy `SimplePrinter -t @ theadapter1'
as my server is working on port 11000
Proxy=SimplePrinter:default -h 192.168.4.93 -p 11000
works fine ,but if i use the form like [email protected] gives the exception methoned above
if that means the object has not been registered into the registry ,is there any way if i want to refer to the object binded to adapter so that my client can danymically query it without knowing its endpoint. but using the forms like [email protected](will explicitely object registration be the only solution?)
i wonder it i make the statesment clear and looks forwarding to your help
Take care,
- Mark
fornunately the test passed in ice-2.0.0 client but still ice-1.5.1 server
but that doesn't matter
thanks for your help
your hard working will make ice loved by more and more developer