You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Valeriy Ak (Jira)" <ji...@apache.org> on 2024/10/11 09:23:00 UTC

[jira] [Updated] (ARTEMIS-5100) Cannot initialize queue: resource temporarily unavailable on auto tuning journal

     [ https://issues.apache.org/jira/browse/ARTEMIS-5100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Valeriy Ak updated ARTEMIS-5100:
--------------------------------
    Description: 
When the broker starts in the cloud, it runs the {{docker-run.sh}} script.

This script performs auto-tuning for the journal (to achieve the best performance).

However, the auto-tuning does not read {{broker.xml}} as I expected. Instead, it tries to determine the parameters for {{SyncCalculation.syncTest}} by itself.
 
It retrieves the default value for {{maxio}} from {{{}ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio(){}}}, which cannot be changed through configuration parameters or any other way (the value is 4096).
 
Thus, when {{newContext}} is called and it invokes the native {{{}io_queue_init{}}}, we encounter an error, and the execution stops.
{code:java}
 Auto tuning journal ...java.lang.RuntimeException: Cannot initialize queue:Resource temporarily unavailable        
at org.apache.activemq.artemis.nativo.jlibaio.LibaioContext.newContext(Native Method)        
at org.apache.activemq.artemis.nativo.jlibaio.LibaioContext.<init>(LibaioContext.java:180)        
at org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory.start(AIOSequentialFileFactory.java:290)        
at org.apache.activemq.artemis.cli.commands.util.SyncCalculation.newFactory(SyncCalculation.java:246)        
at org.apache.activemq.artemis.cli.commands.util.SyncCalculation.syncTest(SyncCalculation.java:80)        
at org.apache.activemq.artemis.cli.commands.Create.performAutoTune(Create.java:1045)        
at org.apache.activemq.artemis.cli.commands.Create.run(Create.java:824)        
at org.apache.activemq.artemis.cli.commands.Create.execute(Create.java:520)        
at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:221)        
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:167)        
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)        
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        
at java.base/java.lang.reflect.Method.invoke(Method.java:568)        
at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:157)        
at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:64)Couldn't perform sync calculation, using default values{code}
 

I think it happened because the max-io value in the guest OS might be lower than the default value in Artemis.

  was:
When the broker starts in the cloud, it runs the {{docker-run.sh}} script.

This script performs auto-tuning for the journal (to achieve the best performance).

However, the auto-tuning does not read {{broker.xml}} as I expected. Instead, it tries to determine the parameters for {{SyncCalculation.syncTest}} by itself.
 
It retrieves the default value for {{maxio}} from {{{}ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio(){}}}, which cannot be changed through configuration parameters or any other way (the value is 4096).
 
Thus, when {{newContext}} is called and it invokes the native {{{}io_queue_init{}}}, we encounter an error, and the execution stops.
{code:java}
 Auto tuning journal ...java.lang.RuntimeException: Cannot initialize queue:Resource temporarily unavailable        at org.apache.activemq.artemis.nativo.jlibaio.LibaioContext.newContext(Native Method)        at org.apache.activemq.artemis.nativo.jlibaio.LibaioContext.<init>(LibaioContext.java:180)        at org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory.start(AIOSequentialFileFactory.java:290)        at org.apache.activemq.artemis.cli.commands.util.SyncCalculation.newFactory(SyncCalculation.java:246)        at org.apache.activemq.artemis.cli.commands.util.SyncCalculation.syncTest(SyncCalculation.java:80)        at org.apache.activemq.artemis.cli.commands.Create.performAutoTune(Create.java:1045)        at org.apache.activemq.artemis.cli.commands.Create.run(Create.java:824)        at org.apache.activemq.artemis.cli.commands.Create.execute(Create.java:520)        at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:221)        at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:167)        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        at java.base/java.lang.reflect.Method.invoke(Method.java:568)        at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:157)        at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:64)Couldn't perform sync calculation, using default values{code}
 

I think it happened because the max-io value in the guest OS might be lower than the default value in Artemis.


> Cannot initialize queue: resource temporarily unavailable on auto tuning journal
> --------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-5100
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5100
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.33.0, 2.35.0
>            Reporter: Valeriy Ak
>            Priority: Major
>              Labels: asyncio, cloud, journal, libio
>
> When the broker starts in the cloud, it runs the {{docker-run.sh}} script.
> This script performs auto-tuning for the journal (to achieve the best performance).
> However, the auto-tuning does not read {{broker.xml}} as I expected. Instead, it tries to determine the parameters for {{SyncCalculation.syncTest}} by itself.
>  
> It retrieves the default value for {{maxio}} from {{{}ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio(){}}}, which cannot be changed through configuration parameters or any other way (the value is 4096).
>  
> Thus, when {{newContext}} is called and it invokes the native {{{}io_queue_init{}}}, we encounter an error, and the execution stops.
> {code:java}
>  Auto tuning journal ...java.lang.RuntimeException: Cannot initialize queue:Resource temporarily unavailable        
> at org.apache.activemq.artemis.nativo.jlibaio.LibaioContext.newContext(Native Method)        
> at org.apache.activemq.artemis.nativo.jlibaio.LibaioContext.<init>(LibaioContext.java:180)        
> at org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory.start(AIOSequentialFileFactory.java:290)        
> at org.apache.activemq.artemis.cli.commands.util.SyncCalculation.newFactory(SyncCalculation.java:246)        
> at org.apache.activemq.artemis.cli.commands.util.SyncCalculation.syncTest(SyncCalculation.java:80)        
> at org.apache.activemq.artemis.cli.commands.Create.performAutoTune(Create.java:1045)        
> at org.apache.activemq.artemis.cli.commands.Create.run(Create.java:824)        
> at org.apache.activemq.artemis.cli.commands.Create.execute(Create.java:520)        
> at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:221)        
> at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:167)        
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)        
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        
> at java.base/java.lang.reflect.Method.invoke(Method.java:568)        
> at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:157)        
> at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:64)Couldn't perform sync calculation, using default values{code}
>  
> I think it happened because the max-io value in the guest OS might be lower than the default value in Artemis.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact