You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Daniele Dellafiore <il...@gmail.com> on 2011/03/23 11:20:53 UTC

activemq not starting with xbean activemq-security.xml config, jaas plugin

Hi. I was succesfull in making AMQ working with the
1. removed simple-authentication and used jaas plugin instead, in the
default activemq-security.xml.Tthe rest of the config file is unaltered.
2. a login.info that used properties files for users and groups, in the
/conf folder.
3. users.properties contains system=manager
4. groups.properties contains admins=admin,system

basically, the steps described at http://activemq.apache.org/security.html

No other step was necessary, right? Anyway, I succeded.

Now amq is not starting anymore with that config, while a default start
still works. Both the old instance and a new one configured from scratch.
I've added some INFO and DEBUG to logs in the end of email.

The logs stop and the process got killed without any other information.
After the log there is the complete activemq-security.xml which is btw the
defautl one with the jaas plugin.

With no error I've no idea where to look at...


2011-03-23 10:20:12,537 | DEBUG | Now attempting to figure out the type of
resource: conf/activemq-security.xml |
org.apache.activemq.xbean.XBeanBrokerFactory | main
2011-03-23 10:20:12,763 | INFO  | Refreshing
org.apache.activemq.xbean.XBeanBrokerFactory$1@1edc073: startup date [Wed
Mar 23 10:20:12 UTC 2011]; root of context hierarchy |
org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
2011-03-23 10:20:13,156 | INFO  | Loading XML bean definitions from file
[/home/data/apache-activemq-5.4.2/conf/activemq-security.xml] |
org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader | main
2011-03-23 10:20:15,108 | INFO  | Loading XML bean definitions from file
[/home/data/apache-activemq-5.4.2/conf/jetty.xml] |
org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader | main
2011-03-23 10:20:15,546 | INFO  | Loading XML bean definitions from file
[/home/data/apache-activemq-5.4.2/conf/camel.xml] |
org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader | main
2011-03-23 10:20:15,870 | INFO  | camel-osgi.jar/camel-spring-osgi.jar not
detected in classpath |
org.apache.camel.spring.handler.CamelNamespaceHandler | main
2011-03-23 10:20:15,870 | DEBUG | Using
org.apache.camel.spring.CamelContextFactoryBean as
CamelContextBeanDefinitionParser |
org.apache.camel.spring.handler.CamelNamespaceHandler | main
2011-03-23 10:20:18,764 | DEBUG | Registered default:
org.apache.camel.spring.CamelProducerTemplateFactoryBean with id: template
on camel context: camel |
org.apache.camel.spring.handler.CamelNamespaceHandler | main
2011-03-23 10:20:18,764 | DEBUG | Registered default:
org.apache.camel.spring.CamelConsumerTemplateFactoryBean with id:
consumerTemplate on camel context: camel |
org.apache.camel.spring.handler.CamelNamespaceHandler | main
2011-03-23 10:20:18,964 | DEBUG | Bean factory for
org.apache.activemq.xbean.XBeanBrokerFactory$1@1edc073:
org.springframework.beans.factory.support.DefaultListableBeanFactory@57ae58:
defining beans
[environmentVariablesConfiguration,configurationEncryptor,propertyConfigurer,org.apache.activemq.xbean.XBeanBrokerService#0,org.apache.activemq.broker.util.CommandAgent#0,securityLoginService,securityConstraint,securityConstraintMapping,securityHandler,contexts,Server,template,consumerTemplate,camel:beanPostProcessor,camel,activemq];
root of factory hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 |
main
2011-03-23 10:20:19,473 | INFO  | Loading properties file from URL
[file:/home/data/activemq/conf/credentials-enc.properties] |
org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer | main




-- 
Daniele Dellafiore
http://danieledellafiore.net

Re: activemq not starting with xbean activemq-security.xml config, jaas plugin

Posted by Daniele Dellafiore <il...@gmail.com>.
I add some precious information.
The behavior is the same also with the original activemq-security.xml.

I'm running AMQ 5.4.2, java 1.6.0_20 on a Ubuntu 10.10 server 2.6.32.

On Wed, Mar 23, 2011 at 12:20 PM, Daniele Dellafiore <il...@gmail.com>wrote:

> Hi. I was succesfull in making AMQ working with the
> 1. removed simple-authentication and used jaas plugin instead, in the
> default activemq-security.xml.Tthe rest of the config file is unaltered.
> 2. a login.info that used properties files for users and groups, in the
> /conf folder.
> 3. users.properties contains system=manager
> 4. groups.properties contains admins=admin,system
>
> basically, the steps described at http://activemq.apache.org/security.html
>
> No other step was necessary, right? Anyway, I succeded.
>
> Now amq is not starting anymore with that config, while a default start
> still works. Both the old instance and a new one configured from scratch.
> I've added some INFO and DEBUG to logs in the end of email.
>
> The logs stop and the process got killed without any other information.
> After the log there is the complete activemq-security.xml which is btw the
> defautl one with the jaas plugin.
>
> With no error I've no idea where to look at...
>
>
> 2011-03-23 10:20:12,537 | DEBUG | Now attempting to figure out the type of
> resource: conf/activemq-security.xml |
> org.apache.activemq.xbean.XBeanBrokerFactory | main
> 2011-03-23 10:20:12,763 | INFO  | Refreshing
> org.apache.activemq.xbean.XBeanBrokerFactory$1@1edc073: startup date [Wed
> Mar 23 10:20:12 UTC 2011]; root of context hierarchy |
> org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
> 2011-03-23 10:20:13,156 | INFO  | Loading XML bean definitions from file
> [/home/data/apache-activemq-5.4.2/conf/activemq-security.xml] |
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader | main
> 2011-03-23 10:20:15,108 | INFO  | Loading XML bean definitions from file
> [/home/data/apache-activemq-5.4.2/conf/jetty.xml] |
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader | main
> 2011-03-23 10:20:15,546 | INFO  | Loading XML bean definitions from file
> [/home/data/apache-activemq-5.4.2/conf/camel.xml] |
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader | main
> 2011-03-23 10:20:15,870 | INFO  | camel-osgi.jar/camel-spring-osgi.jar not
> detected in classpath |
> org.apache.camel.spring.handler.CamelNamespaceHandler | main
> 2011-03-23 10:20:15,870 | DEBUG | Using
> org.apache.camel.spring.CamelContextFactoryBean as
> CamelContextBeanDefinitionParser |
> org.apache.camel.spring.handler.CamelNamespaceHandler | main
> 2011-03-23 10:20:18,764 | DEBUG | Registered default:
> org.apache.camel.spring.CamelProducerTemplateFactoryBean with id: template
> on camel context: camel |
> org.apache.camel.spring.handler.CamelNamespaceHandler | main
> 2011-03-23 10:20:18,764 | DEBUG | Registered default:
> org.apache.camel.spring.CamelConsumerTemplateFactoryBean with id:
> consumerTemplate on camel context: camel |
> org.apache.camel.spring.handler.CamelNamespaceHandler | main
> 2011-03-23 10:20:18,964 | DEBUG | Bean factory for
> org.apache.activemq.xbean.XBeanBrokerFactory$1@1edc073:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@57ae58:
> defining beans
> [environmentVariablesConfiguration,configurationEncryptor,propertyConfigurer,org.apache.activemq.xbean.XBeanBrokerService#0,org.apache.activemq.broker.util.CommandAgent#0,securityLoginService,securityConstraint,securityConstraintMapping,securityHandler,contexts,Server,template,consumerTemplate,camel:beanPostProcessor,camel,activemq];
> root of factory hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 |
> main
> 2011-03-23 10:20:19,473 | INFO  | Loading properties file from URL
> [file:/home/data/activemq/conf/credentials-enc.properties] |
> org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer | main
>
>
>
>
> --
> Daniele Dellafiore
> http://danieledellafiore.net
>



-- 
Daniele Dellafiore
http://danieledellafiore.net

Re: activemq not starting with xbean activemq-security.xml config, jaas plugin

Posted by Daniele Dellafiore <da...@dellafiore.net>.
thanks, that's true I totally forgot that.

On Wed, Mar 23, 2011 at 12:57 PM, Dejan Bosanac <de...@nighttale.net> wrote:

> Hi Daniele,
>
> note that activemq-security.xml also uses encrypted passwords (
> http://activemq.apache.org/encrypted-passwords.html) so you need to do
> something like
>
> export ACTIVEMQ_ENCRYPTION_PASSWORD=activemq
>
> before you start the broker.
>
> It's all explained in the file header
>
> Regards
> --
> Dejan Bosanac
> -----------------
> FuseSource - The experts in open source integration and messaging.
> Email: dejanb@fusesource.com
> Web: http://fusesource.com
> Twitter:  http://twitter.com/dejanb
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
>
>
> On Wed, Mar 23, 2011 at 11:20 AM, Daniele Dellafiore <ildella@gmail.com
> >wrote:
>
> > Hi. I was succesfull in making AMQ working with the
> > 1. removed simple-authentication and used jaas plugin instead, in the
> > default activemq-security.xml.Tthe rest of the config file is unaltered.
> > 2. a login.info that used properties files for users and groups, in the
> > /conf folder.
> > 3. users.properties contains system=manager
> > 4. groups.properties contains admins=admin,system
> >
> > basically, the steps described at
> http://activemq.apache.org/security.html
> >
> > No other step was necessary, right? Anyway, I succeded.
> >
> > Now amq is not starting anymore with that config, while a default start
> > still works. Both the old instance and a new one configured from scratch.
> > I've added some INFO and DEBUG to logs in the end of email.
> >
> > The logs stop and the process got killed without any other information.
> > After the log there is the complete activemq-security.xml which is btw
> the
> > defautl one with the jaas plugin.
> >
> > With no error I've no idea where to look at...
> >
> >
> > 2011-03-23 10:20:12,537 | DEBUG | Now attempting to figure out the type
> of
> > resource: conf/activemq-security.xml |
> > org.apache.activemq.xbean.XBeanBrokerFactory | main
> > 2011-03-23 10:20:12,763 | INFO  | Refreshing
> > org.apache.activemq.xbean.XBeanBrokerFactory$1@1edc073: startup date
> [Wed
> > Mar 23 10:20:12 UTC 2011]; root of context hierarchy |
> > org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
> > 2011-03-23 10:20:13,156 | INFO  | Loading XML bean definitions from file
> > [/home/data/apache-activemq-5.4.2/conf/activemq-security.xml] |
> > org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader | main
> > 2011-03-23 10:20:15,108 | INFO  | Loading XML bean definitions from file
> > [/home/data/apache-activemq-5.4.2/conf/jetty.xml] |
> > org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader | main
> > 2011-03-23 10:20:15,546 | INFO  | Loading XML bean definitions from file
> > [/home/data/apache-activemq-5.4.2/conf/camel.xml] |
> > org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader | main
> > 2011-03-23 10:20:15,870 | INFO  | camel-osgi.jar/camel-spring-osgi.jar
> not
> > detected in classpath |
> > org.apache.camel.spring.handler.CamelNamespaceHandler | main
> > 2011-03-23 10:20:15,870 | DEBUG | Using
> > org.apache.camel.spring.CamelContextFactoryBean as
> > CamelContextBeanDefinitionParser |
> > org.apache.camel.spring.handler.CamelNamespaceHandler | main
> > 2011-03-23 10:20:18,764 | DEBUG | Registered default:
> > org.apache.camel.spring.CamelProducerTemplateFactoryBean with id:
> template
> > on camel context: camel |
> > org.apache.camel.spring.handler.CamelNamespaceHandler | main
> > 2011-03-23 10:20:18,764 | DEBUG | Registered default:
> > org.apache.camel.spring.CamelConsumerTemplateFactoryBean with id:
> > consumerTemplate on camel context: camel |
> > org.apache.camel.spring.handler.CamelNamespaceHandler | main
> > 2011-03-23 10:20:18,964 | DEBUG | Bean factory for
> > org.apache.activemq.xbean.XBeanBrokerFactory$1@1edc073:
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@57ae58
> > :
> > defining beans
> >
> >
> [environmentVariablesConfiguration,configurationEncryptor,propertyConfigurer,org.apache.activemq.xbean.XBeanBrokerService#0,org.apache.activemq.broker.util.CommandAgent#0,securityLoginService,securityConstraint,securityConstraintMapping,securityHandler,contexts,Server,template,consumerTemplate,camel:beanPostProcessor,camel,activemq];
> > root of factory hierarchy |
> org.apache.activemq.xbean.XBeanBrokerFactory$1
> > |
> > main
> > 2011-03-23 10:20:19,473 | INFO  | Loading properties file from URL
> > [file:/home/data/activemq/conf/credentials-enc.properties] |
> > org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer |
> > main
> >
> >
> >
> >
> > --
> > Daniele Dellafiore
> > http://danieledellafiore.net
> >
>

Re: activemq not starting with xbean activemq-security.xml config, jaas plugin

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi Daniele,

note that activemq-security.xml also uses encrypted passwords (
http://activemq.apache.org/encrypted-passwords.html) so you need to do
something like

export ACTIVEMQ_ENCRYPTION_PASSWORD=activemq

before you start the broker.

It's all explained in the file header

Regards
-- 
Dejan Bosanac
-----------------
FuseSource - The experts in open source integration and messaging.
Email: dejanb@fusesource.com
Web: http://fusesource.com
Twitter:  http://twitter.com/dejanb
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Wed, Mar 23, 2011 at 11:20 AM, Daniele Dellafiore <il...@gmail.com>wrote:

> Hi. I was succesfull in making AMQ working with the
> 1. removed simple-authentication and used jaas plugin instead, in the
> default activemq-security.xml.Tthe rest of the config file is unaltered.
> 2. a login.info that used properties files for users and groups, in the
> /conf folder.
> 3. users.properties contains system=manager
> 4. groups.properties contains admins=admin,system
>
> basically, the steps described at http://activemq.apache.org/security.html
>
> No other step was necessary, right? Anyway, I succeded.
>
> Now amq is not starting anymore with that config, while a default start
> still works. Both the old instance and a new one configured from scratch.
> I've added some INFO and DEBUG to logs in the end of email.
>
> The logs stop and the process got killed without any other information.
> After the log there is the complete activemq-security.xml which is btw the
> defautl one with the jaas plugin.
>
> With no error I've no idea where to look at...
>
>
> 2011-03-23 10:20:12,537 | DEBUG | Now attempting to figure out the type of
> resource: conf/activemq-security.xml |
> org.apache.activemq.xbean.XBeanBrokerFactory | main
> 2011-03-23 10:20:12,763 | INFO  | Refreshing
> org.apache.activemq.xbean.XBeanBrokerFactory$1@1edc073: startup date [Wed
> Mar 23 10:20:12 UTC 2011]; root of context hierarchy |
> org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
> 2011-03-23 10:20:13,156 | INFO  | Loading XML bean definitions from file
> [/home/data/apache-activemq-5.4.2/conf/activemq-security.xml] |
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader | main
> 2011-03-23 10:20:15,108 | INFO  | Loading XML bean definitions from file
> [/home/data/apache-activemq-5.4.2/conf/jetty.xml] |
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader | main
> 2011-03-23 10:20:15,546 | INFO  | Loading XML bean definitions from file
> [/home/data/apache-activemq-5.4.2/conf/camel.xml] |
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader | main
> 2011-03-23 10:20:15,870 | INFO  | camel-osgi.jar/camel-spring-osgi.jar not
> detected in classpath |
> org.apache.camel.spring.handler.CamelNamespaceHandler | main
> 2011-03-23 10:20:15,870 | DEBUG | Using
> org.apache.camel.spring.CamelContextFactoryBean as
> CamelContextBeanDefinitionParser |
> org.apache.camel.spring.handler.CamelNamespaceHandler | main
> 2011-03-23 10:20:18,764 | DEBUG | Registered default:
> org.apache.camel.spring.CamelProducerTemplateFactoryBean with id: template
> on camel context: camel |
> org.apache.camel.spring.handler.CamelNamespaceHandler | main
> 2011-03-23 10:20:18,764 | DEBUG | Registered default:
> org.apache.camel.spring.CamelConsumerTemplateFactoryBean with id:
> consumerTemplate on camel context: camel |
> org.apache.camel.spring.handler.CamelNamespaceHandler | main
> 2011-03-23 10:20:18,964 | DEBUG | Bean factory for
> org.apache.activemq.xbean.XBeanBrokerFactory$1@1edc073:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@57ae58
> :
> defining beans
>
> [environmentVariablesConfiguration,configurationEncryptor,propertyConfigurer,org.apache.activemq.xbean.XBeanBrokerService#0,org.apache.activemq.broker.util.CommandAgent#0,securityLoginService,securityConstraint,securityConstraintMapping,securityHandler,contexts,Server,template,consumerTemplate,camel:beanPostProcessor,camel,activemq];
> root of factory hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1
> |
> main
> 2011-03-23 10:20:19,473 | INFO  | Loading properties file from URL
> [file:/home/data/activemq/conf/credentials-enc.properties] |
> org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer |
> main
>
>
>
>
> --
> Daniele Dellafiore
> http://danieledellafiore.net
>