From users-return-13459-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Thu Apr 03 19:51:18 2008 Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 70395 invoked from network); 3 Apr 2008 19:51:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Apr 2008 19:51:18 -0000 Received: (qmail 75916 invoked by uid 500); 3 Apr 2008 19:51:18 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 75574 invoked by uid 500); 3 Apr 2008 19:51:17 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 75565 invoked by uid 99); 3 Apr 2008 19:51:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2008 12:51:17 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Apr 2008 19:50:23 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JhVSN-0004FT-9B for users@activemq.apache.org; Thu, 03 Apr 2008 12:50:43 -0700 Message-ID: <16470098.post@talk.nabble.com> Date: Thu, 3 Apr 2008 12:50:43 -0700 (PDT) From: navnetkachroo To: users@activemq.apache.org Subject: Re: ActiveMQ 5.0 & JAAS: SecurityException: User name or password is invalid on Startup In-Reply-To: <16265456.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: navnetkachroo@gmail.com References: <16261835.post@talk.nabble.com> <16262352.post@talk.nabble.com> <16262771.post@talk.nabble.com> <16263455.post@talk.nabble.com> <16265456.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Any updates on this issue? navnetkachroo wrote: > > The users.properties, login.config, and groups.properties files are in > $ACTIVEMQ_HOME/conf/org/apache/activemq/security ... I give this path as > an argument while (java.security.auth.login.config) starting ActiveMQ. > > I tried commenting the simple plugin => It passed through the previous > block... But now i'm getting another exception (User system is not > authorized to read from... stack trace in the end), even after having this > in the xml: > > write="system" admin="system"/> > write="system" admin="system"/> > write="system" admin="system" /> > write="system" admin="system" /> > > > Thanks! > > StackTrace: > > > WARN DiscoveryNetworkConnector - Could not start network bridge > between: vm://test-msg-poc-1 and: tcp://test-msg-poc-2:61616 due to: > java.net.ConnectException: Connection refused > > INFO DemandForwardingBridge - test-msg-poc-1 bridge to Unknown > stopped > > ERROR TransportConnector - Could not accept connection : Peer > (vm://test-msg-poc-1#4) disposed. > > ERROR Service - Async error occurred: > java.lang.SecurityException: User system is not authorized to read from: > ActiveMQ.Advisory.Consumer.>,topic://ActiveMQ.Advisory.TempQueue,topic://ActiveMQ.Advisory.TempTopic > > java.lang.SecurityException: User system is not authorized to read from: > ActiveMQ.Advisory.Consumer.>,topic://ActiveMQ.Advisory.TempQueue,topic://ActiveMQ.Advisory.TempTopic > > at > org.apache.activemq.security.AuthorizationBroker.addConsumer(AuthorizationBroker.java:107) > > > > > > ttmdev wrote: >> >> Are the files users.properties, login.config, and groups.properties in >> $ACTIVEMQ_HOME/conf? >> >> I noticed that you have both the jaas and simple authentication plugins >> enabled in your broker's xml cfg file. Try commenting out the simple >> plugin. >> >> Can you clients connect to the broker? >> >> Joe >> >> >> navnetkachroo wrote: >>> >>> Thanks for your reply. >>> >>> I tried giving the username & pwd... But even that did'nt work :(. I'm >>> getting the same exception. >>> >>> >> uri="static://(tcp://test-msg-poc-1:61616)" userName="system" >>> password="manager"/> >>> >>> >>> >>> ttmdev wrote: >>>> >>>> Couple of things to keep in mind. >>>> >>>> a. Any broker wishing to connect to this broker (i.e., the one you've >>>> enabled security for) will need to provide the proper credentials via >>>> the networkConnector element's userName and password attributes. >>>> >>>> b. Any networkConnector elements given to this broker must be given the >>>> proper credentials even if the corresponding remote broker does not >>>> have security enabled. >>>> >>>> Joe >>>> Goto www.ttmsolutions.com for a free ActiveMQ user guide >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> navnetkachroo wrote: >>>>> >>>>> Hi, >>>>> >>>>> I configured JAAS & ActiveMQ 5.0. >>>>> >>>>> On ActiveMQ startup, I get the User name or password is invalid >>>>> exception. (stacktrace mentioned in the end of this post). >>>>> >>>>> I've been through all the related posts & have tried the suggestions, >>>>> even then this doesn't work ! >>>>> >>>>> Attached are the configuration files that I'm using: >>>>> * users.properties >>>>> * login.config >>>>> * groups.properties >>>>> * activemq.xml.entitle >>>>> >>>>> I've also tried removing camelContext, commandAgent & jetty from the >>>>> activemq.xml. >>>>> >>>>> >>>>> Stacktrace: >>>>> >>>>> ACTIVEMQ_HOME: /tech/poc/activemq >>>>> ACTIVEMQ_BASE: /tech/poc/activemq >>>>> Loading message broker from: xbean:activemq.xml >>>>> INFO BrokerService - Using Persistence Adapter: >>>>> AMQPersistenceAdapter(${activemq.base}/data/test-msg-poc-2) >>>>> INFO BrokerService - ActiveMQ 5.1-SNAPSHOT JMS >>>>> Message Broker (test-msg-poc-2) is starting >>>>> INFO BrokerService - For help or more information >>>>> please see: http://activemq.apache.org/ >>>>> INFO AMQPersistenceAdapter - AMQStore starting using >>>>> directory: ${activemq.base}/data/test-msg-poc-2 >>>>> INFO KahaStore - Kaha Store using data directory >>>>> ${activemq.base}/data/test-msg-poc-2/kr-store/state >>>>> INFO ManagementContext - JMX consoles can connect to >>>>> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi >>>>> INFO AMQPersistenceAdapter - Active data files: [] >>>>> WARN AMQPersistenceAdapter - The ReferenceStore is not valid >>>>> - recovering ... >>>>> INFO KahaStore - Kaha Store successfully deleted >>>>> data directory ${activemq.base}/data/test-msg-poc-2/kr-store/data >>>>> INFO AMQPersistenceAdapter - Journal Recovery Started from: >>>>> DataManager:(data-) >>>>> INFO AMQPersistenceAdapter - Recovered 0 operations from >>>>> redo log in 0.018 seconds. >>>>> INFO AMQPersistenceAdapter - Finished recovering the >>>>> ReferenceStore >>>>> INFO KahaStore - Kaha Store using data directory >>>>> ${activemq.base}/data/test-msg-poc-2/kr-store/data >>>>> INFO TransportServerThreadSupport - Listening for connections at: >>>>> tcp://test-msg-poc-2:61616 >>>>> INFO TransportConnector - Connector openwire Started >>>>> INFO DiscoveryNetworkConnector - Establishing network connection >>>>> between from vm://test-msg-poc-2 to tcp://test-msg-poc-1:61616 >>>>> INFO TransportConnector - Connector vm://test-msg-poc-2 >>>>> Started >>>>> INFO NetworkConnector - Network Connector >>>>> org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent@c44b88 >>>>> Started >>>>> INFO BrokerService - ActiveMQ JMS Message Broker >>>>> (test-msg-poc-2, ID:test-msg-poc-2-41438-1206391453635-0:0) started >>>>> INFO DemandForwardingBridge - Network connection between >>>>> vm://test-msg-poc-2#0 and >>>>> tcp://test-msg-poc-1/134.42.19.30:61616(test-msg-poc-1) has been >>>>> established. >>>>> WARN TransportConnection - Failed to add Connection >>>>> java.lang.SecurityException: User name or password is invalid. >>>>> at >>>>> org.apache.activemq.security.SimpleAuthenticationBroker.addConnection(SimpleAuthenticationBroker.java:52) >>>>> 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:658) >>>>> 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:68) >>>>> 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) >>>>> ERROR Service - Async error occurred: >>>>> java.lang.SecurityException: User name or password is invalid. >>>>> java.lang.SecurityException: User name or password is invalid. >>>>> at >>>>> org.apache.activemq.security.SimpleAuthenticationBroker.addConnection(SimpleAuthenticationBroker.java:52) >>>>> 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:658) >>>>> 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:68) >>>>> 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 DemandForwardingBridge - Network connection between >>>>> vm://test-msg-poc-2#0 and tcp://test-msg-poc-1/134.42.19.30:61616 >>>>> shutdown due to a local error: java.lang.SecurityException: User name >>>>> or password is invalid. >>>>> WARN TransportConnection - Failed to add Connection >>>>> java.lang.SecurityException: User name or password is invalid. >>>>> at >>>>> org.apache.activemq.security.SimpleAuthenticationBroker.addConnection(SimpleAuthenticationBroker.java:52) >>>>> 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:658) >>>>> at >>>>> org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:86) >>>>> 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.TransportFilter.onCommand(TransportFilter.java:68) >>>>> at >>>>> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:134) >>>>> at >>>>> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:173) >>>>> at >>>>> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84) >>>>> at >>>>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196) >>>>> at >>>>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183) >>>>> at java.lang.Thread.run(Thread.java:595) .... >>>>> ...... >>>>> http://www.nabble.com/file/p16261835/users.properties >>>>> users.properties http://www.nabble.com/file/p16261835/login.config >>>>> login.config >>>>> http://www.nabble.com/file/p16261835/activemq.xml.entitle >>>>> activemq.xml.entitle >>>>> http://www.nabble.com/file/p16261835/groups.properties >>>>> groups.properties http://www.nabble.com/file/p16261835/login.config >>>>> login.config >>>>> >>>> >>>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/ActiveMQ-5.0---JAAS%3A-SecurityException%3A-User-name-or-password-is-invalid-on-Startup-tp16261835s2354p16470098.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.