2023年12月8日发(作者:)

错误解决

错误handling:

:61: Ice::UnknownLocalException:

unknown local exception:

:1218: Ice::ConnectionRefusedException:

connection refused: Connection refused

这回的错误是,我用./Proc 这个是没有用IceGrid管理起来的,而是我指定IP以及端口去直接试

图获得它的代理,所以,连接自然建立不起来。总是,connectiong refuse的错误主要是要联系

的两端没有准备好 无论是否通过icegrid

object adapter `ServiceAPIAdapter' requires configuration

Hi,Welcome to the forum!You're getting the exception because you're creating an object

adapter via the createObjectAdapter operation, and this operation expects you to define at a

minimum the configuration property that supplies the object adapter's endpoints. In your

example, you would need to define this property:nts=tcpThe value

you supply for this property may need to change based on your requirements. In the example

above, your subscriber's object adapter will be listening for callbacks from IceStorm on a

system-assigned port and on all available network can achieve the same effect

using the createObjectAdapterWithEndpoints operation:Code:Ice::ObjectAdapterPtr adapter =

communicator->createObjectAdapterWithEndpoints("iber", "tcp");It's no longer

necessary to define the configuration property in this case.I also noticed in Ice C++ demo that

subscribers seem to load the , what's the easy way to load such file without inheriting

from Ice::Application? Is that even necessary?No, it is not necessary to use Ice::Application. If

you want to load a configuration file, you can do it like this:Code:Ice::InitializationData initData;

ties = Ice::createProperties(); ties->load("");

Ice::CommunicatorPtr communicator = Ice::initialize(initData);Alternatively, you can pass the --

option on the command-line, but this requires you to pass your program's argument

vector to initialize or to , don't forget to activate your object

s,Mark

这个核心意思是,必须createObjectWithEndpoints 但是可以不指定具体的端口号,我在xml文

件里面写的东西不算数,算数的有两个方法:

1.用createObjectWithEndpoints

2.写在配置文件中

:46: Ice::UnknownUserException:

unknown user exception:

IceGrid::NodeUnreachableException

这个错误是因为你在xml文件中写了node2的信息,但是node2没有起起来哈,也就是没有配置

好。

Proc报出的错误:

seeproc

sh: seeproc: command not found

seeproc: showed process info

这个是因为什么?

:61: Ice::UnknownLocalException:

unknown local exception:

:1585: Ice::NoEndpointException:

no suitable endpoint available for proxy `IceGrid/Registry -t'

这个是因为Monitor 运行的时候没有加上--等参数

运行eveMonitor报错

./eveMonitor: error: :1243: Ice::ConnectionRefusedException:

connection refused: Connection refused

好像是这个地方你用了端口参数,但是icegrid不需要端口信息,才会报

connectionRefusedException的错误哈

在i中,

第一个参数是干什么的哈?

2 # This property is used to configure the endpoints of the clock

3 # subscriber adapter. These endpoints are where the client receives

4 # topic messages from IceStorm.

5 #

6 nts=tcp:udp

7

8 #

9 # This property is used by the clients to connect to IceStorm.

10 #

11 =eveMonitor/TopicManager:default -p 10000