Bug#634868: libactivemq-java: unable to find org.apache.activemq.console.command.ShellCommand dependency

Damien Raude-Morvan drazzib at drazzib.com
Tue Aug 2 12:46:29 UTC 2011


On Sat, 30 Jul 2011 21:49:33 +0200, Jonas Genannt
<jonas.genannt at capi2name.de> wrote:
> Hello Damien,

Hi Jonas,

>> Could you please compare exact command line of working vs not-working
>> ActiveMQ configuration ?
> 
> I have done more testing in this, here is my result.
> 
> I have done all stuff with an clean Debian 64bit sid on virtualbox.
[...]
> I found that in the log file:
> 
> 2011-07-30 21:35:04,587 | INFO  | Database
> activemq-data/localhost/KahaDB/lock is locked... waiting 10 seconds for
> the database to be unlocked. Reason: java.io.IOException: Failed to
> create directory 'activemq-data/localhost/KahaDB' |
> org.apache.activemq.store.kahadb.MessageDatabase | main
> 
> So the activeMQ tries to write to 
> 	
> 	/var/lib/activemq/activemq-data/localhost/KahaDB/
> 
> but does this with an relative path.
> 
> If I patch the init-script to chdir first to /var/lib/activemq, it
> works:
> 
> diff -u /etc/init.d/activemq.orig /etc/init.d/activemq
> --- /etc/init.d/activemq.orig	2011-07-30 21:43:32.710743516 +0200
> +++ /etc/init.d/activemq	2011-07-30 21:43:19.606744213 +0200
> @@ -132,6 +132,7 @@
>          chown $ACTIVEMQ_USER /var/run/activemq/
>          start-stop-daemon --start --quiet --pidfile $ACTIVEMQ_PIDFILE \
>                      --chuid $ACTIVEMQ_USER --background \
> +                    -d /var/lib/activemq \
>                      --name java --startas $DAEMON -- $ACTIVEMQ_ARGS
>          errcode=$?
>          return $errcode
> 
> After that patch activeMQ starts and opens the TCP port.

This doesn't seems very robust because if someone start activemq without
init.d script, it'll fail
(for example, might want to start /usr/bin/activemq console
xbean:/etc/activemq/mcollective/activemq.xml to check for some debug
output).

I would prefer if mcollective.xml is fixed to use a full path to data
directory.
For example, you could use something like :
${activemq.base}/data

(where activemq.base property will automatically be set to
/var/lib/activemq/[instance]/)

> But I found an other problem, when I try to start the ActiveMQ Instance
> onboot:
> 
> root at sid:~# update-rc.d activemq-mcollective defaults
> update-rc.d activemq-mcollective defaults
> update-rc.d: using dependency based boot sequencing
> insserv: script activemq-mcollective: service activemq already provided!
> insserv: exiting now!
> update-rc.d: error: insserv rejected the script header

Hum, nice spot.
I don't think my first approach will work nicely : we can't split each
instance in its own init.d script.
I'll work on something similar that postgresql (one main script to start
everything)

Thanks for your feedback.

Cheers,
-- 
Damien





More information about the pkg-java-maintainers mailing list