Multiple registrations of transport actions on startup


(Alexander Reelsen) #1

Hi,

I have these error messages in my log

[2011-12-26 01:09:39,942][WARN ][transport ]
[Cannonball] Registered two transport handlers for action /indices/
suggest/refresh, handlers: /indices/suggest/refresh, /indices/suggest/
refresh
[2011-12-26 01:09:39,942][WARN ][transport ]
[Cannonball] Registered two transport handlers for action /indices/
suggest/refresh/node, handlers: /indices/suggest/refresh/node, /
indices/suggest/refresh/node

The handler is the return string from a transportAction() and a
transportNodeAction() method each. The constructor of this action,
which extends a TransportNodesOperationAction, is called six times on
startup. As I merely copied the code from the
TransportNodesStatsAction, I am not sure what I am missing right now.

Can I add some neat debug level somewhere in order to find out more
information?

Thanks and happy holidays...

--Alexander


(Shay Banon) #2

Are you registering the action as a singleton in guice?

On Mon, Dec 26, 2011 at 2:18 AM, Alexander Reelsen <
alexander.reelsen@googlemail.com> wrote:

Hi,

I have these error messages in my log

[2011-12-26 01:09:39,942][WARN ][transport ]
[Cannonball] Registered two transport handlers for action /indices/
suggest/refresh, handlers: /indices/suggest/refresh, /indices/suggest/
refresh
[2011-12-26 01:09:39,942][WARN ][transport ]
[Cannonball] Registered two transport handlers for action /indices/
suggest/refresh/node, handlers: /indices/suggest/refresh/node, /
indices/suggest/refresh/node

The handler is the return string from a transportAction() and a
transportNodeAction() method each. The constructor of this action,
which extends a TransportNodesOperationAction, is called six times on
startup. As I merely copied the code from the
TransportNodesStatsAction, I am not sure what I am missing right now.

Can I add some neat debug level somewhere in order to find out more
information?

Thanks and happy holidays...

--Alexander


(Alexander Reelsen) #3

Hey Shay

found the problem, Binding them in my plugin module as eager singleton
like this

bind(TransportSuggestAction.class).asEagerSingleton();

was not enough, when not adding the module via modules() method in the
class extending AbstractPlugin...

--Alexander

On Dec 26, 3:34 pm, Shay Banon kim...@gmail.com wrote:

Are you registering the action as a singleton in guice?

On Mon, Dec 26, 2011 at 2:18 AM, Alexander Reelsen <

alexander.reel...@googlemail.com> wrote:

Hi,

I have these error messages in my log

[2011-12-26 01:09:39,942][WARN ][transport ]
[Cannonball] Registered two transport handlers for action /indices/
suggest/refresh, handlers: /indices/suggest/refresh, /indices/suggest/
refresh
[2011-12-26 01:09:39,942][WARN ][transport ]
[Cannonball] Registered two transport handlers for action /indices/
suggest/refresh/node, handlers: /indices/suggest/refresh/node, /
indices/suggest/refresh/node

The handler is the return string from a transportAction() and a
transportNodeAction() method each. The constructor of this action,
which extends a TransportNodesOperationAction, is called six times on
startup. As I merely copied the code from the
TransportNodesStatsAction, I am not sure what I am missing right now.

Can I add some neat debug level somewhere in order to find out more
information?

Thanks and happy holidays...

--Alexander


(system) #4