It looks like you have a spurious quote at the end of the
<loggingBrokerPlugin> element; could that be causing the broker to fail to
load?

When I add that mangled element into my own activemq.xml file, I get a
SAXParseException on the console, but you haven't mentioned seeing that so
maybe that's not it... Or maybe that's because I'm running it under Windows
instead of your Linux environment.

Tim

On Mon, Mar 19, 2018 at 2:36 AM, Илья Шипицин <chipits...@gmail.com> wrote:

> well, I added log interceptor, activemq refuses to start (no logs at all).
> how to debug it ? can someone have a look at my config ?
>
> [root@xxx activemq]# cat /opt/activemq/conf/activemq.xml
> <beans
>   xmlns="http://www.springframework.org/schema/beans";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
>   http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd";>
>
>     <bean
> class="org.springframework.beans.factory.config.
> PropertyPlaceholderConfigurer">
>         <property name="locations">
>             <value>file:${activemq.conf}/credentials.properties</value>
>         </property>
>     </bean>
>
>     <!-- Allows accessing the server log -->
>      <bean id="logQuery" class="io.fabric8.insight.log.
> log4j.Log4jLogQuery"
>            lazy-init="false" scope="singleton"
>            init-method="start" destroy-method="stop">
>      </bean>
>
>     <broker xmlns="http://activemq.apache.org/schema/core";
> brokerName="localhost" dataDirectory="${activemq.data}">
>         <destinationPolicy>
>             <policyMap>
>               <policyEntries>
>                 <policyEntry topic=">" >
>                   <pendingMessageLimitStrategy>
>                     <constantPendingMessageLimitStrategy limit="1000"/>
>                   </pendingMessageLimitStrategy>
>                 </policyEntry>
>               </policyEntries>
>             </policyMap>
>         </destinationPolicy>
>
>         <managementContext>
>             <managementContext createConnector="false"/>
>         </managementContext>
>
>         <persistenceAdapter>
>             <jdbcPersistenceAdapter dataSource="#mssql-ds"
> createTablesOnStartup="true"   >
>               <statements>
>                  <statements binaryDataType ="VARBINARY(MAX)"
> lockCreateStatement= "SELECT * FROM ACTIVEMQ_LOCK WITH (UPDLOCK, ROWLOCK)
> WHERE ID=1"/>
>               </statements>
>             </jdbcPersistenceAdapter>
>             </persistenceAdapter>
>
>         <systemUsage>
>           <systemUsage sendFailIfNoSpace="true">
>               <memoryUsage>
>                   <memoryUsage percentOfJvmHeap="70"/>
>               </memoryUsage>
>               <storeUsage>
>                   <storeUsage limit="100 gb"/>
>               </storeUsage>
>               <tempUsage>
>                   <tempUsage limit="50 gb"/>
>               </tempUsage>
>           </systemUsage>
>         </systemUsage>
>
>         <transportConnectors>
>           <transportConnector name="openwire" uri="tcp://
> 0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=
> 104857600
> "/>
>         </transportConnectors>
>
>         <shutdownHooks>
>             <bean xmlns="http://www.springframework.org/schema/beans";
> class="org.apache.activemq.hooks.SpringContextHook" />
>         </shutdownHooks>
>
>     <plugins>
>       <loggingBrokerPlugin logAll="true" "/>
>       <timeStampingBrokerPlugin zeroExpirationOverride="1000"
> ttlCeiling="60000" futureOnly="true"/>
>       <traceBrokerPathPlugin/>
>     </plugins>
>
>     </broker>
>     <bean id="mssql-ds" class="org.apache.commons.dbcp2.BasicDataSource"
> destroy-method="close">
>         <property name="driverClassName"
> value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
>         <property name="url"
> value="jdbc:sqlserver://xxx:1433;DatabaseName=ActiveMQDatastore"/>
>         <property name="username" value="xxx"/>
>         <property name="password" value="xxx"/>
>         <property name="poolPreparedStatements" value="true"/>
>     </bean>
>     <import resource="jetty.xml"/>
> </beans>
> [root@xxx activemq]#
>
>
> [root@xxx activemq]# bin/activemq start
> INFO: Loading '/opt/activemq//bin/env'
> INFO: Using java '/usr/bin/java'
> INFO: Starting - inspect logfiles specified in logging.properties and
> log4j.properties to get details
> INFO: pidfile created : '/opt/activemq/data/activemq.pid' (pid '2274')
> [root@xxx activemq]# bin/activemq status
> INFO: Loading '/opt/activemq//bin/env'
> INFO: Using java '/usr/bin/java'
> ActiveMQ not running
> [root@xxx activemq]#
>
>
>
> [root@xxx activemq]# ls data/
> activemq.pid  activemq.pid.stop  audit.log
> [root@xxx activemq]#
>
>
>
> 2018-03-18 19:57 GMT+05:00 Tim Bain <tb...@alumni.duke.edu>:
>
> > Can you elaborate on what knowledge of ActiveMQ mechanics would be
> needed?
> > If you have specific questions that aren't covered by the wiki page I
> > provided, we can try to answer them for you.
> >
> > Tim
> >
> > On Sun, Mar 18, 2018, 12:57 AM Илья Шипицин <chipits...@gmail.com>
> wrote:
> >
> > > I mean, my task most probably can be resolved by log4j, it needs some
> > > knowledge of activemq mechanics in order to set up log4j
> > >
> > > On Sun, Mar 18, 2018, 11:25 AM Tim Bain <tb...@alumni.duke.edu> wrote:
> > >
> > > > Does http://activemq.apache.org/logging-interceptor.html do what
> > you're
> > > > looking for? (I can't tell, since your requirement is pretty vague,
> > given
> > > > that the broker isn't a web server and uses long-lived connections
> that
> > > > span multiple operations rather than short-lived connections that are
> > > used
> > > > for only a single operation, but it seems like it might be what you
> > > want.)
> > > >
> > > > Tim
> > > >
> > > > On Wed, Mar 14, 2018 at 6:42 AM, Илья Шипицин <chipits...@gmail.com>
> > > > wrote:
> > > >
> > > > > 5.x
> > > > >
> > > > > (we do not use artemis yet, but having that guide for artemis would
> > be
> > > > > nice)
> > > > >
> > > > > 2018-03-14 17:40 GMT+05:00 Tim Bain <tb...@alumni.duke.edu>:
> > > > >
> > > > > > Is this for 5.x, or for Artemis?
> > > > > >
> > > > > > On Wed, Mar 14, 2018, 2:04 AM Илья Шипицин <chipits...@gmail.com
> >
> > > > wrote:
> > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > is there a guide how to configure equivalent of http access
> log ?
> > > > > > >
> > > > > > > i.e. structured log with one line per request
> > > > > > >
> > > > > > > thanks!
> > > > > > > Ilya Shipitsin
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Reply via email to