activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Quiroz <carlos.quiroz-cas...@nokia.com>
Subject Re: User Name and Password Invalid when going to localhost/admin
Date Sat, 09 Aug 2008 19:40:24 GMT

Hi

Probably your ActiveMQ setup requires client a username/password to connect.
You can change the username and password that the web console is using, for
example, by modifying the definition of the connectionFactory bean in the
webconsole-embedded.xml file of the console web application.

Regards
Carlos Quiroz


mardo wrote:
> 
> Im getting teh following error when trying to browse /admin
> 
> HTTP ERROR: 500
> User name or password is invalid.
> RequestURI=/admin/queueBrowse/jcsd
> 
> Caused by:
> javax.jms.JMSException: User name or password is invalid.
> 	at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
> 	at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1201)
> 	at
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1289)
> 	at
> org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:456)
> 	at org.apache.activemq.web.WebClient.getConnection(WebClient.java:222)
> 	at org.apache.activemq.web.WebClient.createSession(WebClient.java:302)
> 	at org.apache.activemq.web.WebClient.getSession(WebClient.java:214)
> 	at
> org.apache.activemq.web.QueueBrowseServlet.doGet(QueueBrowseServlet.java:59)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 	at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
> 	at
> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:63)
> 	at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
> 	at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> 	at org.apache.activemq.web.SessionFilter.doFilter(SessionFilter.java:46)
> 	at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> 	at
> org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:81)
> 	at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> 	at
> com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
> 	at
> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
> 	at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> 	at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
> 	at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> 	at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> 	at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:320)
> 	at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
> 	at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
> 	at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
> 	at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
> Caused by: java.lang.SecurityException: User name or password is invalid.
> 	at
> org.apache.activemq.security.SimpleAuthenticationBroker.addConnection(SimpleAuthenticationBroker.java:52)
> 	at
> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:88)
> 	at
> org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:662)
> 	at
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
> 	at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
> 	at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)
> 	at
> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
> 	at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> 	at
> org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:205)
> 	at
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
> 	at
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
> 
> Caused by:
> java.lang.SecurityException: User name or password is invalid.
> 	at
> org.apache.activemq.security.SimpleAuthenticationBroker.addConnection(SimpleAuthenticationBroker.java:52)
> 	at
> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:88)
> 	at
> org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:662)
> 	at
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
> 	at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
> 	at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)
> 	at
> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
> 	at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> 	at
> org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:205)
> 	at
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
> 	at
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
> 
> Powered by Jetty://
> 
> My config file looks like this:
> 
> 
> <!--
>     Licensed to the Apache Software Foundation (ASF) under one or more
>     contributor license agreements.  See the NOTICE file distributed with
>     this work for additional information regarding copyright ownership.
>     The ASF licenses this file to You under the Apache License, Version
> 2.0
>     (the "License"); you may not use this file except in compliance with
>     the License.  You may obtain a copy of the License at
>    
>     http://www.apache.org/licenses/LICENSE-2.0
>    
>     Unless required by applicable law or agreed to in writing, software
>     distributed under the License is distributed on an "AS IS" BASIS,
>     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
>     See the License for the specific language governing permissions and
>     limitations under the License.
> -->
> <!-- START SNIPPET: example -->
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   xmlns:amq="http://activemq.apache.org/schema/core"
>   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-2.0.xsd
>   http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd   
>   http://activemq.apache.org/camel/schema/spring
> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
> 
>     <!-- Allows us to use system properties as variables in this
> configuration file -->
>     <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> 
> 
> 
>     <broker xmlns="http://activemq.apache.org/schema/core"
> brokerName="localhost" dataDirectory="${activemq.base}/data"
> populateJMSXUserID="true">
> 
> 
>    <plugins>
> 
> 
> 
> 
>       <authorizationPlugin> 
>         <map>
>           <authorizationMap>
>             <authorizationEntries>
>               <authorizationEntry queue=">" read="users" write="users"
> admin="users" />
> 	      <authorizationEntry topic=">" read="users" write="users"
> admin="users" /> 
> 	</authorizationEntries>
>                       
>           </authorizationMap>
>         </map>
> 
>       </authorizationPlugin>
> 
> 	<simpleAuthenticationPlugin> 
> 		<users> 
> 			<authenticationUser username="*****" password="*********
> groups="users,admins"/> 
> 		</users>
> 	 </simpleAuthenticationPlugin>
> 
> 
>     </plugins>
> 
> 
> 
> 
>         <!-- Destination specific policies using destination names or
> wildcards -->
>         <destinationPolicy>
>             <policyMap>
>                 <policyEntries>
>                     <policyEntry queue=">" memoryLimit="5mb"/>
>                     <policyEntry topic=">" memoryLimit="5mb">
>                         <dispatchPolicy>
>                             <strictOrderDispatchPolicy/>
>                         </dispatchPolicy>
>                         <subscriptionRecoveryPolicy>
>                             <lastImageSubscriptionRecoveryPolicy/>
>                         </subscriptionRecoveryPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
> 
>         <!-- Use the following to configure how ActiveMQ is exposed in JMX
> -->
>         <managementContext>
>             <managementContext createConnector="false"/>
>         </managementContext>
> 
> 
> 
>         <persistenceAdapter>
>             <amqPersistenceAdapter syncOnWrite="false"
> directory="${activemq.base}/data" maxFileLength="20 mb"/>
>         </persistenceAdapter>
> 
>         <!-- Use the following if you wish to configure the journal with
> JDBC -->
>         <!--
>         <persistenceAdapter>
>             <journaledJDBC dataDirectory="${activemq.base}/data"
> dataSource="#postgres-ds"/>
>         </persistenceAdapter>
>         -->
> 
>         <!-- Or if you want to use pure JDBC without a journal -->
>         <!--
>         <persistenceAdapter>
>             <jdbcPersistenceAdapter dataSource="#postgres-ds"/>
>         </persistenceAdapter>
>         -->
> 
>         <!--  The maximum about of space the broker will use before
> slowing down producers -->
>         <systemUsage>
>             <systemUsage>
>                 <memoryUsage>
>                     <memoryUsage limit="20 mb"/>
>                 </memoryUsage>
>                 <storeUsage>
>                     <storeUsage limit="1 gb" name="foo"/>
>                 </storeUsage>
>                 <tempUsage>
>                     <tempUsage limit="100 mb"/>
>                 </tempUsage>
>             </systemUsage>
>         </systemUsage>
> 
> 
>         <!-- The transport connectors ActiveMQ will listen to -->
>         <transportConnectors>
> 
>             <transportConnector name="openwire" uri="tcp://localhost:8585"
> />
> 
>             <transportConnector name="ssl" uri="ssl://localhost:8484"/>
> 
>         </transportConnectors>
> 
>     </broker>
> 
> 
>     <!-- An embedded servlet engine for serving up the Admin console -->
>     <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
>         <connectors>
>             <nioConnector port="8161"/>
>         </connectors>
> 
>         <handlers>
>             <webAppContext contextPath="/admin"
> resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
>             <webAppContext contextPath="/demo"
> resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
>             <webAppContext contextPath="/fileserver"
> resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
>         </handlers>
>     </jetty>
> 
>     <!--  This xbean configuration file supports all the standard spring
> xml configuration options -->
> 
>     <!-- Postgres DataSource Sample Setup -->
>     <!--
>     <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
>       <property name="serverName" value="localhost"/>
>       <property name="databaseName" value="activemq"/>
>       <property name="portNumber" value="0"/>
>       <property name="user" value="activemq"/>
>       <property name="password" value="activemq"/>
>       <property name="dataSourceName" value="postgres"/>
>       <property name="initialConnections" value="1"/>
>       <property name="maxConnections" value="10"/>
>     </bean>
>     -->
> 
>     <!-- MySql DataSource Sample Setup -->
>     <!--
>     <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>       <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
>       <property name="url"
> value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
>       <property name="username" value="activemq"/>
>       <property name="password" value="activemq"/>
>       <property name="maxActive" value="200"/>
>       <property name="poolPreparedStatements" value="true"/>
>     </bean>
>     -->
> 
>     <!-- Oracle DataSource Sample Setup -->
>     <!--
>     <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>       <property name="driverClassName"
> value="oracle.jdbc.driver.OracleDriver"/>
>       <property name="url"
> value="jdbc:oracle:thin:@localhost:1521:AMQDB"/>
>       <property name="username" value="scott"/>
>       <property name="password" value="tiger"/>
>       <property name="maxActive" value="200"/>
>       <property name="poolPreparedStatements" value="true"/>
>     </bean>
>     -->
> 
>     <!-- Embedded Derby DataSource Sample Setup -->
>     <!--
>     <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
>       <property name="databaseName" value="derbydb"/>
>       <property name="createDatabase" value="create"/>
>     </bean>
>     -->
> 
> </beans>
> <!-- END SNIPPET: example -->
> 
> 
> Any suggestions would be appreciated.
> 

-- 
View this message in context: http://www.nabble.com/User-Name-and-Password-Invalid-when-going-to-localhost-admin-tp18856991p18907753.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message