The file/directory are owned by the user running the process
Dan Cosio

 Wired Informatics
265 Franklin St Ste 1702
Boston, MA 02110
http://wiredinformatics.com
[email protected]




> On Oct 11, 2021, at 12:51 PM, Matt Pavlovich <[email protected]> wrote:
> 
> Check unix file or directory ownership of the scheduler/ folder or 
> scheduler/lock.  Perhaps your systemctl setup isn’t switching to non-root 
> user, or is attempting to run as a different UNIX user id.
> 
>> On Oct 11, 2021, at 9:27 AM, Dan Cosio <[email protected]> 
>> wrote:
>> 
>> This is the only java process running on the machine.. this only happens 
>> when starting the broker using systemctl..If I start it using sudo -u on the 
>> command line it starts up as expected(no slave mode)
>> Dan Cosio
>> 
>> <wired-logo.png> Wired Informatics
>> 265 Franklin St Ste 1702
>> Boston, MA 02110
>> http://wiredinformatics.com <http://wiredinformatics.com/>
>> [email protected] <mailto:[email protected]>
>> 
>> 
>> 
>> 
>>> On Oct 11, 2021, at 5:22 AM, Jean-Baptiste Onofre <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> Hi,
>>> 
>>> The broker is in slave mode when another process/broker has the lock on 
>>> kahadb.
>>> 
>>> If you check in kahadb folder, you should have a lock file (in your case, 
>>> it seems to be in /var/tmp/amq/data),  so, either you have already a broker 
>>> running, either the broker doesn’t have to take/create the lock in the 
>>> kahadb folder.
>>> 
>>> Regards
>>> JB
>>> 
>>>> Le 9 oct. 2021 à 15:42, Dan Cosio <[email protected] 
>>>> <mailto:[email protected]>> a écrit :
>>>> 
>>>> 
>>>> Using ActiveMQ 5.16.2
>>>> I'm seeing strange behavior when starting ActiveMQ using systemctl. The 
>>>> server starts in slave mode:
>>>> [pid: ][main] 08 Oct 2021 18:15:46  INFO XBeanBrokerFactory$1 - Refreshing 
>>>> org.apache.activemq.xbean.XBeanBrokerFactory$1@68bbe345: startup date [Fri 
>>>> Oct 08 18:15:46 UTC 2021]; root of context hierarchy
>>>> [pid: ][main] 08 Oct 2021 18:15:46  INFO XBeanXmlBeanDefinitionReader - 
>>>> Loading XML bean definitions from URL 
>>>> [file:/var/tmp/amq/conf/activemq-nojournal-persistent-SSL.xml]
>>>> [pid: ][main] 08 Oct 2021 18:15:46  INFO XBeanXmlBeanDefinitionReader - 
>>>> Loading XML bean definitions from URL [file:/var/tmp/amq/conf/jetty.xml]
>>>> [pid: ][main] 08 Oct 2021 18:15:47  INFO BrokerService - Using Persistence 
>>>> Adapter: KahaDBPersistenceAdapter[/var/tmp/amq/data/kahadb]
>>>> [pid: ][KahaDB Index Free Page Recovery] 08 Oct 2021 18:15:47  INFO 
>>>> PageFile - Page File: /var/tmp/amq/data/kahadb/db.data. Recovering 
>>>> pageFile free list due to prior unclean shutdown..
>>>> [pid: ][KahaDB Index Free Page Recovery] 08 Oct 2021 18:15:47  INFO 
>>>> PageFile - Page File: /var/tmp/amq/data/kahadb/db.data. Recovered pageFile 
>>>> free list of size: 0
>>>> [pid: ][main] 08 Oct 2021 18:15:47  INFO MessageDatabase - KahaDB is 
>>>> version 7
>>>> [pid: ][main] 08 Oct 2021 18:15:47  INFO PListStoreImpl - 
>>>> PListStore:[/activemq-data/broker-persistent-SSL/tmp_storage] started
>>>> [pid: ][main] 08 Oct 2021 18:15:47  INFO SharedFileLocker - Database 
>>>> activemq-data/broker-persistent-SSL/scheduler/lock is locked by another 
>>>> server. This broker is now in slave mode waiting a lock to be acquired
>>>> 
>>>> If I start the broker using sudo -u <user> it starts correctly.
>>>> This is configured to run SSL with persistence:
>>>>   <broker xmlns="http://activemq.apache.org/schema/core 
>>>> <http://activemq.apache.org/schema/core>"
>>>> 
>>>> 
>>>> useJmx="true"
>>>> 
>>>> 
>>>> persistent="true"
>>>> 
>>>> 
>>>> dedicatedTaskRunner="false"
>>>> 
>>>> 
>>>> schedulerSupport="true"
>>>> 
>>>> 
>>>> brokerName="broker-persistent-SSL">
>>>> This is the process:
>>>> /usr/bin/java -Dlog4j.dir=/var/tmp/amq/log 
>>>> -Dlog_instance=ip-172-31-51-195.ec2.internal 
>>>> -Dinvenio_log_component=mqbroker -Dcom.sun.management.jmxremote.port=51520 
>>>> -Dcom.sun.management.jmxremote.ssl=false 
>>>> -Dcom.sun.management.jmxremote.authenticate=false 
>>>> -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote 
>>>> -Djavax.net.ssl.keyStore=/var/tmp/amq/conf/broker.ks 
>>>> -Djavax.net.ssl.keyStorePassword=<password> 
>>>> -Djavax.net.ssl.trustStore=/var/tmp/amq/conf/broker.ts 
>>>> -Djavax.net.ssl.trustStorePassword=<password> -Djava.awt.headless=true 
>>>> -Djava.io.tmpdir=/var/tmp/amq/tmp 
>>>> -Dactivemq.classpath=/var/tmp/amq/conf:/var/tmp/amq/../lib/: 
>>>> -Dactivemq.home=/var/www/mqbroker/apache-activemq-5.16.2 
>>>> -Dactivemq.base=/var/tmp/amq -Dactivemq.conf=/var/tmp/amq/conf 
>>>> -Dactivemq.data=/var/tmp/amq/data -jar 
>>>> /var/www/mqbroker/apache-activemq-5.16.2/bin/activemq.jar start 
>>>> xbean:file:/var/tmp/amq/conf/activemq-nojournal-persistent-SSL.xml
>>>> 
>>>> I've removed the lock file and restarted. There are no other brokers on 
>>>> this machine
>>>> Can anyone give me a hint as to what may be causing this?
>>>> 
>>>> 
>>>> Dan Cosio
>>>> 
>>>> <wired-logo.png> Wired Informatics
>>>> 265 Franklin St Ste 1702
>>>> Boston, MA 02110
>>>> http://wiredinformatics.com <http://wiredinformatics.com/>
>>>> [email protected]
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>> 
> 

Reply via email to