You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "p-pavel (via GitHub)" <gi...@apache.org> on 2023/11/27 20:32:43 UTC

[PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

p-pavel opened a new pull request, #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689

   I can't reference an issue in JIRA because I can't register in JIRA.
   
   There's an obvious logic bug which leads to crash on startup (processing some queue that I believe came from upstream federate)
   
   `getPagingStore()` can validly return `null` as can be seen from [QueueFactoryImpl@99](https://github.com/apache/activemq-artemis/blob/36056a5bddeaf431bd282cc0f231f53675549117/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueFactoryImpl.java#L99).
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "p-pavel (via GitHub)" <gi...@apache.org>.
p-pavel commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1830662088

   > I was able to run it.. I had to wipe out my .m2/repository...
   > 
   > I need to run a specific version on this.. I guess I will bother @jbonofre here...
   > 
   > @p-pavel if you can reproduce this error, it would be a great help. removing the NPE would just hide the real issue as it's probably from an ordering situation.
   
   if you can build a bundle with specific version you can uninstall the bundle karaf had loaded and install your bundle
   ```
   bundle:uninstall <id>
   bundle:install <url> 
   ```
   you can find a bundle id with list command. the url can be mvn:.... if you can install your specific version in local .m2.
   
   if you can build your bundle with .x.x.x-SNAPSHOT version then newer snapshots from local .m2 can be installed automatically, or even watched.
   
   unfortunately I don't have experience with maven (I use scala). if @jbonofre could help.... 
   
   I'll try to reproduce the bug tomorrow.
   
   currently I could try to statically read the code that leads to QueryImpl initialisation with null pager.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828620403

   @p-pavel do you have an embedded scenario or any other differentiation on how you use the broker?
   
   
   There shouldn't be any usage of the QueueFactory with paging-manager = null. that was left there because of our embedded testsuite.. and thinking now it was a mistake.
   
   
   if you could help to identify in what situation this happened? 
   
   
   I'm going to add the fix.. sure.. but I would like to understand why it happened in the first place.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "p-pavel (via GitHub)" <gi...@apache.org>.
p-pavel commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828750950

   > @p-pavel can you guide me how to start the broker using your configuration?
   > 
   > I have dealt with Karaf many years ago.. and most of the things I have done were through the API directly.
   > 
   > if you could give me a tutorial real quick on how to start it?
   
   Sure.
   
   - Download, unpack and run Apache Karaf distribution: 
   ```sh
   curl -Ohttps://dlcdn.apache.org/karaf/4.4.4/apache-karaf-4.4.4.tar.gz
   tar zxf apache-karaf-4.4.4.tar.gz 
   cd apache-karaf-4.4.4
   bin/karaf
   ```
   Now in Karaf prompt:
   
   ```sh
   repo-add artemis
   feature:install jms artemis pax-jms-artemis 
   jms:create -t artemis artemis
   ```
   This WILL NOT reproduce the problem per se (there should be some broken federation configured). I probably can try to reproduce it but this will take me a day:)
   
   If you want to debug Artemis inside Karaf you can start Karaf as follows: 
   ```
   bin/karaf debugs
   ```
   and attach java debugger to port 5005. Karaf will pause before processing to component activation so you can put breakpoints in code etc.
   
   Hope this help


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828915253

   I could not find any users.cfg. I found users.properties. I uncommented the following two lines and I got the same results:
   
   ```
   #karaf = karaf,_g_:admingroup
   #_g_\:admingroup = group,admin,manager,viewer,systembundles,ssh
   ~                                                                    
   ```
   
   
   
   
   
   I suspect this will be some ordering issue (dependency issue) between modules. Years ago we used to have a jms layer for wildly, and perhaps the same is being used by Karaf.
   
   that's why I wanted to verify the ordering of things..
   
   
   And talking about such, this is downloading artemis 2.28 as I can see on a few operations in karat. I will need to install the snapshot.. that's another thing I will need to check.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "p-pavel (via GitHub)" <gi...@apache.org>.
p-pavel commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828777835

   > I'm getting the following:
   > 
   > ```
   > araf@root()> feature:install jms artemis pax-jms-artemis                                                                                                                                                           
   > org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=pax-jms-artemis; type=karaf.feature; version="[1.1.3,1.1.3]"; filter:="(&(osgi.identity=pax-jms-artemis)(type=karaf.feature)(version>=1.1.3)(version<=1.1.3))" [caused by: Unable to resolve pax-jms-artemis/1.1.3: missing requirement [pax-jms-artemis/1.1.3] osgi.identity; osgi.identity=artemis-amqp-client; type=karaf.feature]
   > 	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
   > 	at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:433)
   > 	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:420)
   > 	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:374)
   > 	at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:256)
   > 	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:399)
   > 	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069)
   > 	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004)
   > 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   > 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   > 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   > 	at java.base/java.lang.Thread.run(Thread.java:834)
   > Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve pax-jms-artemis/1.1.3: missing requirement [pax-jms-artemis/1.1.3] osgi.identity; osgi.identity=artemis-amqp-client; type=karaf.feature
   > 	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
   > 	... 12 more
   > ```
   
   My fault. In the root of Karaf distribution go to `etc/users.cfg` and uncomment last to lines (enabling user `karaf` with password `karaf`.
   
   This should do the trick 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828709033

   @p-pavel can you share a quick snippet with me on how the broker is used? I'm in particular interested in how QueueFactory received a pageStore == null. That could only happen if the createQueue was called before the broker is started.
   
   
   I"m thinking about going nuclear and requiring pageStore != null on the factory. So any wrong usage would be highlighted from the embedded usage. (preventing the issue from arising in the first place)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1904909556

   I don't know why you're having a NPE... but your fix won't cause any harm anyway.
   
   
   I'm merging it with some GitHub (fixing checkstyl on an empty state and adding a JIRA)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1830542825

   @jbonofre I need some pointers on how can I specify the version of artemis I want to use.. as I will need my own version. so I can do debugging.. etc
   
   
   And I will need some pointers on what user/password to use.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828599903

   @p-pavel do you still have the data in the circumstance this happened? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1904916057

   pushed commit fbfe81eb4d5f3c3c625a9beaa9647b837ed6058a into upstream/main


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1830530758

   How can I help ? Please let me know 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1830822707

   Paging was never supposed to be null. Unless something is initializing in the wrong order, which would be the right fix on this case here.
   
   
   Fixing that NPE clause will hide the real issue. I think we should find the real cause.
   
   
   We could throw an error in the constructor.. but I am not making any changes until I understand what happened


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1830506930

   @p-pavel I am pinging JB on #activemq  on slacker.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828731936

   @p-pavel can you guide me how to start the broker using your configuration?
   
   
   I have dealt with Karaf many years ago.. and most of the things I have done were through the API directly.
   
   if you could give me a tutorial real quick on how to start it? 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "p-pavel (via GitHub)" <gi...@apache.org>.
p-pavel commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828721125

   > @p-pavel can you share a quick snippet with me on how the broker is used? I'm in particular interested in how QueueFactory received a pageStore == null. That could only happen if the createQueue was called before the broker is started.
   > 
   > I"m thinking about going nuclear and requiring pageStore != null on the factory. So any wrong usage would be highlighted from the embedded usage. (preventing the issue from arising in the first place)
   
   There were no api calls beyond what OSGiBroker does itself. 
   
   Please note that the situation is related with federated usage. The queue had 'federated' in its name. There were no queues created in this instance.
   
   ```
   feature:install artemis
   jms:create -t artemis artemis
   jms:queues jms/artemis # crash
   ```
   
   
   
   I'm attaching the config. The federation part is commited:
   
   ```
   <configuration xmlns="urn:activemq"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="urn:activemq artemis-configuration.xsd">
   
      <core xmlns="urn:activemq:core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="urn:activemq:core artemis-configuration.xsd ">
   
         <persistence-enabled>true</persistence-enabled>
   
         <!-- this could be ASYNCIO, MAPPED, NIO
              ASYNCIO: Linux Libaio
              MAPPED: mmap files
              NIO: Plain Java Files
          -->
         <journal-type>NIO</journal-type>
   
         <paging-directory>./paging</paging-directory>
   
         <bindings-directory>./bindings</bindings-directory>
   
         <journal-directory>./journal</journal-directory>
   
         <large-messages-directory>./large-messages</large-messages-directory>
   
         <journal-datasync>true</journal-datasync>
   
         <journal-min-files>2</journal-min-files>
   
         <journal-pool-files>10</journal-pool-files>
   
         <journal-file-size>10M</journal-file-size>
   
         <!--
           You can verify the network health of a particular NIC by specifying the <network-check-NIC>
         element.
            <network-check-NIC>theNicName</network-check-NIC>
           -->
   
         <!--
           Use this to use an HTTP server to validate the network
            <network-check-URL-list>http://www.apache.org</network-check-URL-list> -->
   
         <!-- <network-check-period>10000</network-check-period> -->
         <!-- <network-check-timeout>1000</network-check-timeout> -->
   
         <!-- this is a comma separated list, no spaces, just DNS or IPs
              it should accept IPV6
   
              Warning: Make sure you understand your network topology as this is meant to validate if your
         network is valid.
                       Using IPs that could eventually disappear or be partially visible may defeat the purpose.
                       You can use a list of multiple IPs, and if any successful ping will make the server OK to continue
         running -->
         <!-- <network-check-list>10.0.0.1</network-check-list> -->
   
         <!-- use this to customize the ping used for ipv4 addresses -->
         <!-- <network-check-ping-command>ping -c 1 -t %d %s</network-check-ping-command> -->
   
         <!-- use this to customize the ping used for ipv6 addresses -->
         <!-- <network-check-ping6-command>ping6 -c 1 %2$s</network-check-ping6-command> -->
   
   
         <!-- how often we are looking for how many bytes are being used on the disk in ms -->
         <disk-scan-period>5000</disk-scan-period>
   
         <!-- once the disk hits this limit the system will block, or close the connection in certain
         protocols
              that won't support flow control. -->
         <max-disk-usage>90</max-disk-usage>
   
         <!-- should the broker detect dead locks and other issues -->
         <critical-analyzer>true</critical-analyzer>
   
         <critical-analyzer-timeout>120000</critical-analyzer-timeout>
   
         <critical-analyzer-check-period>60000</critical-analyzer-check-period>
   
         <critical-analyzer-policy>HALT</critical-analyzer-policy>
   
         <!-- the system will enter into page mode once you hit this limit.
              This is an estimate in bytes of how much the messages are using in memory
   
               The system will use half of the available memory (-Xmx) by default for the global-max-size.
               You may specify a different value here if you need to customize it to your needs.
   
               <global-max-size>100Mb</global-max-size>
   
         -->
   
         <acceptors>
   
            <!-- useEpoll means: it will use Netty epoll if you are on a system (Linux) that supports
            it -->
            <!-- amqpCredits: The number of credits sent to AMQP producers -->
            <!-- amqpLowCredits: The server will send the # credits specified at amqpCredits at this
            low mark -->
   
            <!-- Note: If an acceptor needs to be compatible with HornetQ and/or Artemis 1.x clients
            add
                       "anycastPrefix=jms.queue.;multicastPrefix=jms.topic." to the acceptor url.
                       See https://issues.apache.org/jira/browse/ARTEMIS-1644 for more information. -->
   
            <!-- Acceptor for every supported protocol -->
            <!-- <acceptor name="in-vm">vm://0</acceptor> -->
            <acceptor name="artemis">
               tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300</acceptor>
   
            <!-- AMQP Acceptor.  Listens on default AMQP port for AMQP traffic.-->
            <acceptor name="amqp">
               tcp://0.0.0.0:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300</acceptor>
   
            <!-- STOMP Acceptor. -->
            <acceptor name="stomp">
               tcp://0.0.0.0:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true</acceptor>
   
            <!-- HornetQ Compatibility Acceptor.  Enables HornetQ Core and STOMP for legacy HornetQ
            clients. -->
            <acceptor name="hornetq">
               tcp://0.0.0.0:5445?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true</acceptor>
   
            <!-- MQTT Acceptor -->
            <acceptor name="mqtt">
               tcp://0.0.0.0:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true</acceptor>
   
         </acceptors>
         <!-- <federations>
            <federation name="test" user="karaf" password="karaf">
               <upstream name="beelink">
                  <share-connection>true</share-connection>
                  <static-connectors>
                     <connector-ref>beelink</connector-ref>
                  </static-connectors>
                  <policy ref="testPolicy" />
                  <policy ref="testQueuePolicy"/>
               </upstream>
   
               <downstream name="beelinkd">
   
                  <share-connection>true</share-connection>
                  <static-connectors>
                     <connector-ref>beelink</connector-ref>
                  </static-connectors>
                  <policy ref="testPolicy"/>
                  <upstream-connector-ref>me</upstream-connector-ref>
   
               </downstream>
   
               <queue-policy name="testQueuePolicy">
                  <include queue-match="#" address-match="#"/>
               </queue-policy>
               <address-policy name="testPolicy" max-hops="1">
                   <include address-match="com.perikov#" /> 
               </address-policy>
            </federation>
         </federations> -->
   
         <connectors>
            <connector name="me">tcp://100.79.22.141:61616</connector>
            <connector name="beelink">tcp://100.91.161.153:61616</connector>
         </connectors>
   
   
         <security-settings>
            <security-setting match="#">
               <permission type="createNonDurableQueue" roles="manager" />
               <permission type="deleteNonDurableQueue" roles="manager" />
               <permission type="createDurableQueue" roles="manager" />
               <permission type="deleteDurableQueue" roles="manager" />
               <permission type="createAddress" roles="manager" />
               <permission type="deleteAddress" roles="manager" />
               <permission type="consume" roles="manager" />
               <permission type="browse" roles="manager" />
               <permission type="send" roles="manager" />
               <!-- we need this otherwise ./artemis data imp wouldn't work -->
               <permission type="manage" roles="manager" />
            </security-setting>
         </security-settings>
   
         <address-settings>
            <!-- if you define auto-create on certain queues, management has to be auto-create -->
            <address-setting match="activemq.management#">
               <dead-letter-address>DLQ</dead-letter-address>
               <expiry-address>ExpiryQueue</expiry-address>
               <redelivery-delay>0</redelivery-delay>
               <!-- with -1 only the global-max-size is in use for limiting -->
               <max-size-bytes>-1</max-size-bytes>
               <message-counter-history-day-limit>10</message-counter-history-day-limit>
               <address-full-policy>PAGE</address-full-policy>
               <auto-create-queues>true</auto-create-queues>
               <auto-create-addresses>true</auto-create-addresses>
            </address-setting>
            <!--default
            for catch all-->
            <address-setting match="#">
               <dead-letter-address>DLQ</dead-letter-address>
               <expiry-address>ExpiryQueue</expiry-address>
               <redelivery-delay>0</redelivery-delay>
               <!-- with -1 only the global-max-size is in use for limiting -->
               <max-size-bytes>-1</max-size-bytes>
               <message-counter-history-day-limit>10</message-counter-history-day-limit>
               <address-full-policy>PAGE</address-full-policy>
               <auto-create-queues>true</auto-create-queues>
               <auto-create-addresses>true</auto-create-addresses>
            </address-setting>
         </address-settings>
   
         <addresses>
            <address name="DLQ">
               <anycast>
                  <queue name="DLQ" />
               </anycast>
            </address>
            <address name="ExpiryQueue">
               <anycast>
                  <queue name="ExpiryQueue" />
               </anycast>
            </address>
   
         </addresses>
   
   
        
   
      </core>
   </configuration>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828764779

   I'm getting the following:
   
   
   ```
   araf@root()> feature:install jms artemis pax-jms-artemis                                                                                                                                                           
   org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=pax-jms-artemis; type=karaf.feature; version="[1.1.3,1.1.3]"; filter:="(&(osgi.identity=pax-jms-artemis)(type=karaf.feature)(version>=1.1.3)(version<=1.1.3))" [caused by: Unable to resolve pax-jms-artemis/1.1.3: missing requirement [pax-jms-artemis/1.1.3] osgi.identity; osgi.identity=artemis-amqp-client; type=karaf.feature]
   	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
   	at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:433)
   	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:420)
   	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:374)
   	at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:256)
   	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:399)
   	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069)
   	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004)
   	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   	at java.base/java.lang.Thread.run(Thread.java:834)
   Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve pax-jms-artemis/1.1.3: missing requirement [pax-jms-artemis/1.1.3] osgi.identity; osgi.identity=artemis-amqp-client; type=karaf.feature
   	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
   	... 12 more
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic closed pull request #4689: fix NPE crash in PostOfficeImpl
URL: https://github.com/apache/activemq-artemis/pull/4689


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "p-pavel (via GitHub)" <gi...@apache.org>.
p-pavel commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828673139

   Yes, this is an embedded scenario of a kind. The Artemis is hosted in apache Karaf OSGi environment. After some experiments the upstream federate had something 
   that was populated to the instance in question and caused it crash on every start.
   
   The issue was “resolved" by completely resetting the upstream federate (deleting all the data). 
   
   I’m not sure I can easily reproduce the scenario, but something had to be done about paging manager I believe. 
   
   > On 28 Nov 2023, at 01:12, clebertsuconic ***@***.***> wrote:
   > 
   > 
   > @p-pavel <https://github.com/p-pavel> do you have an embedded scenario or any other differentiation on how you use the broker?
   > 
   > There shouldn't be any usage of the QueueFactory with paging-manager = null. that was left there because of our embedded testsuite.. and thinking now it was a mistake.
   > 
   > if you could help to identify in what situation this happened?
   > 
   > I'm going to add the fix.. sure.. but I would like to understand why it happened in the first place.
   > 
   > —
   > Reply to this email directly, view it on GitHub <https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828620403>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AADFPXV7G3GHTCNVPX3WBCTYGT64JAVCNFSM6AAAAAA74SW43KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRYGYZDANBQGM>.
   > You are receiving this because you were mentioned.
   > 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828719319

   @p-pavel can you check a few things on your codebase please?
   
   
   - Are you using the deprecated method createQueueWith(QueueConfig)?
   - Is the queue that failed the reload listed on the management address? Perhaps you had a management message stored on the journals?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "p-pavel (via GitHub)" <gi...@apache.org>.
p-pavel commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1828922393

   > I could not find any users.cfg. I found users.properties. I uncommented the following two lines and I got the same results:
   
   Sorry, I was on a run. `users.properties` it is
   
   > I suspect this will be some ordering issue (dependency issue) between modules. Years ago we used to have a jms layer for wildly, and perhaps the same is being used by Karaf.
   
   I did absolutely what I wrote starting from downloading 'karaf' and got it working
   
   > And talking about such, this is downloading artemis 2.28 as I can see on a few operations in karat. I will need to install the snapshot.. that's another thing I will need to check.
   ```
    77 │ Active │  80 │ 2.31.2        │ ActiveMQ Artemis AMQP Protocol
    78 │ Active │  80 │ 2.31.2        │ ActiveMQ Artemis HornetQ Protocol
    79 │ Active │  80 │ 2.31.2        │ ActiveMQ Artemis HQClient Protocol
    80 │ Active │  80 │ 2.31.2        │ ActiveMQ Artemis MQTT Protocol
    81 │ Active │  80 │ 2.0.0         │ ActiveMQ Artemis Native
    82 │ Active │  80 │ 2.31.2        │ ActiveMQ Artemis OpenWire Protocol
    83 │ Active │  80 │ 2.31.2        │ ActiveMQ Artemis Quorum API
    84 │ Active │  80 │ 2.31.2        │ ActiveMQ Artemis Server OSGi
    85 │ Active │  80 │ 2.31.2        │ ActiveMQ Artemis STOMP Protocol
   ```
   
   ```
   karaf@root()> repo-list
   Repository                        │ URL
   ──────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────
   
   artemis-2.31.2                    │ mvn:org.apache.activemq/artemis-features/RELEASE/xml/features
   ...
   ```
   
   Are you sure you are running the exact clean instance of Karaf? 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix NPE crash in PostOfficeImpl [activemq-artemis]

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #4689:
URL: https://github.com/apache/activemq-artemis/pull/4689#issuecomment-1830497368

   I was able to run it.. I had to wipe out my .m2/repository...
   
   
   I need to run a specific version on this.. I guess I will bother @jbonofre here...
   
   
   @p-pavel if you can reproduce this error, it would be a great help. removing the NPE would just hide the real issue as it's probably from an ordering situation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org