activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pfid ...@informationsdesign.de>
Subject Trouble with JAAS & 5.0.0
Date Mon, 10 Dec 2007 11:12:03 GMT

I'm currently using a 4.1.1 broker with JAAS authentication, and it works
fine. Today i wanted to try out the 5.0.0. release version
(http://activemq.apache.org/activemq-500-release.html). The broker itself
will run out of the box without changing the original configuration files.
however i want the same authentication configuration i used with the 4.1.1
broker. so i copied login.conf, users.properties and groups.properties to
/conf. in the xml file i added 



>  <plugins>
>                         <jaasAuthenticationPlugin
> configuration="activemq-domain"/>
>                         <authorizationPlugin>
>                                 <map>
>                                         <authorizationMap>
>                                                 <authorizationEntries>
>                                                        
> <authorizationEntry queue="testqueue" read="admin" write="admin"
> admin="admin"/>
> 

in the startscript (/bin/activemq) i echoed the classpath:

ACTIVEMQ_HOME: /home/user/brokerdir
ACTIVEMQ_BASE: /home/user/brokerdir
CLASSPATH: (ACTIVEMQ_BASE)/conf

which seems correct. login.conf contains:



> activemq-domain {
>         org.apache.activemq.jaas.PropertiesLoginModule required
>                 debug=true
>                        
> org.apache.activemq.jaas.properties.user="users.properties"
>                        
> org.apache.activemq.jaas.properties.group="groups.properties";
> };
> 

when i start the broker, i get the following exception(s) and the broker
will shutdown immediately:


INFO  TransportConnector             - Connector vm://localhost Started
> WARN  TransportConnection            - Failed to add Connection
> java.lang.SecurityException: User name or password is invalid.
>         at
> org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
>         at
> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>         at
> org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:657)
>         at
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
>         at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
>         at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
>         at
> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
>         at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
>         at
> org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:202)
>         at
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
>         at
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
> Caused by: javax.security.auth.login.LoginException:
> java.lang.NullPointerException
>         at java.util.Hashtable.get(Unknown Source)
>         at java.util.Properties.getProperty(Unknown Source)
>         at
> org.apache.activemq.jaas.PropertiesLoginModule.login(PropertiesLoginModule.java:116)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at javax.security.auth.login.LoginContext.invoke(Unknown Source)
>         at javax.security.auth.login.LoginContext.access$000(Unknown
> Source)
>         at javax.security.auth.login.LoginContext$4.run(Unknown Source)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.login.LoginContext.invokePriv(Unknown
> Source)
>         at javax.security.auth.login.LoginContext.login(Unknown Source)
>         at
> org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
>         at
> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>         at
> org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:657)
>         at
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
>         at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
>         at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
>         at
> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
>         at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
>         at
> org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:202)
>         at
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
>         at
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
> 
>         at javax.security.auth.login.LoginContext.invoke(Unknown Source)
>         at javax.security.auth.login.LoginContext.access$000(Unknown
> Source)
>         at javax.security.auth.login.LoginContext$4.run(Unknown Source)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.login.LoginContext.invokePriv(Unknown
> Source)
>         at javax.security.auth.login.LoginContext.login(Unknown Source)
>         at
> org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)
>         ... 11 more
> INFO  BrokerService                  - ActiveMQ Message Broker (localhost,
> ID:brahms-54902-1197284591413-0:0) is shutting down
> INFO  BrokerService                  - ActiveMQ Message Broker (localhost,
> ID:brahms-54902-1197284591413-0:0) is shutting down
> INFO  NetworkConnector               - Network Connector
> org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgent@1873eb2
> Stopped
> INFO  TransportConnector             - Connector openwire Stopped
> INFO  TransportConnector             - Connector ssl Stopped
> INFO  TransportConnector             - Connector stomp Stopped
> INFO  TransportConnector             - Connector xmpp Stopped
> INFO  TransportConnector             - Connector vm://localhost Stopped
> WARN  ActiveMQConnection             - Async exception with no exception
> listener: org.apache.activemq.transport.TransportDisposedIOException: Peer
> (vm://localhost#1) disposed.
> org.apache.activemq.transport.TransportDisposedIOException: Peer
> (vm://localhost#1) disposed.
>         at
> org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:200)
>         at
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
>         at
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
> INFO  BrokerService                  - ActiveMQ JMS Message Broker
> (localhost, ID:brahms-54902-1197284591413-0:0) stopped
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.activemq.broker.util.CommandAgent' defined in
> class path resource [activemq.xml]: Invocation of init method failed;
> nested exception is javax.jms.JMSException: User name or password is
> invalid.
> java.lang.RuntimeException: Failed to execute start task. Reason:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.activemq.broker.util.CommandAgent' defined in
> class path resource [activemq.xml]: Invocation of init method failed;
> nested exception is javax.jms.JMSException: User name or password is
> invalid.
>         at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:51)
>         at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:104)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:51)
>         at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:76)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
>         at org.apache.activemq.console.Main.main(Main.java:106)
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'org.apache.activemq.broker.util.CommandAgent'
> defined in class path resource [activemq.xml]: Invocation of init method
> failed; nested exception is javax.jms.JMSException: User name or password
> is invalid.
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1174)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:91)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:51)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
>         at
> org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:112)
>         at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
>         ... 10 more
> 
> 

plus tons of other "username invalid" exceptions. whats wrong?
i didnt change the original 5.0.0. configuration in any way, besides copying
over the user/group/login config files and adding jaas to activemq.xml.
-- 
View this message in context: http://www.nabble.com/Trouble-with-JAAS---5.0.0-tp14250971s2354p14250971.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message