Addresses fail to become ready if globalMaxSize is omitted from the infraconfig
See original GitHub issueDescribe the bug
If globalMaxSize is omitted from the standardinfraconfig or brokeredinfraconfig, addresses associated with addressspaces using that infraconfig will fail to become ready.
Internally, the agent fails like this:
2020-08-11T15:19:22.832Z agent INFO [broker-4fdeff9-seeu-0] all connectors exist
2020-08-11T15:19:22.841Z agent INFO [broker-4fdeff9-seeu-0] Adding/updating address settings: myqueue
2020-08-11T15:19:22.847Z agent ERROR [broker-4fdeff9-seeu-0] Failed to create new address setting myqueue: null
2020-08-11T15:19:22.847Z agent ERROR [broker-4fdeff9-seeu-0] Failed to retrieve broker address setting: myqueue null
2020-08-11T15:19:22.847Z agent ERROR [broker-4fdeff9-seeu-0] failed to retrieve addresses: null
2020-08-11T15:19:22.847Z agent WARN Rescheduling failed serialized func (null) in 5000ms.
Tracing the Agent’s interaction with the Broker, the addAddressSetting management function fails on the Broker with java.lang.IllegalArgumentException
. Examining with a debugger reveals that the maxSizeByte argument is null. The reason this is null is because the Agent’s calculation has produced a NaN
value. The NaN
value occurs when the globalMaxSize
is not passed via the BROKER_GLOBAL_MAX_SIZE
environment variable.
java.lang.IllegalArgumentException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.activemq.artemis.core.server.management.impl.ManagementServiceImpl.invokeOperation(ManagementServiceImpl.java:817)
at org.apache.activemq.artemis.core.server.management.impl.ManagementServiceImpl.handleMessage(ManagementServiceImpl.java:441)
at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.handleManagementMessage(ServerSessionImpl.java:2034)
at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.send(ServerSessionImpl.java:1803)
To Reproduce Steps to reproduce the behavior:
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
@lulf yes it does. I am working on better handling for the case where the is no globalMaxSize and no broker.memory set. Then I will raise a PR against master (0.33), and afterwards I can cherry-pick it to 0.32.
Thats a good catch @vbusch . Does this affect existing 0.32 releases?