You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Paul Tomsic <pt...@yahoo.com> on 2006/05/09 13:10:22 UTC

dataDirectory attrib isn't respected?

my startup xbeans file has an attribute for
dataDirectory on the broker line, but when i start up
activemq it not only makes me the directory i ask for,
but it also makes a "activemq-data" directory where
ever i started up activemq.   this doesn't seem right,
so i attached a debugger to the code src, and it seems
like it's starting two brokers within one vm.  the one
that i asked it for and an additional one.

my startup script is quite simple, it's actually
identical to the "multicast-broker1.xml" demo except i
add dataDirectory attribs.

how do i get it to respect my dataDirectory, and
additionally, how do i prevent the startup of this
additional vm://null broker?

thanks

here's my startup script:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:amq="http://activemq.org/config/1.0">

    <amq:broker brokerName="a03"
dataDirectory="/tmp/mbus/03/A/journal"
persistent="false" useShutdownHook="false"
useJmx="false">
        <amq:transportConnectors>
            <amq:transportConnector
uri="tcp://localhost:0"
discoveryUri="multicast://default"/>
        </amq:transportConnectors>


        <amq:networkConnectors>
                <amq:networkConnector
uri="multicast://default"/>
        </amq:networkConnectors>
        <amq:persistenceAdapter>
                <amq:memoryPersistenceAdapter/>
        </amq:persistenceAdapter>
    </amq:broker>
</beans>
 

Re: dataDirectory attrib isn't respected?

Posted by Javier Leyba <xl...@gmail.com>.
Well, another problem I'm having from a loooong time without solutions.

I've exactly the same problem and let me add to you message that it
happens even if you start embeded brokers.

I´m starting my brokers from a JBoss mbean service using a xbean file
config where I point my data directory to an outside JBoss directory.
Nevertheless, I discovered that, after start JBoss I've a new
activemq-data directory inside jboss/bin directory.

Please, let me know if you found a solution.

J



On 5/9/06, Paul Tomsic <pt...@yahoo.com> wrote:
> my startup xbeans file has an attribute for
> dataDirectory on the broker line, but when i start up
> activemq it not only makes me the directory i ask for,
> but it also makes a "activemq-data" directory where
> ever i started up activemq.   this doesn't seem right,
> so i attached a debugger to the code src, and it seems
> like it's starting two brokers within one vm.  the one
> that i asked it for and an additional one.
>
> my startup script is quite simple, it's actually
> identical to the "multicast-broker1.xml" demo except i
> add dataDirectory attribs.
>
> how do i get it to respect my dataDirectory, and
> additionally, how do i prevent the startup of this
> additional vm://null broker?
>
> thanks
>
> here's my startup script:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns:amq="http://activemq.org/config/1.0">
>
>     <amq:broker brokerName="a03"
> dataDirectory="/tmp/mbus/03/A/journal"
> persistent="false" useShutdownHook="false"
> useJmx="false">
>         <amq:transportConnectors>
>             <amq:transportConnector
> uri="tcp://localhost:0"
> discoveryUri="multicast://default"/>
>         </amq:transportConnectors>
>
>
>         <amq:networkConnectors>
>                 <amq:networkConnector
> uri="multicast://default"/>
>         </amq:networkConnectors>
>         <amq:persistenceAdapter>
>                 <amq:memoryPersistenceAdapter/>
>         </amq:persistenceAdapter>
>     </amq:broker>
> </beans>
>
>


--
Javier Leyba
Barcelona - Spain
http://blog.leyba.com.ar

Re: dataDirectory attrib isn't respected?

Posted by James Strachan <ja...@gmail.com>.
On 5/9/06, Paul Tomsic <pt...@yahoo.com> wrote:
> --- James Strachan <ja...@gmail.com> wrote:
>
> > > and changed the name of the broker (a1,a2,a3)
> >
> > Are those the exact broker names right?
>
> actually, no.  i was using 01_A, 02_A, etc.
> this doesn't work.
> i've changed them to a1, a2, a3 and it works.

Ah right! :)

Yeah - we should add some validation to the code to check for bad URI
syntaxes and update the docs

> i didn't notice anywhere in the docs where you cannot
> have a broker named starting w/ a number and/or
> containing an underscore.
> not sure which was the troublesome spot, but amending
> both seems to have rectified the problem.

Great; yeah its a limitation of the URI class we use for URI coding etc

Will add more stuff to the wiki to catch this...
--

James
-------
http://radio.weblogs.com/0112098/

Re: dataDirectory attrib isn't respected?

Posted by Paul Tomsic <pt...@yahoo.com>.

--- James Strachan <ja...@gmail.com> wrote:

> > and changed the name of the broker (a1,a2,a3)
> 
> Are those the exact broker names right?

actually, no.  i was using 01_A, 02_A, etc.
this doesn't work.
i've changed them to a1, a2, a3 and it works.

i didn't notice anywhere in the docs where you cannot
have a broker named starting w/ a number and/or
containing an underscore.
not sure which was the troublesome spot, but amending
both seems to have rectified the problem.
> 
> 
> Which platform/JVM etc? Any other hints how to
> reproduce?


platform: Red Hat Enterprise Linux WS Taroon Update 5
jvm: HotSpot 1.5.0_05-b05



Re: dataDirectory attrib isn't respected?

Posted by James Strachan <ja...@gmail.com>.
On 5/9/06, Paul Tomsic <pt...@yahoo.com> wrote:
> Yes, i'm running the cmd-script w/ just those xml
> config files that i sent, and nothing else.
> i was using RC2, then i started using snapshot from
> incubator-activemq-4.0-SNAPSHOT (dated may 8th)
>
> i've got three copies of what i posted, [1,2,3].xml
> inside each one, i've changed the dataDirectory attrib
> to the respective number
> (/opt/mbus/01, /opt/mbus/02, ...)
> and changed the name of the broker (a1,a2,a3)

Are those the exact broker names right?

> what you're talking about, though (the early boot)
> seems to be occurring, b/c it's (a) not respecting the
> dataDirectory attrib, and (b) it seems to be starting
> a vm:// broker as well as the tcp one.

I don't follow how a vm:// broker can be being started if you don't
mention it in the activemq.xml and there's no other Java code in the
broker being run.

Which platform/JVM etc? Any other hints how to reproduce?

--

James
-------
http://radio.weblogs.com/0112098/

Re: dataDirectory attrib isn't respected?

Posted by Paul Tomsic <pt...@yahoo.com>.
Yes, i'm running the cmd-script w/ just those xml
config files that i sent, and nothing else.
i was using RC2, then i started using snapshot from 
incubator-activemq-4.0-SNAPSHOT (dated may 8th)

i've got three copies of what i posted, [1,2,3].xml
inside each one, i've changed the dataDirectory attrib
to the respective number 
(/opt/mbus/01, /opt/mbus/02, ...) 
and changed the name of the broker (a1,a2,a3)

what you're talking about, though (the early boot)
seems to be occurring, b/c it's (a) not respecting the
dataDirectory attrib, and (b) it seems to be starting
a vm:// broker as well as the tcp one.

thoughts?



--- James Strachan <ja...@gmail.com> wrote:

> You are getting this error when running the activemq
> command script -
> with just those XML configuration files you sent and
> nothing else?
> 
> BTW you are using a recent version right (4.0 or
> 4.0-RC3)? There was a
> bug months ago with the configuration of the
> transport XML causing an
> early boot up of the persistence layer before the
> persistence layer
> was properly configured.
> 
> 
> On 5/9/06, Paul Tomsic <pt...@yahoo.com> wrote:
> > i have a different config/startup file for each
> > broker, though.
> > in my posted startup/config file, i don't
> explicitly
> > use a "vm://" URI, though.
> >
> > i'm also just starting them from cmd-line (the
> brokers
> > that is)
> >
> > is there some implicit starting of a broker using
> > vm://
> >
> > ??
> >
> > --- James Strachan <ja...@gmail.com>
> wrote:
> >
> > > On 5/9/06, Paul Tomsic <pt...@yahoo.com>
> wrote:
> > > > my startup xbeans file has an attribute for
> > > > dataDirectory on the broker line, but when i
> start
> > > up
> > > > activemq it not only makes me the directory i
> ask
> > > for,
> > > > but it also makes a "activemq-data" directory
> > > where
> > > > ever i started up activemq.
> > >
> > > This sounds like this problem....
> > >
> >
>
http://goopen.org/confluence/display/ACTIVEMQ/Journal+is+already+opened+by+this+application
> > >
> > > i.e. that you are using the vm:// URI to connect
> to
> > > a broker before
> > > you have configured your
> > >
> > > --
> > >
> > > James
> > > -------
> > > http://radio.weblogs.com/0112098/
> > >
> >
> >
> 
> 
> --
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 


Re: dataDirectory attrib isn't respected?

Posted by James Strachan <ja...@gmail.com>.
You are getting this error when running the activemq command script -
with just those XML configuration files you sent and nothing else?

BTW you are using a recent version right (4.0 or 4.0-RC3)? There was a
bug months ago with the configuration of the transport XML causing an
early boot up of the persistence layer before the persistence layer
was properly configured.


On 5/9/06, Paul Tomsic <pt...@yahoo.com> wrote:
> i have a different config/startup file for each
> broker, though.
> in my posted startup/config file, i don't explicitly
> use a "vm://" URI, though.
>
> i'm also just starting them from cmd-line (the brokers
> that is)
>
> is there some implicit starting of a broker using
> vm://
>
> ??
>
> --- James Strachan <ja...@gmail.com> wrote:
>
> > On 5/9/06, Paul Tomsic <pt...@yahoo.com> wrote:
> > > my startup xbeans file has an attribute for
> > > dataDirectory on the broker line, but when i start
> > up
> > > activemq it not only makes me the directory i ask
> > for,
> > > but it also makes a "activemq-data" directory
> > where
> > > ever i started up activemq.
> >
> > This sounds like this problem....
> >
> http://goopen.org/confluence/display/ACTIVEMQ/Journal+is+already+opened+by+this+application
> >
> > i.e. that you are using the vm:// URI to connect to
> > a broker before
> > you have configured your
> >
> > --
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
>
>


--

James
-------
http://radio.weblogs.com/0112098/

Re: dataDirectory attrib isn't respected?

Posted by Paul Tomsic <pt...@yahoo.com>.
i have a different config/startup file for each
broker, though.
in my posted startup/config file, i don't explicitly
use a "vm://" URI, though.

i'm also just starting them from cmd-line (the brokers
that is)

is there some implicit starting of a broker using
vm://  

??

--- James Strachan <ja...@gmail.com> wrote:

> On 5/9/06, Paul Tomsic <pt...@yahoo.com> wrote:
> > my startup xbeans file has an attribute for
> > dataDirectory on the broker line, but when i start
> up
> > activemq it not only makes me the directory i ask
> for,
> > but it also makes a "activemq-data" directory
> where
> > ever i started up activemq.
> 
> This sounds like this problem....
>
http://goopen.org/confluence/display/ACTIVEMQ/Journal+is+already+opened+by+this+application
> 
> i.e. that you are using the vm:// URI to connect to
> a broker before
> you have configured your
> 
> --
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 


Re: dataDirectory attrib isn't respected?

Posted by James Strachan <ja...@gmail.com>.
On 5/9/06, Paul Tomsic <pt...@yahoo.com> wrote:
> my startup xbeans file has an attribute for
> dataDirectory on the broker line, but when i start up
> activemq it not only makes me the directory i ask for,
> but it also makes a "activemq-data" directory where
> ever i started up activemq.

This sounds like this problem....
http://goopen.org/confluence/display/ACTIVEMQ/Journal+is+already+opened+by+this+application

i.e. that you are using the vm:// URI to connect to a broker before
you have configured your

--

James
-------
http://radio.weblogs.com/0112098/