You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Elliotte Harold <er...@gmail.com> on 2007/07/12 22:50:31 UTC
Setting log location
When run on the Unix server a couple of my tests are dying with messages
like this one:
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /activemq-data/activemq.log (No such
file or directory)
at java.io.FileOutputStream.openAppend(Native Method)
These tests pass on my local windows box, presumably because there
they can write to C:\activemq-data
1. How do I tell ActiveMQ to put th elog in a different location?
2. Shouldn't it go somewhere like /usr/tmp that's likely to be writable by
default anyway?
/activemq-data is a very unusual default location on Unix.
--
Elliotte Rusty Harold
erharold@gmail.com
Re: clarification between 4.2 and 5.0
Posted by Rob Davies <ra...@gmail.com>.
I think it should be asap! We need to vote on it though first
On Jul 24, 2007, at 4:42 AM, Jim Alateras wrote:
> Rob,
>
> Do you have a date for the 5.0 release?
>
> cheers
> </jima>
> Rob Davies wrote:
>> It was decided that because of the need to use JDK 5.0 - version
>> 4.2 should be re-named as 5.0 - so no difference at all ;)
>> On Jul 17, 2007, at 2:19 PM, Jim Alateras wrote:
>>> I was just wondering whether the only difference between the two
>>> versions was that the 5.0 was target for JDK 5.x.
>>>
>>> cheers
>>> </jima>
>
Re: clarification between 4.2 and 5.0
Posted by Jim Alateras <ji...@comware.com.au>.
Rob,
Do you have a date for the 5.0 release?
cheers
</jima>
Rob Davies wrote:
> It was decided that because of the need to use JDK 5.0 - version 4.2
> should be re-named as 5.0 - so no difference at all ;)
>
> On Jul 17, 2007, at 2:19 PM, Jim Alateras wrote:
>
>> I was just wondering whether the only difference between the two
>> versions was that the 5.0 was target for JDK 5.x.
>>
>> cheers
>> </jima>
>
>
Re: clarification between 4.2 and 5.0
Posted by Rob Davies <ra...@gmail.com>.
It was decided that because of the need to use JDK 5.0 - version 4.2
should be re-named as 5.0 - so no difference at all ;)
On Jul 17, 2007, at 2:19 PM, Jim Alateras wrote:
> I was just wondering whether the only difference between the two
> versions was that the 5.0 was target for JDK 5.x.
>
> cheers
> </jima>
clarification between 4.2 and 5.0
Posted by Jim Alateras <ji...@comware.com.au>.
I was just wondering whether the only difference between the two
versions was that the 5.0 was target for JDK 5.x.
cheers
</jima>
Re: UnknownHostException on startup
Posted by Jim Alateras <ji...@comware.com.au>.
Rob,
Thanks for the reply. It is pretty weird since it just started happening
. I've tried looking at the net for a resolution but currently no
luck. It's not specific to activemq but more an issue with my w2k box.
Something has changed on my system but i don't know what it is :-(.
cheers
</jima>
P.S. The machine name is Mercury and there is an entry in the windows
equivalent /etc/hosts file.
Rob Davies wrote:
> Weird! The IdGenerator tries and establishes the InetAddress of the
> localhost whilst building up a unique stub to use for id generation.
> What is the name of the machine you are using ?
> On Jul 16, 2007, at 7:13 AM, Jim Alateras wrote:
>
>> I am starting to see the following exception when starting the
>> XBeanBroker
>>
>> Running
>> au.com.observant.ringocore.dispatcher.service.BlobEntryDispatcherTest
>> 16/07/2007 16:11:29 org.apache.activemq.util.IdGenerator <clinit>
>> WARNING: could not generate unique stub
>> java.net.UnknownHostException: MERCURY: MERCURY
>> at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
>> at
>> org.apache.activemq.util.IdGenerator.<clinit>(IdGenerator.java:51)
>> at
>> org.apache.activemq.broker.region.RegionBroker.<clinit>(RegionBroker.java:73)
>>
>> at
>> org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1266)
>>
>> at
>> org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
>>
>> at
>> org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
>>
>> at
>> org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:163)
>>
>> at
>> org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:153)
>>
>> at
>> org.apache.activemq.broker.BrokerService.processHelperProperties(BrokerService.java:1035)
>>
>> at
>> org.apache.activemq.broker.BrokerService.start(BrokerService.java:379)
>> at
>> org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
>>
>> at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBea
>>
>> nFactory.java:1058)
>> at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactor
>>
>> y.java:363)
>> at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
>>
>> at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
>>
>> at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.
>>
>> java:275)
>> at
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
>>
>> at
>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:81)
>>
>> at
>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:66)
>>
>> at
>> org.springframework.test.AbstractSpringContextTests.loadContextLocations(AbstractSpringContextTests.java:121)
>>
>> at
>> org.springframework.test.AbstractDependencyInjectionSpringContextTests.loadContextLocations(AbstractDependencyInjectionSp
>>
>> ringContextTests.java:161)
>> at
>> org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:101)
>>
>> at
>> org.springframework.test.AbstractDependencyInjectionSpringContextTests.setUp(AbstractDependencyInjectionSpringContextTest
>>
>> s.java:129)
>> at junit.framework.TestCase.runBare(TestCase.java:132)
>> at junit.framework.TestResult$1.protect(TestResult.java:110)
>> at junit.framework.TestResult.runProtected(TestResult.java:128)
>> at junit.framework.TestResult.run(TestResult.java:113)
>> at junit.framework.TestCase.run(TestCase.java:124)
>> at junit.framework.TestSuite.runTest(TestSuite.java:232)
>> at junit.framework.TestSuite.run(TestSuite.java:227)
>> at
>> org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
>>
>> at
>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>>
>> at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
>>
>> at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
>>
>> at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
>>
>> at
>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
>>
>>
>>
>>
>> This is the broker configuration i am using
>>
>> <bean id="broker"
>> class="org.apache.activemq.xbean.XBeanBrokerService">
>> <property name="persistenceAdapter">
>> <ref local="memPersistenceAdaptor"/>
>> </property>
>> <property name="transportConnectorURIs">
>> <list>
>> <value>vm://localhost</value>
>> </list>
>> </property>
>> <property name="start" value="true"/>
>> <property name="useJmx" value="true" />
>> </bean>
>>
>>
>> This is on W2K box. Any idea why this would be happening?
>
>
Re: UnknownHostException on startup
Posted by Rob Davies <ra...@gmail.com>.
Weird! The IdGenerator tries and establishes the InetAddress of the
localhost whilst building up a unique stub to use for id generation.
What is the name of the machine you are using ?
On Jul 16, 2007, at 7:13 AM, Jim Alateras wrote:
> I am starting to see the following exception when starting the
> XBeanBroker
>
> Running
> au.com.observant.ringocore.dispatcher.service.BlobEntryDispatcherTest
> 16/07/2007 16:11:29 org.apache.activemq.util.IdGenerator <clinit>
> WARNING: could not generate unique stub
> java.net.UnknownHostException: MERCURY: MERCURY
> at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
> at org.apache.activemq.util.IdGenerator.<clinit>
> (IdGenerator.java:51)
> at org.apache.activemq.broker.region.RegionBroker.<clinit>
> (RegionBroker.java:73)
> at
> org.apache.activemq.broker.BrokerService.createRegionBroker
> (BrokerService.java:1266)
> at org.apache.activemq.broker.BrokerService.createBroker
> (BrokerService.java:1209)
> at org.apache.activemq.broker.BrokerService.getBroker
> (BrokerService.java:508)
> at org.apache.activemq.broker.BrokerService.addConnector
> (BrokerService.java:163)
> at org.apache.activemq.broker.BrokerService.addConnector
> (BrokerService.java:153)
> at
> org.apache.activemq.broker.BrokerService.processHelperProperties
> (BrokerService.java:1035)
> at org.apache.activemq.broker.BrokerService.start
> (BrokerService.java:379)
> at
> org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet
> (XBeanBrokerService.java:47)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
> actory.invokeInitMethods(AbstractAutowireCapableBea
> nFactory.java:1058)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
> actory.createBean(AbstractAutowireCapableBeanFactor
> y.java:363)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> AbstractBeanFactory.java:226)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> AbstractBeanFactory.java:147)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.p
> reInstantiateSingletons(DefaultListableBeanFactory.
> java:275)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh
> (AbstractApplicationContext.java:318)
> at
> org.springframework.context.support.ClassPathXmlApplicationContext.<in
> it>(ClassPathXmlApplicationContext.java:81)
> at
> org.springframework.context.support.ClassPathXmlApplicationContext.<in
> it>(ClassPathXmlApplicationContext.java:66)
> at
> org.springframework.test.AbstractSpringContextTests.loadContextLocatio
> ns(AbstractSpringContextTests.java:121)
> at
> org.springframework.test.AbstractDependencyInjectionSpringContextTests
> .loadContextLocations(AbstractDependencyInjectionSp
> ringContextTests.java:161)
> at
> org.springframework.test.AbstractSpringContextTests.getContext
> (AbstractSpringContextTests.java:101)
> at
> org.springframework.test.AbstractDependencyInjectionSpringContextTests
> .setUp(AbstractDependencyInjectionSpringContextTest
> s.java:129)
> at junit.framework.TestCase.runBare(TestCase.java:132)
> at junit.framework.TestResult$1.protect(TestResult.java:110)
> at junit.framework.TestResult.runProtected(TestResult.java:
> 128)
> at junit.framework.TestResult.run(TestResult.java:113)
> at junit.framework.TestCase.run(TestCase.java:124)
> at junit.framework.TestSuite.runTest(TestSuite.java:232)
> at junit.framework.TestSuite.run(TestSuite.java:227)
> at org.junit.internal.runners.OldTestClassRunner.run
> (OldTestClassRunner.java:76)
> at org.apache.maven.surefire.junit4.JUnit4TestSet.execute
> (JUnit4TestSet.java:62)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTest
> Set(AbstractDirectoryTestSuite.java:138)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute
> (AbstractDirectoryTestSuite.java:125)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
> (SurefireBooter.java:290)
> at org.apache.maven.surefire.booter.SurefireBooter.main
> (SurefireBooter.java:818)
>
>
>
> This is the broker configuration i am using
>
> <bean id="broker"
> class="org.apache.activemq.xbean.XBeanBrokerService">
> <property name="persistenceAdapter">
> <ref local="memPersistenceAdaptor"/>
> </property>
> <property name="transportConnectorURIs">
> <list>
> <value>vm://localhost</value>
> </list>
> </property>
> <property name="start" value="true"/>
> <property name="useJmx" value="true" />
> </bean>
>
>
> This is on W2K box. Any idea why this would be happening?
UnknownHostException on startup
Posted by Jim Alateras <ji...@comware.com.au>.
I am starting to see the following exception when starting the XBeanBroker
Running
au.com.observant.ringocore.dispatcher.service.BlobEntryDispatcherTest
16/07/2007 16:11:29 org.apache.activemq.util.IdGenerator <clinit>
WARNING: could not generate unique stub
java.net.UnknownHostException: MERCURY: MERCURY
at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
at
org.apache.activemq.util.IdGenerator.<clinit>(IdGenerator.java:51)
at
org.apache.activemq.broker.region.RegionBroker.<clinit>(RegionBroker.java:73)
at
org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1266)
at
org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1209)
at
org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:508)
at
org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:163)
at
org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:153)
at
org.apache.activemq.broker.BrokerService.processHelperProperties(BrokerService.java:1035)
at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:379)
at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBea
nFactory.java:1058)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactor
y.java:363)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.
java:275)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:81)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:66)
at
org.springframework.test.AbstractSpringContextTests.loadContextLocations(AbstractSpringContextTests.java:121)
at
org.springframework.test.AbstractDependencyInjectionSpringContextTests.loadContextLocations(AbstractDependencyInjectionSp
ringContextTests.java:161)
at
org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:101)
at
org.springframework.test.AbstractDependencyInjectionSpringContextTests.setUp(AbstractDependencyInjectionSpringContextTest
s.java:129)
at junit.framework.TestCase.runBare(TestCase.java:132)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
This is the broker configuration i am using
<bean id="broker" class="org.apache.activemq.xbean.XBeanBrokerService">
<property name="persistenceAdapter">
<ref local="memPersistenceAdaptor"/>
</property>
<property name="transportConnectorURIs">
<list>
<value>vm://localhost</value>
</list>
</property>
<property name="start" value="true"/>
<property name="useJmx" value="true" />
</bean>
This is on W2K box. Any idea why this would be happening?
Re: Setting log location
Posted by Bruce Snyder <br...@gmail.com>.
On 7/16/07, Elliotte Harold <er...@gmail.com> wrote:
> On 7/14/07, Bruce Snyder <br...@gmail.com> wrote:
> >
> >
> >
> > For some reason, the startup script must have been failing to
> > determine the ACTIVEMQ_HOME variable previously. Are you running
> > ActiveMQ on Windows?
> >
> >
>
> Yes, but the one that was failing was on Unix. On Windows it passed. But in
> either case I'm not using bin./activemq. Everything is set up and run from
> my Java programs.
Then I bet you weren't setting an environment variable to be used by
the log4j.properties file.
Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
Re: Setting log location
Posted by Elliotte Harold <er...@gmail.com>.
On 7/14/07, Bruce Snyder <br...@gmail.com> wrote:
>
>
>
> For some reason, the startup script must have been failing to
> determine the ACTIVEMQ_HOME variable previously. Are you running
> ActiveMQ on Windows?
>
>
Yes, but the one that was failing was on Unix. On Windows it passed. But in
either case I'm not using bin./activemq. Everything is set up and run from
my Java programs.
--
Elliotte Rusty Harold
erharold@gmail.com
Re: Setting log location
Posted by Bruce Snyder <br...@gmail.com>.
On 7/13/07, Kit Plummer <ch...@raytheon.com> wrote:
> I believe the run script is what sets up the ACTIVEMQ_BASE stuff. You
> could set it to '.' but then your logs files will pile up differently if
> you run the script from different places...
Kit is correct, it's in the bin/activemq startup script:
Shell:
-Dactivemq.base="${ACTIVEMQ_BASE}"
Batch:
-Dactivemq.base="%ACTIVEMQ_BASE%"
For some reason, the startup script must have been failing to
determine the ACTIVEMQ_HOME variable previously. Are you running
ActiveMQ on Windows?
Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
Re: Setting log location
Posted by Kit Plummer <ch...@raytheon.com>.
I believe the run script is what sets up the ACTIVEMQ_BASE stuff. You
could set it to '.' but then your logs files will pile up differently if
you run the script from different places...
Elliotte Harold wrote:
> On 7/13/07, scottdawson <sc...@unisys.com> wrote:
>>
>>
>> See conf/log4j.properties, the file appender configuration.
>
>
>
>
> Mysteriously the problem seems to have fixeed itself this morning with no
> specific action on my part.
>
> Nonetheless looking in my log4j.properties file I see
>
> log4j.appender.out.file=${activemq.base}/activemq-data/activemq.log
>
> Where, if anywhere, is ${activemq.base} set?
>
> Can I just set it to "." to get the current working directory?
>
Re: Setting log location
Posted by Elliotte Harold <er...@gmail.com>.
On 7/13/07, scottdawson <sc...@unisys.com> wrote:
>
>
> See conf/log4j.properties, the file appender configuration.
Mysteriously the problem seems to have fixeed itself this morning with no
specific action on my part.
Nonetheless looking in my log4j.properties file I see
log4j.appender.out.file=${activemq.base}/activemq-data/activemq.log
Where, if anywhere, is ${activemq.base} set?
Can I just set it to "." to get the current working directory?
--
Elliotte Rusty Harold
erharold@gmail.com
Re: Setting log location
Posted by scottdawson <sc...@unisys.com>.
See conf/log4j.properties, the file appender configuration.
Elliotte Harold-3 wrote:
>
> 1. How do I tell ActiveMQ to put the log in a different location?
>
--
View this message in context: http://www.nabble.com/Setting-log-location-tf4070776s2354.html#a11585082
Sent from the ActiveMQ - User mailing list archive at Nabble.com.