[omniORB] OmniEvents problem
Alex Tingle
alex.omniorb at firetree.net
Fri Feb 11 13:52:10 GMT 2005
Hi Santos,
On Fri, 11 Feb 2005 13:29:42 +0100 (CET)
Tacio Santos <santos_list at yahoo.de> wrote:
> The object failure report has happened when I started omniEvents
> as below and stopped the pushconsumer with Ctrl-C. Both
> push-consumer and push-supplier are basically from the
> omnievents example programs. I've just changed the event type to
> be strings.
>
> /usr/local/sbin/omniEvents -P /var/run/omniEvents.pid
> -l /var/lib/omniEvents -p 11169
You should expect to get 'Object failure' when you kill a
PushConsumer. The message means that omniEvents has tried to contact
your object, but failed. The object that has failed is your
PushConsumer.
> By the way, just a small note, when we start omnievents with
> "omniEvents -t omnievents.trace -ORBtraceLevel 20" it doesn't
> look for the current directory, so the omnievents.trace ends in
> the / directory.
Yes, you're right. As a security measure it sets the current
directory to '/' when it forks.
>> It DOES show that you have 10 EventChannels and many *thousands*
>> of ProxyPushSuppliers active in omniEvents!!
> No, it wasn't on purpose. Correct me if I'm wrong, for what
> you've said, I think when I stop the pushconsumer with Ctrl-C it
> leaves active objects for omniEvents. The question is, how could
> I clean it? (Apart from deleting log and bak files) Is there a
> policy in omnievents that if the object does not respond for some
> time it considers it dead?
When omniEvents notices that a remote object has failed, it issues
the 'object failure' message and then *immediately* deletes the
corresponding proxy. You should not need to do any housekeeping of
your own.
So when a ProxyPushSupplier tries to push an event to a
PushConsumer and fails, the ProxyPushSupplier is immediately
killed. The ProxyPushSuppliers only notice that their consumer is
gone when they try to push an event - if you never send any events
to the channel, then they will never realise that their consumer
has failed.
The only way you can accumulate old ProxyPushSuppliers is to kill
their PushConsumers and then never send any more events to the
channel.
(Of course, you SHOULD catch the Ctrl-C signal and call
disconnect_push_supplier().)
> I've cleared it, and it started working again. The only thing
> I'm concerned of is to avoid creating this situation again.
I think you hit the problem because you made several event
channels without deleting any of them. If you do this:
% eventc -n MyChannel
% eventc -n MyChannel
% eventc -n MyChannel
%
...then you have created 3 event channels in omniEvents. The last
one is listed in the naming service as 'MyChannel'. The first two
are no longer listed in the naming service (because you reused the
same name), so you have no way to go back and remove them.
Perhaps you thought that you needed to re-create a channel each
time you started the event service?
To prevent this mistake, I recommend that you use the `-i' option.
That allows you to assign a unique name to the channel. omniEvents
will throw an exception if you try to reuse the same name:
% eventc -i UniqueName -n MyChannel
% eventc -i UniqueName -n MyChannel
Failed to create Event Channel: InvalidCriteria
%
See that the second command failed because the name 'UniqueName'
was already in use. You can also access the channel without having
to use the naming service. For example:
% rmeventc corbaloc::localhost:11169/UniqueName
%
...removes the channel (assuming omniEvents is running on localhost,
port 11169).
> PS: Should we CC to the list so others may profit for these support?
OK.
-Alex
--
:: alex tingle
:: http://www.firetree.net/consulting/
:: alex.tingle AT firetree.net +44-7901-552763
More information about the omniORB-list
mailing list