You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by MILOVIDOV Aleksandr <Al...@raiffeisen.ru.INVALID> on 2023/10/04 11:52:25 UTC

Artemis web-console: IllegalArgumentException

Hi Team,

Sometimes we have problem in Artemis management console on one of the test servers. When I try to list consumers, I get an error:

could not invoke list sessionsjava.lang.IllegalArgumentException : Comparison method violates its general contract!

Currently there are a lot of sessions and consumers, and I cannot find out which consumer (maybe misconfigured application) causes problem.
When I invoke listAllConsumersAsJSON() method, it's output does not contain IDs which are used for sorting by default in the sessions pane of the management console.
For example, there are a lot of "consumerID":0, some "consumerID":1119, 1125 in JSON output, and I wonder where does management console get long IDs like 283887157811, 283887157891 and vice versa.

How can I determine which client causes this problem?

When I get this error in management console, in the debug console it looks like:

Uncaught TypeError: Cannot read properties of undefined (reading 'selectParentNode')
    at Array.onError (eval at globalEval (lib-e53c220218.js:1:2794), <anonymous>:327:30)
    at lib-e53c220218.js:1:1858073
    at r.success (lib-e53c220218.js:1:1855396)
    at l (lib-e53c220218.js:1:27075)
    at Object.fireWith [as resolveWith] (lib-e53c220218.js:1:27832)
    at l (lib-e53c220218.js:1:75611)
    at XMLHttpRequest.<anonymous> (lib-e53c220218.js:1:79170)

Lines 325-328 in the debugger look like:

        function onError(response) {
            Core.notification("error", "could not invoke list sessions" + response.error);
            $scope.workspace.selectParentNode();
        };

It appears in versions 2.31.0, 2.30.0, 2.28.0 (maybe also in earlier versions).


--
Best regards,
Aleksandr Milovidov


-----------------------------------

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient any use, distribution, copying or disclosure is strictly prohibited. If you have received this message in error, please notify the sender immediately either by telephone or by e-mail and delete this message and any attachment from your system. Correspondence via e-mail is for information purposes only. AO Raiffeisenbank neither makes nor accepts legally binding statements by e-mail unless otherwise agreed.

-----------------------------------

Re: Artemis web-console: IllegalArgumentException

Posted by Justin Bertram <jb...@apache.org>.
The web console invokes the "listConsumers" operation on the
ActiveMQServerControl [1] which you can see here [2].

This looks like a bug on the broker when it tries to sort the results based
on a particular column.

The differences between the IDs returned by listAllConsumersAsJSON vs
listConsumers is caused by the differences in the way they're implemented
on the broker. The former returns
org.apache.activemq.artemis.core.server.ServerConsumer#getID and the latter
returns
org.apache.activemq.artemis.core.server.ConsumerInfo#getSequentialID.

Any information you can provide about how to reproduce this problem would
be greatly appreciated.

Thanks!


Justin

[1]
https://github.com/apache/activemq-artemis/blob/main/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java#L1896
[2]
https://github.com/apache/activemq-artemis/blob/main/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/consumers.js#L285

On Wed, Oct 4, 2023 at 6:52 AM MILOVIDOV Aleksandr
<Al...@raiffeisen.ru.invalid> wrote:

> Hi Team,
>
> Sometimes we have problem in Artemis management console on one of the test
> servers. When I try to list consumers, I get an error:
>
> could not invoke list sessionsjava.lang.IllegalArgumentException :
> Comparison method violates its general contract!
>
> Currently there are a lot of sessions and consumers, and I cannot find out
> which consumer (maybe misconfigured application) causes problem.
> When I invoke listAllConsumersAsJSON() method, it's output does not
> contain IDs which are used for sorting by default in the sessions pane of
> the management console.
> For example, there are a lot of "consumerID":0, some "consumerID":1119,
> 1125 in JSON output, and I wonder where does management console get long
> IDs like 283887157811, 283887157891 and vice versa.
>
> How can I determine which client causes this problem?
>
> When I get this error in management console, in the debug console it looks
> like:
>
> Uncaught TypeError: Cannot read properties of undefined (reading
> 'selectParentNode')
>     at Array.onError (eval at globalEval (lib-e53c220218.js:1:2794),
> <anonymous>:327:30)
>     at lib-e53c220218.js:1:1858073
>     at r.success (lib-e53c220218.js:1:1855396)
>     at l (lib-e53c220218.js:1:27075)
>     at Object.fireWith [as resolveWith] (lib-e53c220218.js:1:27832)
>     at l (lib-e53c220218.js:1:75611)
>     at XMLHttpRequest.<anonymous> (lib-e53c220218.js:1:79170)
>
> Lines 325-328 in the debugger look like:
>
>         function onError(response) {
>             Core.notification("error", "could not invoke list sessions" +
> response.error);
>             $scope.workspace.selectParentNode();
>         };
>
> It appears in versions 2.31.0, 2.30.0, 2.28.0 (maybe also in earlier
> versions).
>
>
> --
> Best regards,
> Aleksandr Milovidov
>
>
> -----------------------------------
>
> This message and any attachment are confidential and may be privileged or
> otherwise protected from disclosure. If you are not the intended recipient
> any use, distribution, copying or disclosure is strictly prohibited. If you
> have received this message in error, please notify the sender immediately
> either by telephone or by e-mail and delete this message and any attachment
> from your system. Correspondence via e-mail is for information purposes
> only. AO Raiffeisenbank neither makes nor accepts legally binding
> statements by e-mail unless otherwise agreed.
>
> -----------------------------------
>