qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robbie Gemmell <robbie.gemm...@gmail.com>
Subject Re: qpid.work_dir property is not honoring on broker startup
Date Tue, 11 Oct 2016 10:30:49 GMT
On 11 October 2016 at 11:01, Rob Godfrey <rob.j.godfrey@gmail.com> wrote:
> On 11 October 2016 at 10:45, Robbie Gemmell <robbie.gemmell@gmail.com> wrote:
>> From memory of how it used to [be intended to] work long ago,
>> qpid.work_dir was a config property that could be set to influence the
>> work dir actually used and was referenced in the config json etc
>> accordingly, but if its value was not set explicitly then the broker
>> would fall back to the value of the QPID_WORK system property (in turn
>> normally set by the environment variable via the startup script, if
>> used) which is the toggle that everyone was already used to using. The
>> startup scripts knew nothing about qpid.work_dir, they only knew about
>> QPID_WORK as they always had.
>>
>
> Yep - and by config property you mean something that is set explicitly
> by -prop qpid.work_dir=... on the command line...

Command line or also on the BrokerOptions object directly if starting
programatically (I think thats all the CLI parsing did with the info
too?), I think those were the only ways of specifying them at the
time.

> Moreover the startup phase actually sets qpid.work_dir in the context
> to the value of QPID_WORK if qpid.work_dir is not supplied as a config
> property in the manner given above.
>
> I think it would make more sense for all concerned if instead the
> resolution worked like this
>
> if defined, use qpid.work_dir from command line
> else if defined use qpid.work_dir from system properties / properties file
> else if defined use qpid.work_dir from the OS environment
> else if defined use QPID_WORK from command line
> else if defined use QPID_WORK from system properties / properties file
> else if defined use QPID_WORK from the OS envionment
> else use ${user.dir}/work
>
> That is qpid.work_dir always takes precedence over QPID_WORK and
> command line > system properties > env variable
>
> Although it's not backward compatible, I think it makes more sense - I
> view QPID_WORK as essentially deprecated these days.
>
> Thoughts?

Seems reasonable at first glance.

>
> Rob
>
>> Robbie
>>
>> On 11 October 2016 at 10:25, Lorenz Quack <quack.lorenz@gmail.com> wrote:
>>> Hi Ram,
>>>
>>> Notice that in your example both QPID_WORK and qpid.work_dir are specified.
>>> It seems that currently QPID_WORK take precedence.
>>>
>>> I guess if the environment variable and system property QPID_WORK are not
>>> set then the broker picks up the qpid.work_dir property, right?
>>>
>>> Kind regards,
>>> Lorenz
>>>
>>>
>>>
>>> On 10/10/16 23:01, rammohan ganapavarapu wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am using "qpid.work_dir" property to set qpid work directory to non
>>>> default value but for some reason it is not honoring that property instead
>>>> it is still looking for "-DQPID_WORK"
>>>>
>>>>
>>>> Here is how i am starting up broker:
>>>>
>>>> qpidd     3181  3180 44 21:55 ?        00:00:06
>>>> /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/java -server -DPNAME=QPBRKR
>>>> -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError -Xmx512m
>>>> -XX:MaxDirectMemorySize=1536m -DQPID_HOME=/opt/qpid-java-broker
>>>> -DQPID_WORK=/home/qpidd org.apache.qpid.server.Main -os -icp
>>>> /opt/qpid-java-broker/etc/config.json -props
>>>> /opt/qpid-java-broker/etc/qpid.properties
>>>>
>>>>
>>>> cat ../etc/qpid.properties
>>>> qpid.amqp_port=5672
>>>> qpid.http_port=10001
>>>> qpid.jmx_port=9099
>>>> qpid.rmi_port=8999
>>>> qpid.work_dir=/data/
>>>>
>>>>
>>>> Here is the startup log:
>>>>
>>>> Starting qpidd-java: Setting QPID_WORK to /home/qpidd as default
>>>> System Properties set to -DQPID_HOME=/opt/qpid-java-broker
>>>> -DQPID_WORK=/home/qpidd
>>>> QPID_OPTS set to
>>>> Using QPID_CLASSPATH
>>>>
>>>> /opt/qpid-java-broker/lib/*:/opt/qpid-java-broker/lib/plugins/*:/opt/qpid-java-broker/lib/opt/*
>>>> Info: QPID_JAVA_GC not set. Defaulting to JAVA_GC -XX:+UseConcMarkSweepGC
>>>> -XX:+HeapDumpOnOutOfMemoryError
>>>> Info: QPID_JAVA_MEM not set. Defaulting to JAVA_MEM -Xmx512m
>>>> -XX:MaxDirectMemorySize=1536m
>>>> [Broker] BRK-1006 : Using configuration : /home/qpidd/config.json
>>>> [Broker] BRK-1001 : Startup : Version: 6.0.2 Build: 1738920
>>>> [Broker] BRK-1010 : Platform : JVM : Oracle Corporation version:
>>>> 1.7.0_75-mockbuild_2015_01_23_00_20-b00 OS : Linux version:
>>>> 4.1.13-19.30.amzn1.x86_64 arch: amd64 cores: 4
>>>> [Broker] BRK-1011 : Maximum Memory : Heap : 518,979,584 bytes Direct :
>>>> 1,610,612,736 bytes
>>>> [Broker] BRK-1017 : Process : PID : 3181
>>>> [Broker] BRK-1002 : Starting : Listening on TCP port 5672
>>>> [Broker] MNG-1001 : Web Management Startup
>>>> [Broker] MNG-1002 : Starting : HTTP : Listening on TCP port 10001
>>>> [Broker] MNG-1004 : Web Management Ready
>>>> [Broker] MNG-1001 : JMX Management Startup
>>>> [Broker] MNG-1002 : Starting : RMI Registry : Listening on TCP port 8999
>>>> [Broker] MNG-1002 : Starting : JMX RMIConnectorServer : Listening on TCP
>>>> port 9099
>>>> [Broker] MNG-1004 : JMX Management Ready
>>>> [Broker] BRK-1004 : Qpid Broker Ready
>>>>
>>>>
>>>> But if i export QPID_WORK=/data its working fine, any reason its not
>>>> taking
>>>> the base configuration property?
>>>>
>>>> Thanks,
>>>> Ram
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>>> For additional commands, e-mail: users-help@qpid.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: users-help@qpid.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message