You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Sean K <sk...@gmail.com> on 2012/10/17 02:09:26 UTC

LDAP (OpenDS 2.2.1) configuration

Hi,
I am working with the documentation on the activemq site for
configuring the LDAP.

http://activemq.apache.org/security.html  -- almost everything is
copied verbatim except for hostnames and there were a few parameters
that were not writable by the current bean so I remove them -- for
example the writeAttributePrefix.

I am using apache activemq-5.6.0 which is running on ubuntu.

It is trying to connect to the opends 2.2.1 running on a Windows 7
machine.   I imported the ldif into the openDS through the admin
console so that these dc and ou would match.

I start up the activemq broker -- all is fine.
When I start the producer to send messages to the broker, then errors
occur (on bottom)

In the producer log, there is some indicator -- about an option key
being expected at line 40, which I dont see how.

I also attached the login.config file.

Any ideas anyone?

      <plugins>
                <jaasAuthenticationPlugin configuration="LdapConfiguration" />

                <authorizationPlugin>
                        <map>


                          <bean
xmlns="http://www.springframework.org/schema/beans"
id="lDAPAuthorizationMap"

class="org.apache.activemq.security.LDAPAuthorizationMap">

                              <property name="initialContextFactory"
value="com.sun.jndi.ldap.LdapCtxFactory"/>
                              <property name="connectionURL"
value="ldap://WSW710119:389"/>
                              <property name="authentication" value="simple"/>
                              <property name="connectionUsername"
value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
                              <property name="connectionPassword"
value="password"/>
                              <property name="connectionProtocol" value="s"/>
                              <property name="topicSearchSubtreeBool"
value="true" />


                              <property name="queueSearchSubtreeBool"
value="true"/>
                              <property name="adminBase" value="(cn=admin)"/>
                              <property name="adminAttribute" value="member"/>
                              <property name="readBase" value="(cn=read)"/>
                              <property name="readAttribute" value="member"/>
                              <property name="writeBase" value="(cn=write)"/>
                              <property name="writeAttribute" value="member"/>
                           </bean>
                        </map>
                </authorizationPlugin>


        </plugins>


And the contents of login.conf :


LdapConfiguration {

  org.apache.activemq.jaas.LDAPLoginModule required

  debug=true

  initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory

  connectionURL="ldap://WSW710119:389"

  connectionUsername="cn=mqbroker,ou=Services,dc=acme,dc=com"

  connectionPassword=password

  connectionProtocol=s

  authentication=simple

  userBase="ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com"

  userRoleName=dummyUserRoleName

  userSearchMatching="(uid={0})"

  userSearchSubtree=false

  roleBase="ou=Groups,ou=ActiveMQ,ou=systems,dc=acme,dc=com"

  roleName=cn

  roleSearchMatching="(member=uid={1})"

  roleSearchSubtree=true

};


<<<< this is the broker logs>>>>>
2012-10-16 16:57:16,098 | WARN  | Failed to add Connection
ID:centos-test1.foo.com-43128-1350431835402-1:2, reason:
java.lang.SecurityException: User name [null] or password is invalid.
| org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
ssl:///127.0.0.1:44983
2012-10-16 16:57:16,100 | WARN  | Failed to add Connection
ID:centos-test1.foo.com-43128-1350431835402-1:3, reason:
java.lang.SecurityException: User name [null] or password is invalid.
| org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
ssl:///127.0.0.1:44982
2012-10-16 16:57:16,108 | WARN  | Failed to add Connection
ID:centos-test1.foo.com-43128-1350431835402-1:1, reason:
java.lang.SecurityException: User name [null] or password is invalid.
| org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
ssl:///127.0.0.1:44981
2012-10-16 16:57:16,152 | WARN  | Transport Connection to:
tcp://127.0.0.1:44982 failed: java.io.EOFException |
org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
Transport: ssl:///127.0.0.1:44982
2012-10-16 16:57:16,171 | WARN  | Transport Connection to:
tcp://127.0.0.1:44983 failed: java.io.EOFException |
org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
Transport: ssl:///127.0.0.1:44983
2012-10-16 16:57:16,180 | WARN  | Transport Connection to:
tcp://127.0.0.1:44981 failed: java.io.EOFException |
org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
Transport: ssl:///127.0.0.1:44981
2012-10-16 16:57:16,613 | WARN  | Failed to add Connection
ID:centos-test1.foo.com-43128-1350431835402-1:4, reason:
java.lang.SecurityException: User name [null] or password is invalid.
| org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
ssl:///127.0.0.1:44984
2012-10-16 16:57:16,632 | WARN  | Transport Connection to:
tcp://127.0.0.1:44984 failed: java.io.EOFException |
org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
Transport: ssl:///127.0.0.1:44984
2012-10-16 16:57:17,585 | WARN  | Failed to add Connection
ID:centos-test1.foo.com-43128-1350431835402-1:5, reason:
java.lang.SecurityException: User name [null] or password is invalid.
| org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
ssl:///127.0.0.1:44985


<<<<this is the error that come back through the producer >>>>>>
]. Caused by: [org.quartz.JobExecutionException -
org.springframework.jms.UncategorizedJmsException: Uncategorized
exception occured during JMS processing; nested exception is
javax.jms.JMSException: User name [null] or password is invalid.]
 INFO [DefaultQuartzScheduler-camel-1_Worker-3] (JobRunShell.java:221)
- Job DEFAULT.quartz-endpoint1 threw a JobExecutionException:
org.quartz.JobExecutionException:
org.springframework.jms.UncategorizedJmsException: Uncategorized
exception occured during JMS processing; nested exception is
javax.jms.JMSException: User name [null] or password is invalid. [See
nested exception: org.springframework.jms.UncategorizedJmsException:
Uncategorized exception occured during JMS processing; nested
exception is javax.jms.JMSException: User name [null] or password is
invalid.]
        at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)
        at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: org.springframework.jms.UncategorizedJmsException:
Uncategorized exception occured during JMS processing; nested
exception is javax.jms.JMSException: User name [null] or password is
invalid.
        at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
        at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
        at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:187)
        at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:387)
        at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:341)
        at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:132)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
        at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
        at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
        at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
        at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
        at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
        at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)
        at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)
        ... 3 more
Caused by: javax.jms.JMSException: User name [null] or password is invalid.
        at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
        at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
        at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
        at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
        at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
        ... 43 more
Caused by: java.lang.SecurityException: User name [null] or password is invalid.
        at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
        at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
        at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
        at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
        at org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:91)
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.SecurityException: Configuration Error:
        Line 40: expected [option key]
        at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at javax.security.auth.login.Configuration$3.run(Configuration.java:247)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:242)
        at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
        at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
        at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:75)
        ... 15 more
Caused by: java.io.IOException: Configuration Error:
        Line 40: expected [option key]
        at com.sun.security.auth.login.ConfigFile.match(ConfigFile.java:520)
        at com.sun.security.auth.login.ConfigFile.parseLoginEntry(ConfigFile.java:406)
        at com.sun.security.auth.login.ConfigFile.readConfig(ConfigFile.java:350)
        at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:262)
        at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:202)
        at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91)
        ... 29 more

Re: LDAP (OpenDS 2.2.1) configuration

Posted by Sean K <sk...@gmail.com>.
Hi Dejan,
Thanks for the input.

This is what I did

I uninstalled the OpenDS 2.2.1 because I cant easily re-import the
LDIF if an existing OpenDS already has a root DN.

I re-installed the OpenDS  and had it import from the LDIF on the
http://activemq.apache.org/security.html, and I also changed the
import tool use dc=acme,dc=com from dc=example,dc=com

I have a separate SpringFramework ldap test client app that does a
simple test to do a LdapTemplate.lookup(String dn).

		try {
			Resource resource = new ClassPathResource("springldap.xml");
			BeanFactory factory = new XmlBeanFactory(resource);
			System.out.println(factory.toString() + "\n");

			ContactDAO ldapContact = (LDAPContactDAO)factory.getBean("ldapContact");
			String dnOpenDS = "uid=webapp,ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com";
			DirContextAdapter adapter = (DirContextAdapter)ldapContact.lookup(dnOpenDS);
			if (adapter != null){
				Attributes attrs = adapter.getAttributes();
				@SuppressWarnings("rawtypes")
				NamingEnumeration ids = attrs.getIDs();
				while (ids.hasMoreElements()) {
					String attrId = (String)ids.next();
					Attribute attr = attrs.get(attrId);
					System.out.println(attrId);
					System.out.println(attr.get());
				}
				//adapter.close();
			} else {
				System.out.println("THIS OBJECT DOES NOT EXISTS.");
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

This actually succeeds .. and returns
uid
webapp
userPassword
[B@406199
objectClass
top

But when I try to use this credentials on the producer, it still complains.

DEBUG | Setting up new connection id:
ID:WSW710119-54616-1350673109527-1:1, address: tcp://127.0.0.1:54617,
info: ConnectionInfo {commandId = 1, responseRequired = true,
connectionId = ID:WSW710119-54616-1350673109527-1:1, clientId =
ID:WSW710119-54616-1350673109527-0:1, clientIp = null, userName =
uid=webapp,ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com, password =
*****, brokerPath = null, brokerMasterConnector = false, manageable =
true, clientMaster = true, faultTolerant = false, failoverReconnect =
false}^M
DEBUG | Create the LDAP initial context.^M
DEBUG | Get the user DN.^M
DEBUG | Looking for the user in LDAP with ^M
DEBUG |   base DN: ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com^M
DEBUG |   filter:
(uid=uid=webapp,ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com)^M
 WARN | User uid=webapp,ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com
not found in LDAP.^M
 WARN | Failed to add Connection ID:WSW710119-54616-1350673109527-1:1,
reason: java.lang.SecurityException: User name
[uid=webapp,ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com] or password
is invalid.^M
DEBUG | Exception detail:^M
java.lang.SecurityException: User name
[uid=webapp,ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com] or password
is invalid.^M
        at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)^M
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)^M
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)^M
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:712)^M
        at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:80)^M
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)^M
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)^M
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:152)^M
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)^M
        at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)^M
        at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:256)^M
        at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)^M
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)^M
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)^M
        at java.lang.Thread.run(Thread.java:662)^M
Caused by: javax.security.auth.login.FailedLoginException: User
uid=webapp,ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com not found in
LDAP.^M
        at org.apache.activemq.jaas.LDAPLoginModule.authenticate(LDAPLoginModule.java:220)^M
        at org.apache.activemq.jaas.LDAPLoginModule.login(LDAPLoginModule.java:130)^M
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)^M
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)^M
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)^M
        at java.lang.reflect.Method.invoke(Method.java:597)^M
        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)^M
        at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)^M
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)^M
        at java.security.AccessController.doPrivileged(Native Method)^M
        at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)^M
        at javax.security.auth.login.LoginContext.login(LoginContext.java:579)^M
        at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)^M
        ... 14 more^M


the encrypted password via the OpenDS control panel shows the password
to be the same as for mqbroker

dn: uid=admin,ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com
objectClass: account
objectClass: simpleSecurityObject
objectClass: top
uid: admin
userPassword:: e1NTSEF9ajBOcHZlRU8wWUQ1cmdJNWtZOE94U1JpTjVLUS9rRTQ=

Still stuck

On Fri, Oct 19, 2012 at 1:59 AM, Dejan Bosanac <de...@nighttale.net> wrote:
> Seems like the credentials you're using in login.config are not
> matching your Ldap server.
>
>
> Regards
> --
> Dejan Bosanac
> ----------------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> dbosanac@redhat.com
> Twitter: @dejanb
> Blog: http://sensatic.net
> ActiveMQ in Action: http://www.manning.com/snyder/
>
>
> On Fri, Oct 19, 2012 at 1:36 AM, Sean K <sk...@gmail.com> wrote:
>> Still not resolved but I left out an important piece:
>> In the activemq.xml, I forgot to put in:
>>
>>
>>         <plugins>
>>
>>         <jaasAuthenticationPlugin configuration="LdapConfiguration" />
>>         <authorizationPlugin>
>>         etc...
>>
>> And I forgot to put the login.config into the conf directory.
>>
>> Here is the content of my login.config which is the same as what is
>> shown on the activemq security page.
>>
>> LdapConfiguration {
>>    org.apache.activemq.jaas.LDAPLoginModule required
>>        debug=true
>>        initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
>>        connectionURL="ldap://localhost:389"
>>        connectionUsername="cn=mqbroker,ou=Services,dc=acme,dc=com"
>>        connectionPassword=password
>>        connectionProtocol=s
>>        authentication=simple
>>        userBase="ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>>        userRoleName=dummyUserRoleName
>>        userSearchMatching="(uid={0})"
>>        userSearchSubtree=false
>>        roleBase="ou=Group,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>>        roleName=cn
>>        roleSearchMatching="(member:=uid={1})"
>>        roleSearchSubtree=true
>>        ;
>> };
>>
>>
>> Now I am getting an LDAP error code 49. which I am figure out.
>>
>> DEBUG | Error occured while processing sync command: ConnectionInfo
>> {commandId = 1, responseRequired = true, connectionId =
>> ID:WSW710119-64373-1350601619950-1:1, clientId =
>> ID:WSW710119-64373-1350601619950-0:1, clientIp =
>> tcp://127.0.0.1:64374, userName = cn=Directory Manager, password =
>> *****, brokerPath = null, brokerMasterConnector = false, manageable =
>> true, clientMaster = true, faultTolerant = false, failoverReconnect =
>> false}, exception: java.lang.SecurityException: User name
>> [cn=Directory Manager] or password is invalid.^M
>> java.lang.SecurityException: User name [cn=Directory Manager] or
>> password is invalid.^M
>>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)^M
>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)^M
>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)^M
>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:712)^M
>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:80)^M
>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)^M
>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)^M
>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:152)^M
>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)^M
>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)^M
>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:256)^M
>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)^M
>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)^M
>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)^M
>>         at java.lang.Thread.run(Thread.java:662)^M
>> Caused by: javax.security.auth.login.FailedLoginException: Error
>> opening LDAP connection^M
>>         at org.apache.activemq.jaas.LDAPLoginModule.authenticate(LDAPLoginModule.java:177)^M
>>         at org.apache.activemq.jaas.LDAPLoginModule.login(LDAPLoginModule.java:130)^M
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)^M
>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)^M
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)^M
>>         at java.lang.reflect.Method.invoke(Method.java:597)^M
>>         at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)^M
>>         at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)^M
>>         at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)^M
>>         at java.security.AccessController.doPrivileged(Native Method)^M
>>         at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)^M
>>         at javax.security.auth.login.LoginContext.login(LoginContext.java:579)^M
>>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)^M
>>         ... 14 more^M
>> Caused by: javax.naming.AuthenticationException: [LDAP: error code 49
>> - Invalid Credentials]^M
>>         at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3067)^M
>>         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3013)^M
>>         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2815)^M
>>         at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2729)^M
>>         at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:296)^M
>>         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)^M
>>         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)^M
>>         at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)^M
>>         at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)^M
>>         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)^M
>>         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)^M
>>         at javax.naming.InitialContext.init(InitialContext.java:223)^M
>>         at javax.naming.InitialContext.<init>(InitialContext.java:197)^M
>>         at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)^M
>>         at org.apache.activemq.jaas.LDAPLoginModule.open(LDAPLoginModule.java:437)^M
>>         at org.apache.activemq.jaas.LDAPLoginModule.authenticate(LDAPLoginModule.java:175)^M
>>         ... 26 more^M
>>
>>
>>
>> On Thu, Oct 18, 2012 at 3:48 PM, Sean K <sk...@gmail.com> wrote:
>>> And then on the broker side, here is the log that I snipped out --
>>>
>>> I turned up the logging level in the logging.properties to DEBUG from
>>> INFO level.
>>>
>>> I see the userName that I passed from my camel producer bean when I
>>> instantiate the ActiveMQConnectionFactory.
>>>
>>> I re-read the http://activemq.apache.org/security.html again.
>>>
>>> I verified that I had imported the ldif  into my opends, I changed the
>>> LDAPAuthorizationMap back to match the one on the security.html page.
>>>
>>>
>>>         <authorizationPlugin>
>>>               <map>
>>>                   <bean id="lDAPAuthorizationMap"
>>> class="org.apache.activemq.security.LDAPAuthorizationMap"
>>>                         xmlns="http://www.springframework.org/schema/beans">
>>>                       <property name="initialContextFactory"
>>> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>>>                       <property name="connectionURL"
>>> value="ldap://localhost:389"/>
>>>                       <property name="authentication" value="simple"/>
>>>                       <property name="connectionUsername"
>>> value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
>>>                       <property name="connectionPassword" value="password"/>
>>>                       <property name="connectionProtocol" value="s"/>
>>>                       <property name="topicSearchMatchingFormat"
>>>
>>> value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>                       <property name="topicSearchSubtreeBool" value="true"/>
>>>                       <property name="queueSearchMatchingFormat"
>>>
>>> value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>                       <property name="advisorySearchBase"
>>>
>>> value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>                       <property name="tempSearchBase"
>>>
>>> value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>                       <property name="queueSearchSubtreeBool" value="true"/>
>>>                       <property name="adminBase" value="(cn=admin)"/>
>>>                       <property name="adminAttribute" value="member"/>
>>>                       <property name="readBase" value="(cn=read)"/>
>>>                       <property name="readAttribute" value="member"/>
>>>                       <property name="writeBase" value="(cn=write)"/>
>>>                       <property name="writeAttribute" value="member"/>
>>>                   </bean>
>>>               </map>
>>>           </authorizationPlugin>
>>>
>>>
>>>
>>>
>>>
>>>
>>> DEBUG | Setting up new connection id:
>>> ID:WSW710119-63884-1350596295369-1:1, address: tcp://127.0.0.1:63885,
>>> info: ConnectionInfo {commandId = 1, responseRequired = true,
>>> connectionId = ID:WSW710119-63884-1350596295369-1:1, clientId =
>>> ID:WSW710119-63884-1350596295369-0:1, clientIp = null, userName =
>>> cn=Directory Manager, password = *****, brokerPath = null,
>>> brokerMasterConnector = false, manageable = true, clientMaster = true,
>>> faultTolerant = false, failoverReconnect = false}
>>>  WARN | Failed to add Connection ID:WSW710119-63884-1350596295369-1:1,
>>> reason: java.lang.SecurityException: User is not authenticated.
>>> DEBUG | Exception detail:
>>> java.lang.SecurityException: User is not authenticated.
>>>         at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
>>>         at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
>>>         at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
>>>         at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
>>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
>>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
>>>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>>         at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>>         at java.lang.Thread.run(Thread.java:662)
>>> DEBUG | Error occured while processing sync command: ConnectionInfo
>>> {commandId = 1, responseRequired = true, connectionId =
>>> ID:WSW710119-63884-1350596295369-1:1, clientId =
>>> ID:WSW710119-63884-1350596295369-0:1, clientIp =
>>> tcp://127.0.0.1:63885, userName = cn=Directory Manager, password =
>>> *****, brokerPath = null, brokerMasterConnector = false, manageable =
>>> true, clientMaster = true, faultTolerant = false, failoverReconnect =
>>> false}, exception: java.lang.SecurityException: User is not
>>> authenticated.
>>> java.lang.SecurityException: User is not authenticated.
>>>         at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
>>>         at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
>>>         at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
>>>         at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
>>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
>>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
>>>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>>         at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>>         at java.lang.Thread.run(Thread.java:662)
>>> DEBUG | Transport Connection to: tcp://127.0.0.1:63885 failed:
>>> java.io.EOFException
>>> java.io.EOFException
>>>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
>>>         at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
>>>         at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:229)
>>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:221)
>>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>>         at java.lang.Thread.run(Thread.java:662)
>>>
>>>
>>>
>>> So then I switched to activemq 5.7.0.
>>>
>>> I used this current activemq.xml -- this is the plugins section.
>>>
>>>       <plugins>
>>>
>>>         <authorizationPlugin>
>>>               <map>
>>>                   <bean id="lDAPAuthorizationMap"
>>> class="org.apache.activemq.security.LDAPAuthorizationMap"
>>>                         xmlns="http://www.springframework.org/schema/beans">
>>>                       <property name="initialContextFactory"
>>> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>>>                       <property name="connectionURL"
>>> value="ldap://localhost:389"/>
>>>                       <property name="authentication" value="simple"/>
>>>                       <property name="connectionUsername"
>>> value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
>>>                       <property name="connectionPassword" value="password"/>
>>>                       <property name="connectionProtocol" value="s"/>
>>>                       <property name="topicSearchMatchingFormat"
>>>
>>> value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>                       <property name="topicSearchSubtreeBool" value="true"/>
>>>                       <property name="queueSearchMatchingFormat"
>>>
>>> value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>                         <property name="queueSearchSubtreeBool" value="true" />
>>>                       <property name="advisorySearchBase"
>>>
>>> value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>                       <property name="tempSearchBase"
>>>
>>> value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>                       <property name="adminBase" value="(cn=admin)"/>
>>>                       <property name="adminAttribute" value="member"/>
>>>                       <property name="readBase" value="(cn=read)"/>
>>>                       <property name="readAttribute" value="member"/>
>>>                       <property name="writeBase" value="(cn=write)"/>
>>>                       <property name="writeAttribute" value="member"/>
>>>                   </bean>
>>>               </map>
>>>           </authorizationPlugin>
>>>
>>>         </plugins>
>>>
>>> I noticed a few documentation inconsistencies.
>>>
>>> topicSearchMatching is not writable -- so I assumed
>>> topicSearchMatchingFormat is correct -- I forgot where i saw that one.
>>>
>>> queueSearchMatchingFormat has the same issue.
>>>
>>> Then on the producer side, I tried using the entries that were created
>>> by the ldif.  So I tried userName being "cn=admin" or "admin", or
>>> "cn=Directory Manager" -- all of them results in the user not being
>>> authenticated.
>>>
>>> Any ideas?
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Oct 18, 2012 at 2:27 PM, Sean K <sk...@gmail.com> wrote:
>>>> I havent tried that yet.
>>>>
>>>> But I think I am getting closer.
>>>>
>>>> I took a vanilla activemq 5.6.0 bundle zip and expanded it on a
>>>> windows7 machine, and added only this section for the LDAP.
>>>>
>>>> The OpenDS 2.2.1 is also running on the same machine.
>>>>
>>>>
>>>> Now, when I made my non-ssl producer connect to the broker, it says
>>>> that the user is not authenticated.
>>>>
>>>> My producer is a simple camel producer basically driven from this xml.
>>>> Then I run the producer using : mvn camel:run
>>>>
>>>> I think I need to configure the OpenDS more to handle ActiveMQ but I
>>>> am not sure how.   Any ideas?
>>>>
>>>>
>>>>
>>>>         <authorizationPlugin>
>>>>               <map>
>>>>                   <bean id="lDAPAuthorizationMap"
>>>> class="org.apache.activemq.security.LDAPAuthorizationMap"
>>>>                         xmlns="http://www.springframework.org/schema/beans">
>>>>                       <property name="initialContextFactory"
>>>> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>>>>                       <property name="connectionURL"
>>>> value="ldap://localhost:389"/>
>>>>                       <property name="authentication" value="simple"/>
>>>>                       <property name="connectionUsername"
>>>> value="cn=Directory Manager"/>
>>>>                       <property name="connectionPassword" value="password"/>
>>>>                       <property name="connectionProtocol" value="s"/>
>>>>                       <property name="topicSearchMatchingFormat"
>>>>
>>>> value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>>                       <property name="topicSearchSubtreeBool" value="true"/>
>>>>                       <property name="queueSearchMatchingFormat"
>>>>
>>>> value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>>                       <property name="advisorySearchBase"
>>>>
>>>> value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>>                       <property name="tempSearchBase"
>>>>
>>>> value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>>                       <property name="queueSearchSubtreeBool" value="true"/>
>>>>                       <property name="adminBase"
>>>> value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
>>>>                       <property name="adminAttribute" value="member"/>
>>>>                       <property name="readBase"
>>>> value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
>>>>                       <property name="readAttribute" value="member"/>
>>>>                       <property name="writeBase"
>>>> value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
>>>>                       <property name="writeAttribute" value="member"/>
>>>>                   </bean>
>>>>               </map>
>>>>           </authorizationPlugin>
>>>>
>>>>
>>>>
>>>>
>>>>  INFO [DefaultQuartzScheduler-camel-1_Worker-1] (JobRunShell.java:221)
>>>> - Job DEFAULT.quartz-endpoint1 threw a JobExecutionException:
>>>> org.quartz.JobExecutionException:
>>>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>>>> exception occured during JMS processing; nested exception is
>>>> javax.jms.JMSException: User is not authenticated. [See nested
>>>> exception: org.springframework.jms.UncategorizedJmsException:
>>>> Uncategorized exception occured during JMS processing; nested
>>>> exception is javax.jms.JMSException: User is not authenticated.]
>>>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)
>>>>         at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)
>>>>         at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
>>>>         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
>>>> Caused by: org.springframework.jms.UncategorizedJmsException:
>>>> Uncategorized exception occured during JMS processing; nested
>>>> exception is javax.jms.JMSException: User is not authenticated.
>>>>         at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
>>>>         at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
>>>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
>>>>         at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:187)
>>>>         at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:387)
>>>>         at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:341)
>>>>         at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:132)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
>>>>         at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
>>>>         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>         at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
>>>>         at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
>>>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>         at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
>>>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>>>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>         at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
>>>>         at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
>>>>         at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
>>>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)
>>>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)
>>>>         ... 3 more
>>>> Caused by: javax.jms.JMSException: User is not authenticated.
>>>>         at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
>>>>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
>>>>         at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
>>>>         at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
>>>>         at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
>>>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
>>>>         ... 43 more
>>>> Caused by: java.lang.SecurityException: User is not authenticated.
>>>>         at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
>>>>         at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
>>>>         at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
>>>>         at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>>>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
>>>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
>>>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
>>>>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
>>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>>>         at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
>>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>>>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>>>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>>>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>>>         at java.lang.Thread.run(Thread.java:662)
>>>>
>>>>
>>>>
>>>> <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-3.0.xsd
>>>>         http://camel.apache.org/schema/spring
>>>> http://camel.apache.org/schema/spring/camel-spring.xsd">
>>>>
>>>>         <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>>>>                 <property name="connectionFactory">
>>>>                 <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>>>>                         <property name="brokerURL"
>>>> value="tcp://localhost:61616" />
>>>>                         <property name="userName"  value="cn=Directory
>>>> Manager" />
>>>>                         <property name="password" value="password" />
>>>>                 </bean>
>>>>                 </property>
>>>>         </bean>
>>>>
>>>>         <bean id="myUriMaker" class="com.foo.camel.jms.QueueUriMaker"/>
>>>>
>>>>         <bean id="myRouter" class="com.foo.camel.jms.MyProducer">
>>>>
>>>>                 <property name="brokerName" ref="brokerNameLookup" />
>>>>                 <property name="producerName" ref="producerNameLookup" />
>>>>                 <property name="postLogger" ref="producerLogger" />
>>>>
>>>>                 <property name="uri" value="jms:queue:prescriptions" />
>>>>                 <property name="quartz"
>>>> value="quartz://com.foo.camel.quartz.producer/MyQuartz" />
>>>>                 <property name="repeatInterval" value="1000" />
>>>>                 <property name="repeatCount" value="0" />
>>>>                 <property name="fireNow" value="true" />
>>>>         </bean>
>>>>         <bean id="downloadLogger" class="com.foo.camel.jms.DownloadLogger"/>
>>>>         <bean id="producerLogger" class="com.foo.camel.jms.ProducerLogger"/>
>>>>         <bean id="brokerNameLookup" class="com.foo.camel.jms.BrokerNameLookup"/>
>>>>         <bean id="producerNameLookup"
>>>> class="com.foo.camel.jms.ProducerNameLookup"/>
>>>>         <bean id="consumerNameLookup"
>>>> class="com.foo.camel.jms.ConsumerNameLookup"/>
>>>>
>>>>         <camelContext xmlns="http://camel.apache.org/schema/spring">
>>>>                 <routeBuilder ref="myRouter"/>
>>>>         </camelContext>
>>>>
>>>>
>>>>         <!--
>>>>           <camelContext xmlns="http://camel.apache.org/schema/spring">
>>>>     <route>
>>>>       <from uri="file:src/data?noop=true"/>
>>>>       <process ref="downloadLogger"/>
>>>>       <to uri="jms:queue:incomingOrders"/>
>>>>       <process ref="producerLogger"/>
>>>>     </route>
>>>>   </camelContext>
>>>>          -->
>>>>
>>>>          <!--
>>>>
>>>>           <camelContext xmlns="http://camel.apache.org/schema/spring">
>>>>      <packageScan>
>>>>     <package>com.foo.camel.jms.routes</package>
>>>>     <excludes>**.*Test*</excludes>
>>>>     <includes>**.*</includes>
>>>>   </packageScan>
>>>>   </camelContext>
>>>>           -->
>>>>
>>>> </beans>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Oct 17, 2012 at 9:18 PM, Claus Ibsen <cl...@gmail.com> wrote:
>>>>> Hi
>>>>>
>>>>> Have you tried with the ActiveMQ 5.7.0 release?
>>>>>
>>>>>
>>>>> On Wed, Oct 17, 2012 at 2:09 AM, Sean K <sk...@gmail.com> wrote:
>>>>>> Hi,
>>>>>> I am working with the documentation on the activemq site for
>>>>>> configuring the LDAP.
>>>>>>
>>>>>> http://activemq.apache.org/security.html  -- almost everything is
>>>>>> copied verbatim except for hostnames and there were a few parameters
>>>>>> that were not writable by the current bean so I remove them -- for
>>>>>> example the writeAttributePrefix.
>>>>>>
>>>>>> I am using apache activemq-5.6.0 which is running on ubuntu.
>>>>>>
>>>>>> It is trying to connect to the opends 2.2.1 running on a Windows 7
>>>>>> machine.   I imported the ldif into the openDS through the admin
>>>>>> console so that these dc and ou would match.
>>>>>>
>>>>>> I start up the activemq broker -- all is fine.
>>>>>> When I start the producer to send messages to the broker, then errors
>>>>>> occur (on bottom)
>>>>>>
>>>>>> In the producer log, there is some indicator -- about an option key
>>>>>> being expected at line 40, which I dont see how.
>>>>>>
>>>>>> I also attached the login.config file.
>>>>>>
>>>>>> Any ideas anyone?
>>>>>>
>>>>>>       <plugins>
>>>>>>                 <jaasAuthenticationPlugin configuration="LdapConfiguration" />
>>>>>>
>>>>>>                 <authorizationPlugin>
>>>>>>                         <map>
>>>>>>
>>>>>>
>>>>>>                           <bean
>>>>>> xmlns="http://www.springframework.org/schema/beans"
>>>>>> id="lDAPAuthorizationMap"
>>>>>>
>>>>>> class="org.apache.activemq.security.LDAPAuthorizationMap">
>>>>>>
>>>>>>                               <property name="initialContextFactory"
>>>>>> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>>>>>>                               <property name="connectionURL"
>>>>>> value="ldap://WSW710119:389"/>
>>>>>>                               <property name="authentication" value="simple"/>
>>>>>>                               <property name="connectionUsername"
>>>>>> value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
>>>>>>                               <property name="connectionPassword"
>>>>>> value="password"/>
>>>>>>                               <property name="connectionProtocol" value="s"/>
>>>>>>                               <property name="topicSearchSubtreeBool"
>>>>>> value="true" />
>>>>>>
>>>>>>
>>>>>>                               <property name="queueSearchSubtreeBool"
>>>>>> value="true"/>
>>>>>>                               <property name="adminBase" value="(cn=admin)"/>
>>>>>>                               <property name="adminAttribute" value="member"/>
>>>>>>                               <property name="readBase" value="(cn=read)"/>
>>>>>>                               <property name="readAttribute" value="member"/>
>>>>>>                               <property name="writeBase" value="(cn=write)"/>
>>>>>>                               <property name="writeAttribute" value="member"/>
>>>>>>                            </bean>
>>>>>>                         </map>
>>>>>>                 </authorizationPlugin>
>>>>>>
>>>>>>
>>>>>>         </plugins>
>>>>>>
>>>>>>
>>>>>> And the contents of login.conf :
>>>>>>
>>>>>>
>>>>>> LdapConfiguration {
>>>>>>
>>>>>>   org.apache.activemq.jaas.LDAPLoginModule required
>>>>>>
>>>>>>   debug=true
>>>>>>
>>>>>>   initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
>>>>>>
>>>>>>   connectionURL="ldap://WSW710119:389"
>>>>>>
>>>>>>   connectionUsername="cn=mqbroker,ou=Services,dc=acme,dc=com"
>>>>>>
>>>>>>   connectionPassword=password
>>>>>>
>>>>>>   connectionProtocol=s
>>>>>>
>>>>>>   authentication=simple
>>>>>>
>>>>>>   userBase="ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>>>>>>
>>>>>>   userRoleName=dummyUserRoleName
>>>>>>
>>>>>>   userSearchMatching="(uid={0})"
>>>>>>
>>>>>>   userSearchSubtree=false
>>>>>>
>>>>>>   roleBase="ou=Groups,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>>>>>>
>>>>>>   roleName=cn
>>>>>>
>>>>>>   roleSearchMatching="(member=uid={1})"
>>>>>>
>>>>>>   roleSearchSubtree=true
>>>>>>
>>>>>> };
>>>>>>
>>>>>>
>>>>>> <<<< this is the broker logs>>>>>
>>>>>> 2012-10-16 16:57:16,098 | WARN  | Failed to add Connection
>>>>>> ID:centos-test1.foo.com-43128-1350431835402-1:2, reason:
>>>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>>>> ssl:///127.0.0.1:44983
>>>>>> 2012-10-16 16:57:16,100 | WARN  | Failed to add Connection
>>>>>> ID:centos-test1.foo.com-43128-1350431835402-1:3, reason:
>>>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>>>> ssl:///127.0.0.1:44982
>>>>>> 2012-10-16 16:57:16,108 | WARN  | Failed to add Connection
>>>>>> ID:centos-test1.foo.com-43128-1350431835402-1:1, reason:
>>>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>>>> ssl:///127.0.0.1:44981
>>>>>> 2012-10-16 16:57:16,152 | WARN  | Transport Connection to:
>>>>>> tcp://127.0.0.1:44982 failed: java.io.EOFException |
>>>>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>>>>> Transport: ssl:///127.0.0.1:44982
>>>>>> 2012-10-16 16:57:16,171 | WARN  | Transport Connection to:
>>>>>> tcp://127.0.0.1:44983 failed: java.io.EOFException |
>>>>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>>>>> Transport: ssl:///127.0.0.1:44983
>>>>>> 2012-10-16 16:57:16,180 | WARN  | Transport Connection to:
>>>>>> tcp://127.0.0.1:44981 failed: java.io.EOFException |
>>>>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>>>>> Transport: ssl:///127.0.0.1:44981
>>>>>> 2012-10-16 16:57:16,613 | WARN  | Failed to add Connection
>>>>>> ID:centos-test1.foo.com-43128-1350431835402-1:4, reason:
>>>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>>>> ssl:///127.0.0.1:44984
>>>>>> 2012-10-16 16:57:16,632 | WARN  | Transport Connection to:
>>>>>> tcp://127.0.0.1:44984 failed: java.io.EOFException |
>>>>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>>>>> Transport: ssl:///127.0.0.1:44984
>>>>>> 2012-10-16 16:57:17,585 | WARN  | Failed to add Connection
>>>>>> ID:centos-test1.foo.com-43128-1350431835402-1:5, reason:
>>>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>>>> ssl:///127.0.0.1:44985
>>>>>>
>>>>>>
>>>>>> <<<<this is the error that come back through the producer >>>>>>
>>>>>> ]. Caused by: [org.quartz.JobExecutionException -
>>>>>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>>>>>> exception occured during JMS processing; nested exception is
>>>>>> javax.jms.JMSException: User name [null] or password is invalid.]
>>>>>>  INFO [DefaultQuartzScheduler-camel-1_Worker-3] (JobRunShell.java:221)
>>>>>> - Job DEFAULT.quartz-endpoint1 threw a JobExecutionException:
>>>>>> org.quartz.JobExecutionException:
>>>>>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>>>>>> exception occured during JMS processing; nested exception is
>>>>>> javax.jms.JMSException: User name [null] or password is invalid. [See
>>>>>> nested exception: org.springframework.jms.UncategorizedJmsException:
>>>>>> Uncategorized exception occured during JMS processing; nested
>>>>>> exception is javax.jms.JMSException: User name [null] or password is
>>>>>> invalid.]
>>>>>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)
>>>>>>         at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)
>>>>>>         at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
>>>>>>         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
>>>>>> Caused by: org.springframework.jms.UncategorizedJmsException:
>>>>>> Uncategorized exception occured during JMS processing; nested
>>>>>> exception is javax.jms.JMSException: User name [null] or password is
>>>>>> invalid.
>>>>>>         at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
>>>>>>         at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
>>>>>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
>>>>>>         at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:187)
>>>>>>         at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:387)
>>>>>>         at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:341)
>>>>>>         at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:132)
>>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>>         at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
>>>>>>         at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
>>>>>>         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
>>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>>>         at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
>>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>>         at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
>>>>>>         at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
>>>>>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>>>         at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
>>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
>>>>>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>>>>>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>>>         at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
>>>>>>         at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
>>>>>>         at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
>>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)
>>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
>>>>>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)
>>>>>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)
>>>>>>         ... 3 more
>>>>>> Caused by: javax.jms.JMSException: User name [null] or password is invalid.
>>>>>>         at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
>>>>>>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
>>>>>>         at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
>>>>>>         at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
>>>>>>         at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
>>>>>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
>>>>>>         ... 43 more
>>>>>> Caused by: java.lang.SecurityException: User name [null] or password is invalid.
>>>>>>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)
>>>>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>>>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>>>>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>>>>>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>>>>>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>>>>>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>>>>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>>>>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>>>>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>>>>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>>>>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>>>>>         at org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:91)
>>>>>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>>>>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>>>>>         at java.lang.Thread.run(Thread.java:662)
>>>>>> Caused by: java.lang.SecurityException: Configuration Error:
>>>>>>         Line 40: expected [option key]
>>>>>>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)
>>>>>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>>>>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>>>>>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>>>>>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>>>>         at java.lang.Class.newInstance0(Class.java:355)
>>>>>>         at java.lang.Class.newInstance(Class.java:308)
>>>>>>         at javax.security.auth.login.Configuration$3.run(Configuration.java:247)
>>>>>>         at java.security.AccessController.doPrivileged(Native Method)
>>>>>>         at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:242)
>>>>>>         at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
>>>>>>         at java.security.AccessController.doPrivileged(Native Method)
>>>>>>         at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
>>>>>>         at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
>>>>>>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:75)
>>>>>>         ... 15 more
>>>>>> Caused by: java.io.IOException: Configuration Error:
>>>>>>         Line 40: expected [option key]
>>>>>>         at com.sun.security.auth.login.ConfigFile.match(ConfigFile.java:520)
>>>>>>         at com.sun.security.auth.login.ConfigFile.parseLoginEntry(ConfigFile.java:406)
>>>>>>         at com.sun.security.auth.login.ConfigFile.readConfig(ConfigFile.java:350)
>>>>>>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:262)
>>>>>>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:202)
>>>>>>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91)
>>>>>>         ... 29 more
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Claus Ibsen
>>>>> -----------------
>>>>> Red Hat, Inc.
>>>>> FuseSource is now part of Red Hat
>>>>> Email: cibsen@redhat.com
>>>>> Web: http://fusesource.com
>>>>> Twitter: davsclaus
>>>>> Blog: http://davsclaus.com
>>>>> Author of Camel in Action: http://www.manning.com/ibsen

Re: LDAP (OpenDS 2.2.1) configuration

Posted by Dejan Bosanac <de...@nighttale.net>.
Seems like the credentials you're using in login.config are not
matching your Ldap server.


Regards
--
Dejan Bosanac
----------------------
Red Hat, Inc.
FuseSource is now part of Red Hat
dbosanac@redhat.com
Twitter: @dejanb
Blog: http://sensatic.net
ActiveMQ in Action: http://www.manning.com/snyder/


On Fri, Oct 19, 2012 at 1:36 AM, Sean K <sk...@gmail.com> wrote:
> Still not resolved but I left out an important piece:
> In the activemq.xml, I forgot to put in:
>
>
>         <plugins>
>
>         <jaasAuthenticationPlugin configuration="LdapConfiguration" />
>         <authorizationPlugin>
>         etc...
>
> And I forgot to put the login.config into the conf directory.
>
> Here is the content of my login.config which is the same as what is
> shown on the activemq security page.
>
> LdapConfiguration {
>    org.apache.activemq.jaas.LDAPLoginModule required
>        debug=true
>        initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
>        connectionURL="ldap://localhost:389"
>        connectionUsername="cn=mqbroker,ou=Services,dc=acme,dc=com"
>        connectionPassword=password
>        connectionProtocol=s
>        authentication=simple
>        userBase="ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>        userRoleName=dummyUserRoleName
>        userSearchMatching="(uid={0})"
>        userSearchSubtree=false
>        roleBase="ou=Group,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>        roleName=cn
>        roleSearchMatching="(member:=uid={1})"
>        roleSearchSubtree=true
>        ;
> };
>
>
> Now I am getting an LDAP error code 49. which I am figure out.
>
> DEBUG | Error occured while processing sync command: ConnectionInfo
> {commandId = 1, responseRequired = true, connectionId =
> ID:WSW710119-64373-1350601619950-1:1, clientId =
> ID:WSW710119-64373-1350601619950-0:1, clientIp =
> tcp://127.0.0.1:64374, userName = cn=Directory Manager, password =
> *****, brokerPath = null, brokerMasterConnector = false, manageable =
> true, clientMaster = true, faultTolerant = false, failoverReconnect =
> false}, exception: java.lang.SecurityException: User name
> [cn=Directory Manager] or password is invalid.^M
> java.lang.SecurityException: User name [cn=Directory Manager] or
> password is invalid.^M
>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)^M
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)^M
>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)^M
>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:712)^M
>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:80)^M
>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)^M
>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)^M
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:152)^M
>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)^M
>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)^M
>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:256)^M
>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)^M
>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)^M
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)^M
>         at java.lang.Thread.run(Thread.java:662)^M
> Caused by: javax.security.auth.login.FailedLoginException: Error
> opening LDAP connection^M
>         at org.apache.activemq.jaas.LDAPLoginModule.authenticate(LDAPLoginModule.java:177)^M
>         at org.apache.activemq.jaas.LDAPLoginModule.login(LDAPLoginModule.java:130)^M
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)^M
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)^M
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)^M
>         at java.lang.reflect.Method.invoke(Method.java:597)^M
>         at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)^M
>         at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)^M
>         at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)^M
>         at java.security.AccessController.doPrivileged(Native Method)^M
>         at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)^M
>         at javax.security.auth.login.LoginContext.login(LoginContext.java:579)^M
>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)^M
>         ... 14 more^M
> Caused by: javax.naming.AuthenticationException: [LDAP: error code 49
> - Invalid Credentials]^M
>         at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3067)^M
>         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3013)^M
>         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2815)^M
>         at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2729)^M
>         at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:296)^M
>         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)^M
>         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)^M
>         at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)^M
>         at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)^M
>         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)^M
>         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)^M
>         at javax.naming.InitialContext.init(InitialContext.java:223)^M
>         at javax.naming.InitialContext.<init>(InitialContext.java:197)^M
>         at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)^M
>         at org.apache.activemq.jaas.LDAPLoginModule.open(LDAPLoginModule.java:437)^M
>         at org.apache.activemq.jaas.LDAPLoginModule.authenticate(LDAPLoginModule.java:175)^M
>         ... 26 more^M
>
>
>
> On Thu, Oct 18, 2012 at 3:48 PM, Sean K <sk...@gmail.com> wrote:
>> And then on the broker side, here is the log that I snipped out --
>>
>> I turned up the logging level in the logging.properties to DEBUG from
>> INFO level.
>>
>> I see the userName that I passed from my camel producer bean when I
>> instantiate the ActiveMQConnectionFactory.
>>
>> I re-read the http://activemq.apache.org/security.html again.
>>
>> I verified that I had imported the ldif  into my opends, I changed the
>> LDAPAuthorizationMap back to match the one on the security.html page.
>>
>>
>>         <authorizationPlugin>
>>               <map>
>>                   <bean id="lDAPAuthorizationMap"
>> class="org.apache.activemq.security.LDAPAuthorizationMap"
>>                         xmlns="http://www.springframework.org/schema/beans">
>>                       <property name="initialContextFactory"
>> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>>                       <property name="connectionURL"
>> value="ldap://localhost:389"/>
>>                       <property name="authentication" value="simple"/>
>>                       <property name="connectionUsername"
>> value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
>>                       <property name="connectionPassword" value="password"/>
>>                       <property name="connectionProtocol" value="s"/>
>>                       <property name="topicSearchMatchingFormat"
>>
>> value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>                       <property name="topicSearchSubtreeBool" value="true"/>
>>                       <property name="queueSearchMatchingFormat"
>>
>> value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
>>                       <property name="advisorySearchBase"
>>
>> value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>                       <property name="tempSearchBase"
>>
>> value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>                       <property name="queueSearchSubtreeBool" value="true"/>
>>                       <property name="adminBase" value="(cn=admin)"/>
>>                       <property name="adminAttribute" value="member"/>
>>                       <property name="readBase" value="(cn=read)"/>
>>                       <property name="readAttribute" value="member"/>
>>                       <property name="writeBase" value="(cn=write)"/>
>>                       <property name="writeAttribute" value="member"/>
>>                   </bean>
>>               </map>
>>           </authorizationPlugin>
>>
>>
>>
>>
>>
>>
>> DEBUG | Setting up new connection id:
>> ID:WSW710119-63884-1350596295369-1:1, address: tcp://127.0.0.1:63885,
>> info: ConnectionInfo {commandId = 1, responseRequired = true,
>> connectionId = ID:WSW710119-63884-1350596295369-1:1, clientId =
>> ID:WSW710119-63884-1350596295369-0:1, clientIp = null, userName =
>> cn=Directory Manager, password = *****, brokerPath = null,
>> brokerMasterConnector = false, manageable = true, clientMaster = true,
>> faultTolerant = false, failoverReconnect = false}
>>  WARN | Failed to add Connection ID:WSW710119-63884-1350596295369-1:1,
>> reason: java.lang.SecurityException: User is not authenticated.
>> DEBUG | Exception detail:
>> java.lang.SecurityException: User is not authenticated.
>>         at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
>>         at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
>>         at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
>>         at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
>>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>         at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>         at java.lang.Thread.run(Thread.java:662)
>> DEBUG | Error occured while processing sync command: ConnectionInfo
>> {commandId = 1, responseRequired = true, connectionId =
>> ID:WSW710119-63884-1350596295369-1:1, clientId =
>> ID:WSW710119-63884-1350596295369-0:1, clientIp =
>> tcp://127.0.0.1:63885, userName = cn=Directory Manager, password =
>> *****, brokerPath = null, brokerMasterConnector = false, manageable =
>> true, clientMaster = true, faultTolerant = false, failoverReconnect =
>> false}, exception: java.lang.SecurityException: User is not
>> authenticated.
>> java.lang.SecurityException: User is not authenticated.
>>         at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
>>         at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
>>         at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
>>         at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
>>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>         at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>         at java.lang.Thread.run(Thread.java:662)
>> DEBUG | Transport Connection to: tcp://127.0.0.1:63885 failed:
>> java.io.EOFException
>> java.io.EOFException
>>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
>>         at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
>>         at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:229)
>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:221)
>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>         at java.lang.Thread.run(Thread.java:662)
>>
>>
>>
>> So then I switched to activemq 5.7.0.
>>
>> I used this current activemq.xml -- this is the plugins section.
>>
>>       <plugins>
>>
>>         <authorizationPlugin>
>>               <map>
>>                   <bean id="lDAPAuthorizationMap"
>> class="org.apache.activemq.security.LDAPAuthorizationMap"
>>                         xmlns="http://www.springframework.org/schema/beans">
>>                       <property name="initialContextFactory"
>> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>>                       <property name="connectionURL"
>> value="ldap://localhost:389"/>
>>                       <property name="authentication" value="simple"/>
>>                       <property name="connectionUsername"
>> value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
>>                       <property name="connectionPassword" value="password"/>
>>                       <property name="connectionProtocol" value="s"/>
>>                       <property name="topicSearchMatchingFormat"
>>
>> value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>                       <property name="topicSearchSubtreeBool" value="true"/>
>>                       <property name="queueSearchMatchingFormat"
>>
>> value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
>>                         <property name="queueSearchSubtreeBool" value="true" />
>>                       <property name="advisorySearchBase"
>>
>> value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>                       <property name="tempSearchBase"
>>
>> value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>                       <property name="adminBase" value="(cn=admin)"/>
>>                       <property name="adminAttribute" value="member"/>
>>                       <property name="readBase" value="(cn=read)"/>
>>                       <property name="readAttribute" value="member"/>
>>                       <property name="writeBase" value="(cn=write)"/>
>>                       <property name="writeAttribute" value="member"/>
>>                   </bean>
>>               </map>
>>           </authorizationPlugin>
>>
>>         </plugins>
>>
>> I noticed a few documentation inconsistencies.
>>
>> topicSearchMatching is not writable -- so I assumed
>> topicSearchMatchingFormat is correct -- I forgot where i saw that one.
>>
>> queueSearchMatchingFormat has the same issue.
>>
>> Then on the producer side, I tried using the entries that were created
>> by the ldif.  So I tried userName being "cn=admin" or "admin", or
>> "cn=Directory Manager" -- all of them results in the user not being
>> authenticated.
>>
>> Any ideas?
>>
>>
>>
>>
>>
>>
>> On Thu, Oct 18, 2012 at 2:27 PM, Sean K <sk...@gmail.com> wrote:
>>> I havent tried that yet.
>>>
>>> But I think I am getting closer.
>>>
>>> I took a vanilla activemq 5.6.0 bundle zip and expanded it on a
>>> windows7 machine, and added only this section for the LDAP.
>>>
>>> The OpenDS 2.2.1 is also running on the same machine.
>>>
>>>
>>> Now, when I made my non-ssl producer connect to the broker, it says
>>> that the user is not authenticated.
>>>
>>> My producer is a simple camel producer basically driven from this xml.
>>> Then I run the producer using : mvn camel:run
>>>
>>> I think I need to configure the OpenDS more to handle ActiveMQ but I
>>> am not sure how.   Any ideas?
>>>
>>>
>>>
>>>         <authorizationPlugin>
>>>               <map>
>>>                   <bean id="lDAPAuthorizationMap"
>>> class="org.apache.activemq.security.LDAPAuthorizationMap"
>>>                         xmlns="http://www.springframework.org/schema/beans">
>>>                       <property name="initialContextFactory"
>>> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>>>                       <property name="connectionURL"
>>> value="ldap://localhost:389"/>
>>>                       <property name="authentication" value="simple"/>
>>>                       <property name="connectionUsername"
>>> value="cn=Directory Manager"/>
>>>                       <property name="connectionPassword" value="password"/>
>>>                       <property name="connectionProtocol" value="s"/>
>>>                       <property name="topicSearchMatchingFormat"
>>>
>>> value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>                       <property name="topicSearchSubtreeBool" value="true"/>
>>>                       <property name="queueSearchMatchingFormat"
>>>
>>> value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>                       <property name="advisorySearchBase"
>>>
>>> value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>                       <property name="tempSearchBase"
>>>
>>> value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>>                       <property name="queueSearchSubtreeBool" value="true"/>
>>>                       <property name="adminBase"
>>> value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
>>>                       <property name="adminAttribute" value="member"/>
>>>                       <property name="readBase"
>>> value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
>>>                       <property name="readAttribute" value="member"/>
>>>                       <property name="writeBase"
>>> value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
>>>                       <property name="writeAttribute" value="member"/>
>>>                   </bean>
>>>               </map>
>>>           </authorizationPlugin>
>>>
>>>
>>>
>>>
>>>  INFO [DefaultQuartzScheduler-camel-1_Worker-1] (JobRunShell.java:221)
>>> - Job DEFAULT.quartz-endpoint1 threw a JobExecutionException:
>>> org.quartz.JobExecutionException:
>>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>>> exception occured during JMS processing; nested exception is
>>> javax.jms.JMSException: User is not authenticated. [See nested
>>> exception: org.springframework.jms.UncategorizedJmsException:
>>> Uncategorized exception occured during JMS processing; nested
>>> exception is javax.jms.JMSException: User is not authenticated.]
>>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)
>>>         at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)
>>>         at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
>>>         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
>>> Caused by: org.springframework.jms.UncategorizedJmsException:
>>> Uncategorized exception occured during JMS processing; nested
>>> exception is javax.jms.JMSException: User is not authenticated.
>>>         at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
>>>         at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
>>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
>>>         at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:187)
>>>         at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:387)
>>>         at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:341)
>>>         at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:132)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
>>>         at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
>>>         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>         at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
>>>         at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
>>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>         at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
>>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>         at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
>>>         at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
>>>         at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
>>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)
>>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)
>>>         ... 3 more
>>> Caused by: javax.jms.JMSException: User is not authenticated.
>>>         at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
>>>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
>>>         at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
>>>         at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
>>>         at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
>>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
>>>         ... 43 more
>>> Caused by: java.lang.SecurityException: User is not authenticated.
>>>         at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
>>>         at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
>>>         at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
>>>         at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
>>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
>>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
>>>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>>         at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>>         at java.lang.Thread.run(Thread.java:662)
>>>
>>>
>>>
>>> <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-3.0.xsd
>>>         http://camel.apache.org/schema/spring
>>> http://camel.apache.org/schema/spring/camel-spring.xsd">
>>>
>>>         <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>>>                 <property name="connectionFactory">
>>>                 <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>>>                         <property name="brokerURL"
>>> value="tcp://localhost:61616" />
>>>                         <property name="userName"  value="cn=Directory
>>> Manager" />
>>>                         <property name="password" value="password" />
>>>                 </bean>
>>>                 </property>
>>>         </bean>
>>>
>>>         <bean id="myUriMaker" class="com.foo.camel.jms.QueueUriMaker"/>
>>>
>>>         <bean id="myRouter" class="com.foo.camel.jms.MyProducer">
>>>
>>>                 <property name="brokerName" ref="brokerNameLookup" />
>>>                 <property name="producerName" ref="producerNameLookup" />
>>>                 <property name="postLogger" ref="producerLogger" />
>>>
>>>                 <property name="uri" value="jms:queue:prescriptions" />
>>>                 <property name="quartz"
>>> value="quartz://com.foo.camel.quartz.producer/MyQuartz" />
>>>                 <property name="repeatInterval" value="1000" />
>>>                 <property name="repeatCount" value="0" />
>>>                 <property name="fireNow" value="true" />
>>>         </bean>
>>>         <bean id="downloadLogger" class="com.foo.camel.jms.DownloadLogger"/>
>>>         <bean id="producerLogger" class="com.foo.camel.jms.ProducerLogger"/>
>>>         <bean id="brokerNameLookup" class="com.foo.camel.jms.BrokerNameLookup"/>
>>>         <bean id="producerNameLookup"
>>> class="com.foo.camel.jms.ProducerNameLookup"/>
>>>         <bean id="consumerNameLookup"
>>> class="com.foo.camel.jms.ConsumerNameLookup"/>
>>>
>>>         <camelContext xmlns="http://camel.apache.org/schema/spring">
>>>                 <routeBuilder ref="myRouter"/>
>>>         </camelContext>
>>>
>>>
>>>         <!--
>>>           <camelContext xmlns="http://camel.apache.org/schema/spring">
>>>     <route>
>>>       <from uri="file:src/data?noop=true"/>
>>>       <process ref="downloadLogger"/>
>>>       <to uri="jms:queue:incomingOrders"/>
>>>       <process ref="producerLogger"/>
>>>     </route>
>>>   </camelContext>
>>>          -->
>>>
>>>          <!--
>>>
>>>           <camelContext xmlns="http://camel.apache.org/schema/spring">
>>>      <packageScan>
>>>     <package>com.foo.camel.jms.routes</package>
>>>     <excludes>**.*Test*</excludes>
>>>     <includes>**.*</includes>
>>>   </packageScan>
>>>   </camelContext>
>>>           -->
>>>
>>> </beans>
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Oct 17, 2012 at 9:18 PM, Claus Ibsen <cl...@gmail.com> wrote:
>>>> Hi
>>>>
>>>> Have you tried with the ActiveMQ 5.7.0 release?
>>>>
>>>>
>>>> On Wed, Oct 17, 2012 at 2:09 AM, Sean K <sk...@gmail.com> wrote:
>>>>> Hi,
>>>>> I am working with the documentation on the activemq site for
>>>>> configuring the LDAP.
>>>>>
>>>>> http://activemq.apache.org/security.html  -- almost everything is
>>>>> copied verbatim except for hostnames and there were a few parameters
>>>>> that were not writable by the current bean so I remove them -- for
>>>>> example the writeAttributePrefix.
>>>>>
>>>>> I am using apache activemq-5.6.0 which is running on ubuntu.
>>>>>
>>>>> It is trying to connect to the opends 2.2.1 running on a Windows 7
>>>>> machine.   I imported the ldif into the openDS through the admin
>>>>> console so that these dc and ou would match.
>>>>>
>>>>> I start up the activemq broker -- all is fine.
>>>>> When I start the producer to send messages to the broker, then errors
>>>>> occur (on bottom)
>>>>>
>>>>> In the producer log, there is some indicator -- about an option key
>>>>> being expected at line 40, which I dont see how.
>>>>>
>>>>> I also attached the login.config file.
>>>>>
>>>>> Any ideas anyone?
>>>>>
>>>>>       <plugins>
>>>>>                 <jaasAuthenticationPlugin configuration="LdapConfiguration" />
>>>>>
>>>>>                 <authorizationPlugin>
>>>>>                         <map>
>>>>>
>>>>>
>>>>>                           <bean
>>>>> xmlns="http://www.springframework.org/schema/beans"
>>>>> id="lDAPAuthorizationMap"
>>>>>
>>>>> class="org.apache.activemq.security.LDAPAuthorizationMap">
>>>>>
>>>>>                               <property name="initialContextFactory"
>>>>> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>>>>>                               <property name="connectionURL"
>>>>> value="ldap://WSW710119:389"/>
>>>>>                               <property name="authentication" value="simple"/>
>>>>>                               <property name="connectionUsername"
>>>>> value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
>>>>>                               <property name="connectionPassword"
>>>>> value="password"/>
>>>>>                               <property name="connectionProtocol" value="s"/>
>>>>>                               <property name="topicSearchSubtreeBool"
>>>>> value="true" />
>>>>>
>>>>>
>>>>>                               <property name="queueSearchSubtreeBool"
>>>>> value="true"/>
>>>>>                               <property name="adminBase" value="(cn=admin)"/>
>>>>>                               <property name="adminAttribute" value="member"/>
>>>>>                               <property name="readBase" value="(cn=read)"/>
>>>>>                               <property name="readAttribute" value="member"/>
>>>>>                               <property name="writeBase" value="(cn=write)"/>
>>>>>                               <property name="writeAttribute" value="member"/>
>>>>>                            </bean>
>>>>>                         </map>
>>>>>                 </authorizationPlugin>
>>>>>
>>>>>
>>>>>         </plugins>
>>>>>
>>>>>
>>>>> And the contents of login.conf :
>>>>>
>>>>>
>>>>> LdapConfiguration {
>>>>>
>>>>>   org.apache.activemq.jaas.LDAPLoginModule required
>>>>>
>>>>>   debug=true
>>>>>
>>>>>   initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
>>>>>
>>>>>   connectionURL="ldap://WSW710119:389"
>>>>>
>>>>>   connectionUsername="cn=mqbroker,ou=Services,dc=acme,dc=com"
>>>>>
>>>>>   connectionPassword=password
>>>>>
>>>>>   connectionProtocol=s
>>>>>
>>>>>   authentication=simple
>>>>>
>>>>>   userBase="ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>>>>>
>>>>>   userRoleName=dummyUserRoleName
>>>>>
>>>>>   userSearchMatching="(uid={0})"
>>>>>
>>>>>   userSearchSubtree=false
>>>>>
>>>>>   roleBase="ou=Groups,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>>>>>
>>>>>   roleName=cn
>>>>>
>>>>>   roleSearchMatching="(member=uid={1})"
>>>>>
>>>>>   roleSearchSubtree=true
>>>>>
>>>>> };
>>>>>
>>>>>
>>>>> <<<< this is the broker logs>>>>>
>>>>> 2012-10-16 16:57:16,098 | WARN  | Failed to add Connection
>>>>> ID:centos-test1.foo.com-43128-1350431835402-1:2, reason:
>>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>>> ssl:///127.0.0.1:44983
>>>>> 2012-10-16 16:57:16,100 | WARN  | Failed to add Connection
>>>>> ID:centos-test1.foo.com-43128-1350431835402-1:3, reason:
>>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>>> ssl:///127.0.0.1:44982
>>>>> 2012-10-16 16:57:16,108 | WARN  | Failed to add Connection
>>>>> ID:centos-test1.foo.com-43128-1350431835402-1:1, reason:
>>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>>> ssl:///127.0.0.1:44981
>>>>> 2012-10-16 16:57:16,152 | WARN  | Transport Connection to:
>>>>> tcp://127.0.0.1:44982 failed: java.io.EOFException |
>>>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>>>> Transport: ssl:///127.0.0.1:44982
>>>>> 2012-10-16 16:57:16,171 | WARN  | Transport Connection to:
>>>>> tcp://127.0.0.1:44983 failed: java.io.EOFException |
>>>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>>>> Transport: ssl:///127.0.0.1:44983
>>>>> 2012-10-16 16:57:16,180 | WARN  | Transport Connection to:
>>>>> tcp://127.0.0.1:44981 failed: java.io.EOFException |
>>>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>>>> Transport: ssl:///127.0.0.1:44981
>>>>> 2012-10-16 16:57:16,613 | WARN  | Failed to add Connection
>>>>> ID:centos-test1.foo.com-43128-1350431835402-1:4, reason:
>>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>>> ssl:///127.0.0.1:44984
>>>>> 2012-10-16 16:57:16,632 | WARN  | Transport Connection to:
>>>>> tcp://127.0.0.1:44984 failed: java.io.EOFException |
>>>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>>>> Transport: ssl:///127.0.0.1:44984
>>>>> 2012-10-16 16:57:17,585 | WARN  | Failed to add Connection
>>>>> ID:centos-test1.foo.com-43128-1350431835402-1:5, reason:
>>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>>> ssl:///127.0.0.1:44985
>>>>>
>>>>>
>>>>> <<<<this is the error that come back through the producer >>>>>>
>>>>> ]. Caused by: [org.quartz.JobExecutionException -
>>>>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>>>>> exception occured during JMS processing; nested exception is
>>>>> javax.jms.JMSException: User name [null] or password is invalid.]
>>>>>  INFO [DefaultQuartzScheduler-camel-1_Worker-3] (JobRunShell.java:221)
>>>>> - Job DEFAULT.quartz-endpoint1 threw a JobExecutionException:
>>>>> org.quartz.JobExecutionException:
>>>>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>>>>> exception occured during JMS processing; nested exception is
>>>>> javax.jms.JMSException: User name [null] or password is invalid. [See
>>>>> nested exception: org.springframework.jms.UncategorizedJmsException:
>>>>> Uncategorized exception occured during JMS processing; nested
>>>>> exception is javax.jms.JMSException: User name [null] or password is
>>>>> invalid.]
>>>>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)
>>>>>         at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)
>>>>>         at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
>>>>>         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
>>>>> Caused by: org.springframework.jms.UncategorizedJmsException:
>>>>> Uncategorized exception occured during JMS processing; nested
>>>>> exception is javax.jms.JMSException: User name [null] or password is
>>>>> invalid.
>>>>>         at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
>>>>>         at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
>>>>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
>>>>>         at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:187)
>>>>>         at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:387)
>>>>>         at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:341)
>>>>>         at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:132)
>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>         at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
>>>>>         at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
>>>>>         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>>         at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>         at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
>>>>>         at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
>>>>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>>         at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
>>>>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>>>>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>>         at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
>>>>>         at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
>>>>>         at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)
>>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
>>>>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)
>>>>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)
>>>>>         ... 3 more
>>>>> Caused by: javax.jms.JMSException: User name [null] or password is invalid.
>>>>>         at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
>>>>>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
>>>>>         at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
>>>>>         at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
>>>>>         at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
>>>>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
>>>>>         ... 43 more
>>>>> Caused by: java.lang.SecurityException: User name [null] or password is invalid.
>>>>>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)
>>>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>>>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>>>>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>>>>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>>>>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>>>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>>>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>>>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>>>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>>>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>>>>         at org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:91)
>>>>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>>>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>>>>         at java.lang.Thread.run(Thread.java:662)
>>>>> Caused by: java.lang.SecurityException: Configuration Error:
>>>>>         Line 40: expected [option key]
>>>>>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)
>>>>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>>>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>>>>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>>>>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>>>         at java.lang.Class.newInstance0(Class.java:355)
>>>>>         at java.lang.Class.newInstance(Class.java:308)
>>>>>         at javax.security.auth.login.Configuration$3.run(Configuration.java:247)
>>>>>         at java.security.AccessController.doPrivileged(Native Method)
>>>>>         at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:242)
>>>>>         at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
>>>>>         at java.security.AccessController.doPrivileged(Native Method)
>>>>>         at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
>>>>>         at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
>>>>>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:75)
>>>>>         ... 15 more
>>>>> Caused by: java.io.IOException: Configuration Error:
>>>>>         Line 40: expected [option key]
>>>>>         at com.sun.security.auth.login.ConfigFile.match(ConfigFile.java:520)
>>>>>         at com.sun.security.auth.login.ConfigFile.parseLoginEntry(ConfigFile.java:406)
>>>>>         at com.sun.security.auth.login.ConfigFile.readConfig(ConfigFile.java:350)
>>>>>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:262)
>>>>>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:202)
>>>>>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91)
>>>>>         ... 29 more
>>>>
>>>>
>>>>
>>>> --
>>>> Claus Ibsen
>>>> -----------------
>>>> Red Hat, Inc.
>>>> FuseSource is now part of Red Hat
>>>> Email: cibsen@redhat.com
>>>> Web: http://fusesource.com
>>>> Twitter: davsclaus
>>>> Blog: http://davsclaus.com
>>>> Author of Camel in Action: http://www.manning.com/ibsen

Re: LDAP (OpenDS 2.2.1) configuration

Posted by Sean K <sk...@gmail.com>.
Still not resolved but I left out an important piece:
In the activemq.xml, I forgot to put in:


        <plugins>

        <jaasAuthenticationPlugin configuration="LdapConfiguration" />
        <authorizationPlugin>
        etc...

And I forgot to put the login.config into the conf directory.

Here is the content of my login.config which is the same as what is
shown on the activemq security page.

LdapConfiguration {
   org.apache.activemq.jaas.LDAPLoginModule required
       debug=true
       initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
       connectionURL="ldap://localhost:389"
       connectionUsername="cn=mqbroker,ou=Services,dc=acme,dc=com"
       connectionPassword=password
       connectionProtocol=s
       authentication=simple
       userBase="ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
       userRoleName=dummyUserRoleName
       userSearchMatching="(uid={0})"
       userSearchSubtree=false
       roleBase="ou=Group,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
       roleName=cn
       roleSearchMatching="(member:=uid={1})"
       roleSearchSubtree=true
       ;
};


Now I am getting an LDAP error code 49. which I am figure out.

DEBUG | Error occured while processing sync command: ConnectionInfo
{commandId = 1, responseRequired = true, connectionId =
ID:WSW710119-64373-1350601619950-1:1, clientId =
ID:WSW710119-64373-1350601619950-0:1, clientIp =
tcp://127.0.0.1:64374, userName = cn=Directory Manager, password =
*****, brokerPath = null, brokerMasterConnector = false, manageable =
true, clientMaster = true, faultTolerant = false, failoverReconnect =
false}, exception: java.lang.SecurityException: User name
[cn=Directory Manager] or password is invalid.^M
java.lang.SecurityException: User name [cn=Directory Manager] or
password is invalid.^M
        at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)^M
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)^M
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)^M
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:712)^M
        at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:80)^M
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)^M
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)^M
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:152)^M
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)^M
        at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)^M
        at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:256)^M
        at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)^M
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)^M
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)^M
        at java.lang.Thread.run(Thread.java:662)^M
Caused by: javax.security.auth.login.FailedLoginException: Error
opening LDAP connection^M
        at org.apache.activemq.jaas.LDAPLoginModule.authenticate(LDAPLoginModule.java:177)^M
        at org.apache.activemq.jaas.LDAPLoginModule.login(LDAPLoginModule.java:130)^M
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)^M
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)^M
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)^M
        at java.lang.reflect.Method.invoke(Method.java:597)^M
        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)^M
        at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)^M
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)^M
        at java.security.AccessController.doPrivileged(Native Method)^M
        at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)^M
        at javax.security.auth.login.LoginContext.login(LoginContext.java:579)^M
        at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:76)^M
        ... 14 more^M
Caused by: javax.naming.AuthenticationException: [LDAP: error code 49
- Invalid Credentials]^M
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3067)^M
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3013)^M
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2815)^M
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2729)^M
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:296)^M
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)^M
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)^M
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)^M
        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)^M
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)^M
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)^M
        at javax.naming.InitialContext.init(InitialContext.java:223)^M
        at javax.naming.InitialContext.<init>(InitialContext.java:197)^M
        at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)^M
        at org.apache.activemq.jaas.LDAPLoginModule.open(LDAPLoginModule.java:437)^M
        at org.apache.activemq.jaas.LDAPLoginModule.authenticate(LDAPLoginModule.java:175)^M
        ... 26 more^M



On Thu, Oct 18, 2012 at 3:48 PM, Sean K <sk...@gmail.com> wrote:
> And then on the broker side, here is the log that I snipped out --
>
> I turned up the logging level in the logging.properties to DEBUG from
> INFO level.
>
> I see the userName that I passed from my camel producer bean when I
> instantiate the ActiveMQConnectionFactory.
>
> I re-read the http://activemq.apache.org/security.html again.
>
> I verified that I had imported the ldif  into my opends, I changed the
> LDAPAuthorizationMap back to match the one on the security.html page.
>
>
>         <authorizationPlugin>
>               <map>
>                   <bean id="lDAPAuthorizationMap"
> class="org.apache.activemq.security.LDAPAuthorizationMap"
>                         xmlns="http://www.springframework.org/schema/beans">
>                       <property name="initialContextFactory"
> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>                       <property name="connectionURL"
> value="ldap://localhost:389"/>
>                       <property name="authentication" value="simple"/>
>                       <property name="connectionUsername"
> value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
>                       <property name="connectionPassword" value="password"/>
>                       <property name="connectionProtocol" value="s"/>
>                       <property name="topicSearchMatchingFormat"
>
> value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>                       <property name="topicSearchSubtreeBool" value="true"/>
>                       <property name="queueSearchMatchingFormat"
>
> value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
>                       <property name="advisorySearchBase"
>
> value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>                       <property name="tempSearchBase"
>
> value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>                       <property name="queueSearchSubtreeBool" value="true"/>
>                       <property name="adminBase" value="(cn=admin)"/>
>                       <property name="adminAttribute" value="member"/>
>                       <property name="readBase" value="(cn=read)"/>
>                       <property name="readAttribute" value="member"/>
>                       <property name="writeBase" value="(cn=write)"/>
>                       <property name="writeAttribute" value="member"/>
>                   </bean>
>               </map>
>           </authorizationPlugin>
>
>
>
>
>
>
> DEBUG | Setting up new connection id:
> ID:WSW710119-63884-1350596295369-1:1, address: tcp://127.0.0.1:63885,
> info: ConnectionInfo {commandId = 1, responseRequired = true,
> connectionId = ID:WSW710119-63884-1350596295369-1:1, clientId =
> ID:WSW710119-63884-1350596295369-0:1, clientIp = null, userName =
> cn=Directory Manager, password = *****, brokerPath = null,
> brokerMasterConnector = false, manageable = true, clientMaster = true,
> faultTolerant = false, failoverReconnect = false}
>  WARN | Failed to add Connection ID:WSW710119-63884-1350596295369-1:1,
> reason: java.lang.SecurityException: User is not authenticated.
> DEBUG | Exception detail:
> java.lang.SecurityException: User is not authenticated.
>         at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
>         at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
>         at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
>         at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>         at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>         at java.lang.Thread.run(Thread.java:662)
> DEBUG | Error occured while processing sync command: ConnectionInfo
> {commandId = 1, responseRequired = true, connectionId =
> ID:WSW710119-63884-1350596295369-1:1, clientId =
> ID:WSW710119-63884-1350596295369-0:1, clientIp =
> tcp://127.0.0.1:63885, userName = cn=Directory Manager, password =
> *****, brokerPath = null, brokerMasterConnector = false, manageable =
> true, clientMaster = true, faultTolerant = false, failoverReconnect =
> false}, exception: java.lang.SecurityException: User is not
> authenticated.
> java.lang.SecurityException: User is not authenticated.
>         at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
>         at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
>         at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
>         at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>         at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>         at java.lang.Thread.run(Thread.java:662)
> DEBUG | Transport Connection to: tcp://127.0.0.1:63885 failed:
> java.io.EOFException
> java.io.EOFException
>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
>         at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
>         at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:229)
>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:221)
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>         at java.lang.Thread.run(Thread.java:662)
>
>
>
> So then I switched to activemq 5.7.0.
>
> I used this current activemq.xml -- this is the plugins section.
>
>       <plugins>
>
>         <authorizationPlugin>
>               <map>
>                   <bean id="lDAPAuthorizationMap"
> class="org.apache.activemq.security.LDAPAuthorizationMap"
>                         xmlns="http://www.springframework.org/schema/beans">
>                       <property name="initialContextFactory"
> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>                       <property name="connectionURL"
> value="ldap://localhost:389"/>
>                       <property name="authentication" value="simple"/>
>                       <property name="connectionUsername"
> value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
>                       <property name="connectionPassword" value="password"/>
>                       <property name="connectionProtocol" value="s"/>
>                       <property name="topicSearchMatchingFormat"
>
> value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>                       <property name="topicSearchSubtreeBool" value="true"/>
>                       <property name="queueSearchMatchingFormat"
>
> value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
>                         <property name="queueSearchSubtreeBool" value="true" />
>                       <property name="advisorySearchBase"
>
> value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>                       <property name="tempSearchBase"
>
> value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>                       <property name="adminBase" value="(cn=admin)"/>
>                       <property name="adminAttribute" value="member"/>
>                       <property name="readBase" value="(cn=read)"/>
>                       <property name="readAttribute" value="member"/>
>                       <property name="writeBase" value="(cn=write)"/>
>                       <property name="writeAttribute" value="member"/>
>                   </bean>
>               </map>
>           </authorizationPlugin>
>
>         </plugins>
>
> I noticed a few documentation inconsistencies.
>
> topicSearchMatching is not writable -- so I assumed
> topicSearchMatchingFormat is correct -- I forgot where i saw that one.
>
> queueSearchMatchingFormat has the same issue.
>
> Then on the producer side, I tried using the entries that were created
> by the ldif.  So I tried userName being "cn=admin" or "admin", or
> "cn=Directory Manager" -- all of them results in the user not being
> authenticated.
>
> Any ideas?
>
>
>
>
>
>
> On Thu, Oct 18, 2012 at 2:27 PM, Sean K <sk...@gmail.com> wrote:
>> I havent tried that yet.
>>
>> But I think I am getting closer.
>>
>> I took a vanilla activemq 5.6.0 bundle zip and expanded it on a
>> windows7 machine, and added only this section for the LDAP.
>>
>> The OpenDS 2.2.1 is also running on the same machine.
>>
>>
>> Now, when I made my non-ssl producer connect to the broker, it says
>> that the user is not authenticated.
>>
>> My producer is a simple camel producer basically driven from this xml.
>> Then I run the producer using : mvn camel:run
>>
>> I think I need to configure the OpenDS more to handle ActiveMQ but I
>> am not sure how.   Any ideas?
>>
>>
>>
>>         <authorizationPlugin>
>>               <map>
>>                   <bean id="lDAPAuthorizationMap"
>> class="org.apache.activemq.security.LDAPAuthorizationMap"
>>                         xmlns="http://www.springframework.org/schema/beans">
>>                       <property name="initialContextFactory"
>> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>>                       <property name="connectionURL"
>> value="ldap://localhost:389"/>
>>                       <property name="authentication" value="simple"/>
>>                       <property name="connectionUsername"
>> value="cn=Directory Manager"/>
>>                       <property name="connectionPassword" value="password"/>
>>                       <property name="connectionProtocol" value="s"/>
>>                       <property name="topicSearchMatchingFormat"
>>
>> value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>                       <property name="topicSearchSubtreeBool" value="true"/>
>>                       <property name="queueSearchMatchingFormat"
>>
>> value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
>>                       <property name="advisorySearchBase"
>>
>> value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>                       <property name="tempSearchBase"
>>
>> value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>>                       <property name="queueSearchSubtreeBool" value="true"/>
>>                       <property name="adminBase"
>> value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
>>                       <property name="adminAttribute" value="member"/>
>>                       <property name="readBase"
>> value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
>>                       <property name="readAttribute" value="member"/>
>>                       <property name="writeBase"
>> value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
>>                       <property name="writeAttribute" value="member"/>
>>                   </bean>
>>               </map>
>>           </authorizationPlugin>
>>
>>
>>
>>
>>  INFO [DefaultQuartzScheduler-camel-1_Worker-1] (JobRunShell.java:221)
>> - Job DEFAULT.quartz-endpoint1 threw a JobExecutionException:
>> org.quartz.JobExecutionException:
>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>> exception occured during JMS processing; nested exception is
>> javax.jms.JMSException: User is not authenticated. [See nested
>> exception: org.springframework.jms.UncategorizedJmsException:
>> Uncategorized exception occured during JMS processing; nested
>> exception is javax.jms.JMSException: User is not authenticated.]
>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)
>>         at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)
>>         at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
>>         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
>> Caused by: org.springframework.jms.UncategorizedJmsException:
>> Uncategorized exception occured during JMS processing; nested
>> exception is javax.jms.JMSException: User is not authenticated.
>>         at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
>>         at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
>>         at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:187)
>>         at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:387)
>>         at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:341)
>>         at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:132)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
>>         at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
>>         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>         at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
>>         at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>         at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>         at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
>>         at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
>>         at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)
>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)
>>         ... 3 more
>> Caused by: javax.jms.JMSException: User is not authenticated.
>>         at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
>>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
>>         at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
>>         at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
>>         at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
>>         ... 43 more
>> Caused by: java.lang.SecurityException: User is not authenticated.
>>         at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
>>         at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
>>         at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
>>         at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
>>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
>>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>         at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>         at java.lang.Thread.run(Thread.java:662)
>>
>>
>>
>> <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-3.0.xsd
>>         http://camel.apache.org/schema/spring
>> http://camel.apache.org/schema/spring/camel-spring.xsd">
>>
>>         <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>>                 <property name="connectionFactory">
>>                 <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>>                         <property name="brokerURL"
>> value="tcp://localhost:61616" />
>>                         <property name="userName"  value="cn=Directory
>> Manager" />
>>                         <property name="password" value="password" />
>>                 </bean>
>>                 </property>
>>         </bean>
>>
>>         <bean id="myUriMaker" class="com.foo.camel.jms.QueueUriMaker"/>
>>
>>         <bean id="myRouter" class="com.foo.camel.jms.MyProducer">
>>
>>                 <property name="brokerName" ref="brokerNameLookup" />
>>                 <property name="producerName" ref="producerNameLookup" />
>>                 <property name="postLogger" ref="producerLogger" />
>>
>>                 <property name="uri" value="jms:queue:prescriptions" />
>>                 <property name="quartz"
>> value="quartz://com.foo.camel.quartz.producer/MyQuartz" />
>>                 <property name="repeatInterval" value="1000" />
>>                 <property name="repeatCount" value="0" />
>>                 <property name="fireNow" value="true" />
>>         </bean>
>>         <bean id="downloadLogger" class="com.foo.camel.jms.DownloadLogger"/>
>>         <bean id="producerLogger" class="com.foo.camel.jms.ProducerLogger"/>
>>         <bean id="brokerNameLookup" class="com.foo.camel.jms.BrokerNameLookup"/>
>>         <bean id="producerNameLookup"
>> class="com.foo.camel.jms.ProducerNameLookup"/>
>>         <bean id="consumerNameLookup"
>> class="com.foo.camel.jms.ConsumerNameLookup"/>
>>
>>         <camelContext xmlns="http://camel.apache.org/schema/spring">
>>                 <routeBuilder ref="myRouter"/>
>>         </camelContext>
>>
>>
>>         <!--
>>           <camelContext xmlns="http://camel.apache.org/schema/spring">
>>     <route>
>>       <from uri="file:src/data?noop=true"/>
>>       <process ref="downloadLogger"/>
>>       <to uri="jms:queue:incomingOrders"/>
>>       <process ref="producerLogger"/>
>>     </route>
>>   </camelContext>
>>          -->
>>
>>          <!--
>>
>>           <camelContext xmlns="http://camel.apache.org/schema/spring">
>>      <packageScan>
>>     <package>com.foo.camel.jms.routes</package>
>>     <excludes>**.*Test*</excludes>
>>     <includes>**.*</includes>
>>   </packageScan>
>>   </camelContext>
>>           -->
>>
>> </beans>
>>
>>
>>
>>
>>
>> On Wed, Oct 17, 2012 at 9:18 PM, Claus Ibsen <cl...@gmail.com> wrote:
>>> Hi
>>>
>>> Have you tried with the ActiveMQ 5.7.0 release?
>>>
>>>
>>> On Wed, Oct 17, 2012 at 2:09 AM, Sean K <sk...@gmail.com> wrote:
>>>> Hi,
>>>> I am working with the documentation on the activemq site for
>>>> configuring the LDAP.
>>>>
>>>> http://activemq.apache.org/security.html  -- almost everything is
>>>> copied verbatim except for hostnames and there were a few parameters
>>>> that were not writable by the current bean so I remove them -- for
>>>> example the writeAttributePrefix.
>>>>
>>>> I am using apache activemq-5.6.0 which is running on ubuntu.
>>>>
>>>> It is trying to connect to the opends 2.2.1 running on a Windows 7
>>>> machine.   I imported the ldif into the openDS through the admin
>>>> console so that these dc and ou would match.
>>>>
>>>> I start up the activemq broker -- all is fine.
>>>> When I start the producer to send messages to the broker, then errors
>>>> occur (on bottom)
>>>>
>>>> In the producer log, there is some indicator -- about an option key
>>>> being expected at line 40, which I dont see how.
>>>>
>>>> I also attached the login.config file.
>>>>
>>>> Any ideas anyone?
>>>>
>>>>       <plugins>
>>>>                 <jaasAuthenticationPlugin configuration="LdapConfiguration" />
>>>>
>>>>                 <authorizationPlugin>
>>>>                         <map>
>>>>
>>>>
>>>>                           <bean
>>>> xmlns="http://www.springframework.org/schema/beans"
>>>> id="lDAPAuthorizationMap"
>>>>
>>>> class="org.apache.activemq.security.LDAPAuthorizationMap">
>>>>
>>>>                               <property name="initialContextFactory"
>>>> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>>>>                               <property name="connectionURL"
>>>> value="ldap://WSW710119:389"/>
>>>>                               <property name="authentication" value="simple"/>
>>>>                               <property name="connectionUsername"
>>>> value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
>>>>                               <property name="connectionPassword"
>>>> value="password"/>
>>>>                               <property name="connectionProtocol" value="s"/>
>>>>                               <property name="topicSearchSubtreeBool"
>>>> value="true" />
>>>>
>>>>
>>>>                               <property name="queueSearchSubtreeBool"
>>>> value="true"/>
>>>>                               <property name="adminBase" value="(cn=admin)"/>
>>>>                               <property name="adminAttribute" value="member"/>
>>>>                               <property name="readBase" value="(cn=read)"/>
>>>>                               <property name="readAttribute" value="member"/>
>>>>                               <property name="writeBase" value="(cn=write)"/>
>>>>                               <property name="writeAttribute" value="member"/>
>>>>                            </bean>
>>>>                         </map>
>>>>                 </authorizationPlugin>
>>>>
>>>>
>>>>         </plugins>
>>>>
>>>>
>>>> And the contents of login.conf :
>>>>
>>>>
>>>> LdapConfiguration {
>>>>
>>>>   org.apache.activemq.jaas.LDAPLoginModule required
>>>>
>>>>   debug=true
>>>>
>>>>   initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
>>>>
>>>>   connectionURL="ldap://WSW710119:389"
>>>>
>>>>   connectionUsername="cn=mqbroker,ou=Services,dc=acme,dc=com"
>>>>
>>>>   connectionPassword=password
>>>>
>>>>   connectionProtocol=s
>>>>
>>>>   authentication=simple
>>>>
>>>>   userBase="ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>>>>
>>>>   userRoleName=dummyUserRoleName
>>>>
>>>>   userSearchMatching="(uid={0})"
>>>>
>>>>   userSearchSubtree=false
>>>>
>>>>   roleBase="ou=Groups,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>>>>
>>>>   roleName=cn
>>>>
>>>>   roleSearchMatching="(member=uid={1})"
>>>>
>>>>   roleSearchSubtree=true
>>>>
>>>> };
>>>>
>>>>
>>>> <<<< this is the broker logs>>>>>
>>>> 2012-10-16 16:57:16,098 | WARN  | Failed to add Connection
>>>> ID:centos-test1.foo.com-43128-1350431835402-1:2, reason:
>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>> ssl:///127.0.0.1:44983
>>>> 2012-10-16 16:57:16,100 | WARN  | Failed to add Connection
>>>> ID:centos-test1.foo.com-43128-1350431835402-1:3, reason:
>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>> ssl:///127.0.0.1:44982
>>>> 2012-10-16 16:57:16,108 | WARN  | Failed to add Connection
>>>> ID:centos-test1.foo.com-43128-1350431835402-1:1, reason:
>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>> ssl:///127.0.0.1:44981
>>>> 2012-10-16 16:57:16,152 | WARN  | Transport Connection to:
>>>> tcp://127.0.0.1:44982 failed: java.io.EOFException |
>>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>>> Transport: ssl:///127.0.0.1:44982
>>>> 2012-10-16 16:57:16,171 | WARN  | Transport Connection to:
>>>> tcp://127.0.0.1:44983 failed: java.io.EOFException |
>>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>>> Transport: ssl:///127.0.0.1:44983
>>>> 2012-10-16 16:57:16,180 | WARN  | Transport Connection to:
>>>> tcp://127.0.0.1:44981 failed: java.io.EOFException |
>>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>>> Transport: ssl:///127.0.0.1:44981
>>>> 2012-10-16 16:57:16,613 | WARN  | Failed to add Connection
>>>> ID:centos-test1.foo.com-43128-1350431835402-1:4, reason:
>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>> ssl:///127.0.0.1:44984
>>>> 2012-10-16 16:57:16,632 | WARN  | Transport Connection to:
>>>> tcp://127.0.0.1:44984 failed: java.io.EOFException |
>>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>>> Transport: ssl:///127.0.0.1:44984
>>>> 2012-10-16 16:57:17,585 | WARN  | Failed to add Connection
>>>> ID:centos-test1.foo.com-43128-1350431835402-1:5, reason:
>>>> java.lang.SecurityException: User name [null] or password is invalid.
>>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>>> ssl:///127.0.0.1:44985
>>>>
>>>>
>>>> <<<<this is the error that come back through the producer >>>>>>
>>>> ]. Caused by: [org.quartz.JobExecutionException -
>>>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>>>> exception occured during JMS processing; nested exception is
>>>> javax.jms.JMSException: User name [null] or password is invalid.]
>>>>  INFO [DefaultQuartzScheduler-camel-1_Worker-3] (JobRunShell.java:221)
>>>> - Job DEFAULT.quartz-endpoint1 threw a JobExecutionException:
>>>> org.quartz.JobExecutionException:
>>>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>>>> exception occured during JMS processing; nested exception is
>>>> javax.jms.JMSException: User name [null] or password is invalid. [See
>>>> nested exception: org.springframework.jms.UncategorizedJmsException:
>>>> Uncategorized exception occured during JMS processing; nested
>>>> exception is javax.jms.JMSException: User name [null] or password is
>>>> invalid.]
>>>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)
>>>>         at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)
>>>>         at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
>>>>         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
>>>> Caused by: org.springframework.jms.UncategorizedJmsException:
>>>> Uncategorized exception occured during JMS processing; nested
>>>> exception is javax.jms.JMSException: User name [null] or password is
>>>> invalid.
>>>>         at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
>>>>         at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
>>>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
>>>>         at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:187)
>>>>         at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:387)
>>>>         at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:341)
>>>>         at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:132)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
>>>>         at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
>>>>         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>         at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
>>>>         at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
>>>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>         at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
>>>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>>>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>         at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
>>>>         at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
>>>>         at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)
>>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
>>>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)
>>>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)
>>>>         ... 3 more
>>>> Caused by: javax.jms.JMSException: User name [null] or password is invalid.
>>>>         at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
>>>>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
>>>>         at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
>>>>         at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
>>>>         at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
>>>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
>>>>         ... 43 more
>>>> Caused by: java.lang.SecurityException: User name [null] or password is invalid.
>>>>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)
>>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>>>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>>>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>>>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>>>         at org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:91)
>>>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>>>         at java.lang.Thread.run(Thread.java:662)
>>>> Caused by: java.lang.SecurityException: Configuration Error:
>>>>         Line 40: expected [option key]
>>>>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)
>>>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>>>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>>>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>>         at java.lang.Class.newInstance0(Class.java:355)
>>>>         at java.lang.Class.newInstance(Class.java:308)
>>>>         at javax.security.auth.login.Configuration$3.run(Configuration.java:247)
>>>>         at java.security.AccessController.doPrivileged(Native Method)
>>>>         at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:242)
>>>>         at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
>>>>         at java.security.AccessController.doPrivileged(Native Method)
>>>>         at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
>>>>         at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
>>>>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:75)
>>>>         ... 15 more
>>>> Caused by: java.io.IOException: Configuration Error:
>>>>         Line 40: expected [option key]
>>>>         at com.sun.security.auth.login.ConfigFile.match(ConfigFile.java:520)
>>>>         at com.sun.security.auth.login.ConfigFile.parseLoginEntry(ConfigFile.java:406)
>>>>         at com.sun.security.auth.login.ConfigFile.readConfig(ConfigFile.java:350)
>>>>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:262)
>>>>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:202)
>>>>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91)
>>>>         ... 29 more
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> -----------------
>>> Red Hat, Inc.
>>> FuseSource is now part of Red Hat
>>> Email: cibsen@redhat.com
>>> Web: http://fusesource.com
>>> Twitter: davsclaus
>>> Blog: http://davsclaus.com
>>> Author of Camel in Action: http://www.manning.com/ibsen

Re: LDAP (OpenDS 2.2.1) configuration

Posted by Sean K <sk...@gmail.com>.
And then on the broker side, here is the log that I snipped out --

I turned up the logging level in the logging.properties to DEBUG from
INFO level.

I see the userName that I passed from my camel producer bean when I
instantiate the ActiveMQConnectionFactory.

I re-read the http://activemq.apache.org/security.html again.

I verified that I had imported the ldif  into my opends, I changed the
LDAPAuthorizationMap back to match the one on the security.html page.


        <authorizationPlugin>
              <map>
                  <bean id="lDAPAuthorizationMap"
class="org.apache.activemq.security.LDAPAuthorizationMap"
                        xmlns="http://www.springframework.org/schema/beans">
                      <property name="initialContextFactory"
value="com.sun.jndi.ldap.LdapCtxFactory"/>
                      <property name="connectionURL"
value="ldap://localhost:389"/>
                      <property name="authentication" value="simple"/>
                      <property name="connectionUsername"
value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
                      <property name="connectionPassword" value="password"/>
                      <property name="connectionProtocol" value="s"/>
                      <property name="topicSearchMatchingFormat"

value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
                      <property name="topicSearchSubtreeBool" value="true"/>
                      <property name="queueSearchMatchingFormat"

value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
                      <property name="advisorySearchBase"

value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
                      <property name="tempSearchBase"

value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
                      <property name="queueSearchSubtreeBool" value="true"/>
                      <property name="adminBase" value="(cn=admin)"/>
                      <property name="adminAttribute" value="member"/>
                      <property name="readBase" value="(cn=read)"/>
                      <property name="readAttribute" value="member"/>
                      <property name="writeBase" value="(cn=write)"/>
                      <property name="writeAttribute" value="member"/>
                  </bean>
              </map>
          </authorizationPlugin>






DEBUG | Setting up new connection id:
ID:WSW710119-63884-1350596295369-1:1, address: tcp://127.0.0.1:63885,
info: ConnectionInfo {commandId = 1, responseRequired = true,
connectionId = ID:WSW710119-63884-1350596295369-1:1, clientId =
ID:WSW710119-63884-1350596295369-0:1, clientIp = null, userName =
cn=Directory Manager, password = *****, brokerPath = null,
brokerMasterConnector = false, manageable = true, clientMaster = true,
faultTolerant = false, failoverReconnect = false}
 WARN | Failed to add Connection ID:WSW710119-63884-1350596295369-1:1,
reason: java.lang.SecurityException: User is not authenticated.
DEBUG | Exception detail:
java.lang.SecurityException: User is not authenticated.
        at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
        at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
        at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
        at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
        at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
        at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
        at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
        at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
        at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
        at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
        at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
        at java.lang.Thread.run(Thread.java:662)
DEBUG | Error occured while processing sync command: ConnectionInfo
{commandId = 1, responseRequired = true, connectionId =
ID:WSW710119-63884-1350596295369-1:1, clientId =
ID:WSW710119-63884-1350596295369-0:1, clientIp =
tcp://127.0.0.1:63885, userName = cn=Directory Manager, password =
*****, brokerPath = null, brokerMasterConnector = false, manageable =
true, clientMaster = true, faultTolerant = false, failoverReconnect =
false}, exception: java.lang.SecurityException: User is not
authenticated.
java.lang.SecurityException: User is not authenticated.
        at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
        at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
        at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
        at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
        at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
        at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
        at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
        at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
        at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
        at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
        at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
        at java.lang.Thread.run(Thread.java:662)
DEBUG | Transport Connection to: tcp://127.0.0.1:63885 failed:
java.io.EOFException
java.io.EOFException
        at java.io.DataInputStream.readInt(DataInputStream.java:375)
        at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
        at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:229)
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:221)
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
        at java.lang.Thread.run(Thread.java:662)



So then I switched to activemq 5.7.0.

I used this current activemq.xml -- this is the plugins section.

      <plugins>

        <authorizationPlugin>
              <map>
                  <bean id="lDAPAuthorizationMap"
class="org.apache.activemq.security.LDAPAuthorizationMap"
                        xmlns="http://www.springframework.org/schema/beans">
                      <property name="initialContextFactory"
value="com.sun.jndi.ldap.LdapCtxFactory"/>
                      <property name="connectionURL"
value="ldap://localhost:389"/>
                      <property name="authentication" value="simple"/>
                      <property name="connectionUsername"
value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
                      <property name="connectionPassword" value="password"/>
                      <property name="connectionProtocol" value="s"/>
                      <property name="topicSearchMatchingFormat"

value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
                      <property name="topicSearchSubtreeBool" value="true"/>
                      <property name="queueSearchMatchingFormat"

value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
                        <property name="queueSearchSubtreeBool" value="true" />
                      <property name="advisorySearchBase"

value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
                      <property name="tempSearchBase"

value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
                      <property name="adminBase" value="(cn=admin)"/>
                      <property name="adminAttribute" value="member"/>
                      <property name="readBase" value="(cn=read)"/>
                      <property name="readAttribute" value="member"/>
                      <property name="writeBase" value="(cn=write)"/>
                      <property name="writeAttribute" value="member"/>
                  </bean>
              </map>
          </authorizationPlugin>

        </plugins>

I noticed a few documentation inconsistencies.

topicSearchMatching is not writable -- so I assumed
topicSearchMatchingFormat is correct -- I forgot where i saw that one.

queueSearchMatchingFormat has the same issue.

Then on the producer side, I tried using the entries that were created
by the ldif.  So I tried userName being "cn=admin" or "admin", or
"cn=Directory Manager" -- all of them results in the user not being
authenticated.

Any ideas?






On Thu, Oct 18, 2012 at 2:27 PM, Sean K <sk...@gmail.com> wrote:
> I havent tried that yet.
>
> But I think I am getting closer.
>
> I took a vanilla activemq 5.6.0 bundle zip and expanded it on a
> windows7 machine, and added only this section for the LDAP.
>
> The OpenDS 2.2.1 is also running on the same machine.
>
>
> Now, when I made my non-ssl producer connect to the broker, it says
> that the user is not authenticated.
>
> My producer is a simple camel producer basically driven from this xml.
> Then I run the producer using : mvn camel:run
>
> I think I need to configure the OpenDS more to handle ActiveMQ but I
> am not sure how.   Any ideas?
>
>
>
>         <authorizationPlugin>
>               <map>
>                   <bean id="lDAPAuthorizationMap"
> class="org.apache.activemq.security.LDAPAuthorizationMap"
>                         xmlns="http://www.springframework.org/schema/beans">
>                       <property name="initialContextFactory"
> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>                       <property name="connectionURL"
> value="ldap://localhost:389"/>
>                       <property name="authentication" value="simple"/>
>                       <property name="connectionUsername"
> value="cn=Directory Manager"/>
>                       <property name="connectionPassword" value="password"/>
>                       <property name="connectionProtocol" value="s"/>
>                       <property name="topicSearchMatchingFormat"
>
> value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>                       <property name="topicSearchSubtreeBool" value="true"/>
>                       <property name="queueSearchMatchingFormat"
>
> value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
>                       <property name="advisorySearchBase"
>
> value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>                       <property name="tempSearchBase"
>
> value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
>                       <property name="queueSearchSubtreeBool" value="true"/>
>                       <property name="adminBase"
> value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
>                       <property name="adminAttribute" value="member"/>
>                       <property name="readBase"
> value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
>                       <property name="readAttribute" value="member"/>
>                       <property name="writeBase"
> value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
>                       <property name="writeAttribute" value="member"/>
>                   </bean>
>               </map>
>           </authorizationPlugin>
>
>
>
>
>  INFO [DefaultQuartzScheduler-camel-1_Worker-1] (JobRunShell.java:221)
> - Job DEFAULT.quartz-endpoint1 threw a JobExecutionException:
> org.quartz.JobExecutionException:
> org.springframework.jms.UncategorizedJmsException: Uncategorized
> exception occured during JMS processing; nested exception is
> javax.jms.JMSException: User is not authenticated. [See nested
> exception: org.springframework.jms.UncategorizedJmsException:
> Uncategorized exception occured during JMS processing; nested
> exception is javax.jms.JMSException: User is not authenticated.]
>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)
>         at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)
>         at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
>         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
> Caused by: org.springframework.jms.UncategorizedJmsException:
> Uncategorized exception occured during JMS processing; nested
> exception is javax.jms.JMSException: User is not authenticated.
>         at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
>         at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
>         at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:187)
>         at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:387)
>         at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:341)
>         at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:132)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
>         at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
>         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>         at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
>         at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>         at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>         at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
>         at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
>         at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)
>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)
>         ... 3 more
> Caused by: javax.jms.JMSException: User is not authenticated.
>         at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
>         at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
>         at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
>         at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
>         ... 43 more
> Caused by: java.lang.SecurityException: User is not authenticated.
>         at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
>         at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
>         at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
>         at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
>         at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
>         at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>         at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>         at java.lang.Thread.run(Thread.java:662)
>
>
>
> <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-3.0.xsd
>         http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd">
>
>         <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>                 <property name="connectionFactory">
>                 <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>                         <property name="brokerURL"
> value="tcp://localhost:61616" />
>                         <property name="userName"  value="cn=Directory
> Manager" />
>                         <property name="password" value="password" />
>                 </bean>
>                 </property>
>         </bean>
>
>         <bean id="myUriMaker" class="com.foo.camel.jms.QueueUriMaker"/>
>
>         <bean id="myRouter" class="com.foo.camel.jms.MyProducer">
>
>                 <property name="brokerName" ref="brokerNameLookup" />
>                 <property name="producerName" ref="producerNameLookup" />
>                 <property name="postLogger" ref="producerLogger" />
>
>                 <property name="uri" value="jms:queue:prescriptions" />
>                 <property name="quartz"
> value="quartz://com.foo.camel.quartz.producer/MyQuartz" />
>                 <property name="repeatInterval" value="1000" />
>                 <property name="repeatCount" value="0" />
>                 <property name="fireNow" value="true" />
>         </bean>
>         <bean id="downloadLogger" class="com.foo.camel.jms.DownloadLogger"/>
>         <bean id="producerLogger" class="com.foo.camel.jms.ProducerLogger"/>
>         <bean id="brokerNameLookup" class="com.foo.camel.jms.BrokerNameLookup"/>
>         <bean id="producerNameLookup"
> class="com.foo.camel.jms.ProducerNameLookup"/>
>         <bean id="consumerNameLookup"
> class="com.foo.camel.jms.ConsumerNameLookup"/>
>
>         <camelContext xmlns="http://camel.apache.org/schema/spring">
>                 <routeBuilder ref="myRouter"/>
>         </camelContext>
>
>
>         <!--
>           <camelContext xmlns="http://camel.apache.org/schema/spring">
>     <route>
>       <from uri="file:src/data?noop=true"/>
>       <process ref="downloadLogger"/>
>       <to uri="jms:queue:incomingOrders"/>
>       <process ref="producerLogger"/>
>     </route>
>   </camelContext>
>          -->
>
>          <!--
>
>           <camelContext xmlns="http://camel.apache.org/schema/spring">
>      <packageScan>
>     <package>com.foo.camel.jms.routes</package>
>     <excludes>**.*Test*</excludes>
>     <includes>**.*</includes>
>   </packageScan>
>   </camelContext>
>           -->
>
> </beans>
>
>
>
>
>
> On Wed, Oct 17, 2012 at 9:18 PM, Claus Ibsen <cl...@gmail.com> wrote:
>> Hi
>>
>> Have you tried with the ActiveMQ 5.7.0 release?
>>
>>
>> On Wed, Oct 17, 2012 at 2:09 AM, Sean K <sk...@gmail.com> wrote:
>>> Hi,
>>> I am working with the documentation on the activemq site for
>>> configuring the LDAP.
>>>
>>> http://activemq.apache.org/security.html  -- almost everything is
>>> copied verbatim except for hostnames and there were a few parameters
>>> that were not writable by the current bean so I remove them -- for
>>> example the writeAttributePrefix.
>>>
>>> I am using apache activemq-5.6.0 which is running on ubuntu.
>>>
>>> It is trying to connect to the opends 2.2.1 running on a Windows 7
>>> machine.   I imported the ldif into the openDS through the admin
>>> console so that these dc and ou would match.
>>>
>>> I start up the activemq broker -- all is fine.
>>> When I start the producer to send messages to the broker, then errors
>>> occur (on bottom)
>>>
>>> In the producer log, there is some indicator -- about an option key
>>> being expected at line 40, which I dont see how.
>>>
>>> I also attached the login.config file.
>>>
>>> Any ideas anyone?
>>>
>>>       <plugins>
>>>                 <jaasAuthenticationPlugin configuration="LdapConfiguration" />
>>>
>>>                 <authorizationPlugin>
>>>                         <map>
>>>
>>>
>>>                           <bean
>>> xmlns="http://www.springframework.org/schema/beans"
>>> id="lDAPAuthorizationMap"
>>>
>>> class="org.apache.activemq.security.LDAPAuthorizationMap">
>>>
>>>                               <property name="initialContextFactory"
>>> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>>>                               <property name="connectionURL"
>>> value="ldap://WSW710119:389"/>
>>>                               <property name="authentication" value="simple"/>
>>>                               <property name="connectionUsername"
>>> value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
>>>                               <property name="connectionPassword"
>>> value="password"/>
>>>                               <property name="connectionProtocol" value="s"/>
>>>                               <property name="topicSearchSubtreeBool"
>>> value="true" />
>>>
>>>
>>>                               <property name="queueSearchSubtreeBool"
>>> value="true"/>
>>>                               <property name="adminBase" value="(cn=admin)"/>
>>>                               <property name="adminAttribute" value="member"/>
>>>                               <property name="readBase" value="(cn=read)"/>
>>>                               <property name="readAttribute" value="member"/>
>>>                               <property name="writeBase" value="(cn=write)"/>
>>>                               <property name="writeAttribute" value="member"/>
>>>                            </bean>
>>>                         </map>
>>>                 </authorizationPlugin>
>>>
>>>
>>>         </plugins>
>>>
>>>
>>> And the contents of login.conf :
>>>
>>>
>>> LdapConfiguration {
>>>
>>>   org.apache.activemq.jaas.LDAPLoginModule required
>>>
>>>   debug=true
>>>
>>>   initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
>>>
>>>   connectionURL="ldap://WSW710119:389"
>>>
>>>   connectionUsername="cn=mqbroker,ou=Services,dc=acme,dc=com"
>>>
>>>   connectionPassword=password
>>>
>>>   connectionProtocol=s
>>>
>>>   authentication=simple
>>>
>>>   userBase="ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>>>
>>>   userRoleName=dummyUserRoleName
>>>
>>>   userSearchMatching="(uid={0})"
>>>
>>>   userSearchSubtree=false
>>>
>>>   roleBase="ou=Groups,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>>>
>>>   roleName=cn
>>>
>>>   roleSearchMatching="(member=uid={1})"
>>>
>>>   roleSearchSubtree=true
>>>
>>> };
>>>
>>>
>>> <<<< this is the broker logs>>>>>
>>> 2012-10-16 16:57:16,098 | WARN  | Failed to add Connection
>>> ID:centos-test1.foo.com-43128-1350431835402-1:2, reason:
>>> java.lang.SecurityException: User name [null] or password is invalid.
>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>> ssl:///127.0.0.1:44983
>>> 2012-10-16 16:57:16,100 | WARN  | Failed to add Connection
>>> ID:centos-test1.foo.com-43128-1350431835402-1:3, reason:
>>> java.lang.SecurityException: User name [null] or password is invalid.
>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>> ssl:///127.0.0.1:44982
>>> 2012-10-16 16:57:16,108 | WARN  | Failed to add Connection
>>> ID:centos-test1.foo.com-43128-1350431835402-1:1, reason:
>>> java.lang.SecurityException: User name [null] or password is invalid.
>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>> ssl:///127.0.0.1:44981
>>> 2012-10-16 16:57:16,152 | WARN  | Transport Connection to:
>>> tcp://127.0.0.1:44982 failed: java.io.EOFException |
>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>> Transport: ssl:///127.0.0.1:44982
>>> 2012-10-16 16:57:16,171 | WARN  | Transport Connection to:
>>> tcp://127.0.0.1:44983 failed: java.io.EOFException |
>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>> Transport: ssl:///127.0.0.1:44983
>>> 2012-10-16 16:57:16,180 | WARN  | Transport Connection to:
>>> tcp://127.0.0.1:44981 failed: java.io.EOFException |
>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>> Transport: ssl:///127.0.0.1:44981
>>> 2012-10-16 16:57:16,613 | WARN  | Failed to add Connection
>>> ID:centos-test1.foo.com-43128-1350431835402-1:4, reason:
>>> java.lang.SecurityException: User name [null] or password is invalid.
>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>> ssl:///127.0.0.1:44984
>>> 2012-10-16 16:57:16,632 | WARN  | Transport Connection to:
>>> tcp://127.0.0.1:44984 failed: java.io.EOFException |
>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>> Transport: ssl:///127.0.0.1:44984
>>> 2012-10-16 16:57:17,585 | WARN  | Failed to add Connection
>>> ID:centos-test1.foo.com-43128-1350431835402-1:5, reason:
>>> java.lang.SecurityException: User name [null] or password is invalid.
>>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>>> ssl:///127.0.0.1:44985
>>>
>>>
>>> <<<<this is the error that come back through the producer >>>>>>
>>> ]. Caused by: [org.quartz.JobExecutionException -
>>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>>> exception occured during JMS processing; nested exception is
>>> javax.jms.JMSException: User name [null] or password is invalid.]
>>>  INFO [DefaultQuartzScheduler-camel-1_Worker-3] (JobRunShell.java:221)
>>> - Job DEFAULT.quartz-endpoint1 threw a JobExecutionException:
>>> org.quartz.JobExecutionException:
>>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>>> exception occured during JMS processing; nested exception is
>>> javax.jms.JMSException: User name [null] or password is invalid. [See
>>> nested exception: org.springframework.jms.UncategorizedJmsException:
>>> Uncategorized exception occured during JMS processing; nested
>>> exception is javax.jms.JMSException: User name [null] or password is
>>> invalid.]
>>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)
>>>         at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)
>>>         at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
>>>         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
>>> Caused by: org.springframework.jms.UncategorizedJmsException:
>>> Uncategorized exception occured during JMS processing; nested
>>> exception is javax.jms.JMSException: User name [null] or password is
>>> invalid.
>>>         at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
>>>         at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
>>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
>>>         at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:187)
>>>         at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:387)
>>>         at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:341)
>>>         at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:132)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
>>>         at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
>>>         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>         at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
>>>         at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
>>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>         at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
>>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>         at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
>>>         at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
>>>         at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)
>>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
>>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)
>>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)
>>>         ... 3 more
>>> Caused by: javax.jms.JMSException: User name [null] or password is invalid.
>>>         at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
>>>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
>>>         at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
>>>         at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
>>>         at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
>>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
>>>         ... 43 more
>>> Caused by: java.lang.SecurityException: User name [null] or password is invalid.
>>>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)
>>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>>         at org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:91)
>>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>>         at java.lang.Thread.run(Thread.java:662)
>>> Caused by: java.lang.SecurityException: Configuration Error:
>>>         Line 40: expected [option key]
>>>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)
>>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>         at java.lang.Class.newInstance0(Class.java:355)
>>>         at java.lang.Class.newInstance(Class.java:308)
>>>         at javax.security.auth.login.Configuration$3.run(Configuration.java:247)
>>>         at java.security.AccessController.doPrivileged(Native Method)
>>>         at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:242)
>>>         at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
>>>         at java.security.AccessController.doPrivileged(Native Method)
>>>         at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
>>>         at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
>>>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:75)
>>>         ... 15 more
>>> Caused by: java.io.IOException: Configuration Error:
>>>         Line 40: expected [option key]
>>>         at com.sun.security.auth.login.ConfigFile.match(ConfigFile.java:520)
>>>         at com.sun.security.auth.login.ConfigFile.parseLoginEntry(ConfigFile.java:406)
>>>         at com.sun.security.auth.login.ConfigFile.readConfig(ConfigFile.java:350)
>>>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:262)
>>>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:202)
>>>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91)
>>>         ... 29 more
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: cibsen@redhat.com
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen

Re: LDAP (OpenDS 2.2.1) configuration

Posted by Sean K <sk...@gmail.com>.
I havent tried that yet.

But I think I am getting closer.

I took a vanilla activemq 5.6.0 bundle zip and expanded it on a
windows7 machine, and added only this section for the LDAP.

The OpenDS 2.2.1 is also running on the same machine.


Now, when I made my non-ssl producer connect to the broker, it says
that the user is not authenticated.

My producer is a simple camel producer basically driven from this xml.
Then I run the producer using : mvn camel:run

I think I need to configure the OpenDS more to handle ActiveMQ but I
am not sure how.   Any ideas?



        <authorizationPlugin>
              <map>
                  <bean id="lDAPAuthorizationMap"
class="org.apache.activemq.security.LDAPAuthorizationMap"
                        xmlns="http://www.springframework.org/schema/beans">
                      <property name="initialContextFactory"
value="com.sun.jndi.ldap.LdapCtxFactory"/>
                      <property name="connectionURL"
value="ldap://localhost:389"/>
                      <property name="authentication" value="simple"/>
                      <property name="connectionUsername"
value="cn=Directory Manager"/>
                      <property name="connectionPassword" value="password"/>
                      <property name="connectionProtocol" value="s"/>
                      <property name="topicSearchMatchingFormat"

value="cn={0},ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
                      <property name="topicSearchSubtreeBool" value="true"/>
                      <property name="queueSearchMatchingFormat"

value="cn={0},ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"/>
                      <property name="advisorySearchBase"

value="cn=ActiveMQ.Advisory,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
                      <property name="tempSearchBase"

value="cn=ActiveMQ.Temp,ou=Topic,ou=Destination,ou=ActiveMQ,ou=system"/>
                      <property name="queueSearchSubtreeBool" value="true"/>
                      <property name="adminBase"
value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
                      <property name="adminAttribute" value="member"/>
                      <property name="readBase"
value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
                      <property name="readAttribute" value="member"/>
                      <property name="writeBase"
value="(cn=all-servers,cn=Server Groups,cn=admin data)"/>
                      <property name="writeAttribute" value="member"/>
                  </bean>
              </map>
          </authorizationPlugin>




 INFO [DefaultQuartzScheduler-camel-1_Worker-1] (JobRunShell.java:221)
- Job DEFAULT.quartz-endpoint1 threw a JobExecutionException:
org.quartz.JobExecutionException:
org.springframework.jms.UncategorizedJmsException: Uncategorized
exception occured during JMS processing; nested exception is
javax.jms.JMSException: User is not authenticated. [See nested
exception: org.springframework.jms.UncategorizedJmsException:
Uncategorized exception occured during JMS processing; nested
exception is javax.jms.JMSException: User is not authenticated.]
        at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)
        at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: org.springframework.jms.UncategorizedJmsException:
Uncategorized exception occured during JMS processing; nested
exception is javax.jms.JMSException: User is not authenticated.
        at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
        at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
        at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:187)
        at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:387)
        at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:341)
        at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:132)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
        at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
        at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
        at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
        at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
        at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
        at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
        at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)
        at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)
        ... 3 more
Caused by: javax.jms.JMSException: User is not authenticated.
        at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
        at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
        at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
        at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
        at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
        ... 43 more
Caused by: java.lang.SecurityException: User is not authenticated.
        at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:59)
        at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
        at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:481)
        at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
        at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:533)
        at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:464)
        at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:459)
        at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.util.LoggingBrokerPlugin.addConnection(LoggingBrokerPlugin.java:190)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
        at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
        at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
        at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
        at java.lang.Thread.run(Thread.java:662)



<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-3.0.xsd
        http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">

        <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
                <property name="connectionFactory">
                <bean class="org.apache.activemq.ActiveMQConnectionFactory">
                        <property name="brokerURL"
value="tcp://localhost:61616" />
                        <property name="userName"  value="cn=Directory
Manager" />
                        <property name="password" value="password" />
                </bean>
                </property>
        </bean>

        <bean id="myUriMaker" class="com.foo.camel.jms.QueueUriMaker"/>

        <bean id="myRouter" class="com.foo.camel.jms.MyProducer">

                <property name="brokerName" ref="brokerNameLookup" />
                <property name="producerName" ref="producerNameLookup" />
                <property name="postLogger" ref="producerLogger" />

                <property name="uri" value="jms:queue:prescriptions" />
                <property name="quartz"
value="quartz://com.foo.camel.quartz.producer/MyQuartz" />
                <property name="repeatInterval" value="1000" />
                <property name="repeatCount" value="0" />
                <property name="fireNow" value="true" />
        </bean>
        <bean id="downloadLogger" class="com.foo.camel.jms.DownloadLogger"/>
        <bean id="producerLogger" class="com.foo.camel.jms.ProducerLogger"/>
        <bean id="brokerNameLookup" class="com.foo.camel.jms.BrokerNameLookup"/>
        <bean id="producerNameLookup"
class="com.foo.camel.jms.ProducerNameLookup"/>
        <bean id="consumerNameLookup"
class="com.foo.camel.jms.ConsumerNameLookup"/>

        <camelContext xmlns="http://camel.apache.org/schema/spring">
                <routeBuilder ref="myRouter"/>
        </camelContext>


        <!--
          <camelContext xmlns="http://camel.apache.org/schema/spring">
    <route>
      <from uri="file:src/data?noop=true"/>
      <process ref="downloadLogger"/>
      <to uri="jms:queue:incomingOrders"/>
      <process ref="producerLogger"/>
    </route>
  </camelContext>
         -->

         <!--

          <camelContext xmlns="http://camel.apache.org/schema/spring">
     <packageScan>
    <package>com.foo.camel.jms.routes</package>
    <excludes>**.*Test*</excludes>
    <includes>**.*</includes>
  </packageScan>
  </camelContext>
          -->

</beans>





On Wed, Oct 17, 2012 at 9:18 PM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Have you tried with the ActiveMQ 5.7.0 release?
>
>
> On Wed, Oct 17, 2012 at 2:09 AM, Sean K <sk...@gmail.com> wrote:
>> Hi,
>> I am working with the documentation on the activemq site for
>> configuring the LDAP.
>>
>> http://activemq.apache.org/security.html  -- almost everything is
>> copied verbatim except for hostnames and there were a few parameters
>> that were not writable by the current bean so I remove them -- for
>> example the writeAttributePrefix.
>>
>> I am using apache activemq-5.6.0 which is running on ubuntu.
>>
>> It is trying to connect to the opends 2.2.1 running on a Windows 7
>> machine.   I imported the ldif into the openDS through the admin
>> console so that these dc and ou would match.
>>
>> I start up the activemq broker -- all is fine.
>> When I start the producer to send messages to the broker, then errors
>> occur (on bottom)
>>
>> In the producer log, there is some indicator -- about an option key
>> being expected at line 40, which I dont see how.
>>
>> I also attached the login.config file.
>>
>> Any ideas anyone?
>>
>>       <plugins>
>>                 <jaasAuthenticationPlugin configuration="LdapConfiguration" />
>>
>>                 <authorizationPlugin>
>>                         <map>
>>
>>
>>                           <bean
>> xmlns="http://www.springframework.org/schema/beans"
>> id="lDAPAuthorizationMap"
>>
>> class="org.apache.activemq.security.LDAPAuthorizationMap">
>>
>>                               <property name="initialContextFactory"
>> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>>                               <property name="connectionURL"
>> value="ldap://WSW710119:389"/>
>>                               <property name="authentication" value="simple"/>
>>                               <property name="connectionUsername"
>> value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
>>                               <property name="connectionPassword"
>> value="password"/>
>>                               <property name="connectionProtocol" value="s"/>
>>                               <property name="topicSearchSubtreeBool"
>> value="true" />
>>
>>
>>                               <property name="queueSearchSubtreeBool"
>> value="true"/>
>>                               <property name="adminBase" value="(cn=admin)"/>
>>                               <property name="adminAttribute" value="member"/>
>>                               <property name="readBase" value="(cn=read)"/>
>>                               <property name="readAttribute" value="member"/>
>>                               <property name="writeBase" value="(cn=write)"/>
>>                               <property name="writeAttribute" value="member"/>
>>                            </bean>
>>                         </map>
>>                 </authorizationPlugin>
>>
>>
>>         </plugins>
>>
>>
>> And the contents of login.conf :
>>
>>
>> LdapConfiguration {
>>
>>   org.apache.activemq.jaas.LDAPLoginModule required
>>
>>   debug=true
>>
>>   initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
>>
>>   connectionURL="ldap://WSW710119:389"
>>
>>   connectionUsername="cn=mqbroker,ou=Services,dc=acme,dc=com"
>>
>>   connectionPassword=password
>>
>>   connectionProtocol=s
>>
>>   authentication=simple
>>
>>   userBase="ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>>
>>   userRoleName=dummyUserRoleName
>>
>>   userSearchMatching="(uid={0})"
>>
>>   userSearchSubtree=false
>>
>>   roleBase="ou=Groups,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>>
>>   roleName=cn
>>
>>   roleSearchMatching="(member=uid={1})"
>>
>>   roleSearchSubtree=true
>>
>> };
>>
>>
>> <<<< this is the broker logs>>>>>
>> 2012-10-16 16:57:16,098 | WARN  | Failed to add Connection
>> ID:centos-test1.foo.com-43128-1350431835402-1:2, reason:
>> java.lang.SecurityException: User name [null] or password is invalid.
>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>> ssl:///127.0.0.1:44983
>> 2012-10-16 16:57:16,100 | WARN  | Failed to add Connection
>> ID:centos-test1.foo.com-43128-1350431835402-1:3, reason:
>> java.lang.SecurityException: User name [null] or password is invalid.
>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>> ssl:///127.0.0.1:44982
>> 2012-10-16 16:57:16,108 | WARN  | Failed to add Connection
>> ID:centos-test1.foo.com-43128-1350431835402-1:1, reason:
>> java.lang.SecurityException: User name [null] or password is invalid.
>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>> ssl:///127.0.0.1:44981
>> 2012-10-16 16:57:16,152 | WARN  | Transport Connection to:
>> tcp://127.0.0.1:44982 failed: java.io.EOFException |
>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>> Transport: ssl:///127.0.0.1:44982
>> 2012-10-16 16:57:16,171 | WARN  | Transport Connection to:
>> tcp://127.0.0.1:44983 failed: java.io.EOFException |
>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>> Transport: ssl:///127.0.0.1:44983
>> 2012-10-16 16:57:16,180 | WARN  | Transport Connection to:
>> tcp://127.0.0.1:44981 failed: java.io.EOFException |
>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>> Transport: ssl:///127.0.0.1:44981
>> 2012-10-16 16:57:16,613 | WARN  | Failed to add Connection
>> ID:centos-test1.foo.com-43128-1350431835402-1:4, reason:
>> java.lang.SecurityException: User name [null] or password is invalid.
>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>> ssl:///127.0.0.1:44984
>> 2012-10-16 16:57:16,632 | WARN  | Transport Connection to:
>> tcp://127.0.0.1:44984 failed: java.io.EOFException |
>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>> Transport: ssl:///127.0.0.1:44984
>> 2012-10-16 16:57:17,585 | WARN  | Failed to add Connection
>> ID:centos-test1.foo.com-43128-1350431835402-1:5, reason:
>> java.lang.SecurityException: User name [null] or password is invalid.
>> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
>> ssl:///127.0.0.1:44985
>>
>>
>> <<<<this is the error that come back through the producer >>>>>>
>> ]. Caused by: [org.quartz.JobExecutionException -
>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>> exception occured during JMS processing; nested exception is
>> javax.jms.JMSException: User name [null] or password is invalid.]
>>  INFO [DefaultQuartzScheduler-camel-1_Worker-3] (JobRunShell.java:221)
>> - Job DEFAULT.quartz-endpoint1 threw a JobExecutionException:
>> org.quartz.JobExecutionException:
>> org.springframework.jms.UncategorizedJmsException: Uncategorized
>> exception occured during JMS processing; nested exception is
>> javax.jms.JMSException: User name [null] or password is invalid. [See
>> nested exception: org.springframework.jms.UncategorizedJmsException:
>> Uncategorized exception occured during JMS processing; nested
>> exception is javax.jms.JMSException: User name [null] or password is
>> invalid.]
>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)
>>         at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)
>>         at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
>>         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
>> Caused by: org.springframework.jms.UncategorizedJmsException:
>> Uncategorized exception occured during JMS processing; nested
>> exception is javax.jms.JMSException: User name [null] or password is
>> invalid.
>>         at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
>>         at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
>>         at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:187)
>>         at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:387)
>>         at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:341)
>>         at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:132)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
>>         at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
>>         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>         at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
>>         at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>         at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
>>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>         at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
>>         at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
>>         at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)
>>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
>>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)
>>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)
>>         ... 3 more
>> Caused by: javax.jms.JMSException: User name [null] or password is invalid.
>>         at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
>>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
>>         at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
>>         at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
>>         at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
>>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
>>         ... 43 more
>> Caused by: java.lang.SecurityException: User name [null] or password is invalid.
>>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)
>>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>         at org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:91)
>>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>         at java.lang.Thread.run(Thread.java:662)
>> Caused by: java.lang.SecurityException: Configuration Error:
>>         Line 40: expected [option key]
>>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)
>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>         at java.lang.Class.newInstance0(Class.java:355)
>>         at java.lang.Class.newInstance(Class.java:308)
>>         at javax.security.auth.login.Configuration$3.run(Configuration.java:247)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:242)
>>         at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
>>         at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
>>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:75)
>>         ... 15 more
>> Caused by: java.io.IOException: Configuration Error:
>>         Line 40: expected [option key]
>>         at com.sun.security.auth.login.ConfigFile.match(ConfigFile.java:520)
>>         at com.sun.security.auth.login.ConfigFile.parseLoginEntry(ConfigFile.java:406)
>>         at com.sun.security.auth.login.ConfigFile.readConfig(ConfigFile.java:350)
>>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:262)
>>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:202)
>>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91)
>>         ... 29 more
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen

Re: LDAP (OpenDS 2.2.1) configuration

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Have you tried with the ActiveMQ 5.7.0 release?


On Wed, Oct 17, 2012 at 2:09 AM, Sean K <sk...@gmail.com> wrote:
> Hi,
> I am working with the documentation on the activemq site for
> configuring the LDAP.
>
> http://activemq.apache.org/security.html  -- almost everything is
> copied verbatim except for hostnames and there were a few parameters
> that were not writable by the current bean so I remove them -- for
> example the writeAttributePrefix.
>
> I am using apache activemq-5.6.0 which is running on ubuntu.
>
> It is trying to connect to the opends 2.2.1 running on a Windows 7
> machine.   I imported the ldif into the openDS through the admin
> console so that these dc and ou would match.
>
> I start up the activemq broker -- all is fine.
> When I start the producer to send messages to the broker, then errors
> occur (on bottom)
>
> In the producer log, there is some indicator -- about an option key
> being expected at line 40, which I dont see how.
>
> I also attached the login.config file.
>
> Any ideas anyone?
>
>       <plugins>
>                 <jaasAuthenticationPlugin configuration="LdapConfiguration" />
>
>                 <authorizationPlugin>
>                         <map>
>
>
>                           <bean
> xmlns="http://www.springframework.org/schema/beans"
> id="lDAPAuthorizationMap"
>
> class="org.apache.activemq.security.LDAPAuthorizationMap">
>
>                               <property name="initialContextFactory"
> value="com.sun.jndi.ldap.LdapCtxFactory"/>
>                               <property name="connectionURL"
> value="ldap://WSW710119:389"/>
>                               <property name="authentication" value="simple"/>
>                               <property name="connectionUsername"
> value="cn=mqbroker,ou=Services,dc=acme,dc=com"/>
>                               <property name="connectionPassword"
> value="password"/>
>                               <property name="connectionProtocol" value="s"/>
>                               <property name="topicSearchSubtreeBool"
> value="true" />
>
>
>                               <property name="queueSearchSubtreeBool"
> value="true"/>
>                               <property name="adminBase" value="(cn=admin)"/>
>                               <property name="adminAttribute" value="member"/>
>                               <property name="readBase" value="(cn=read)"/>
>                               <property name="readAttribute" value="member"/>
>                               <property name="writeBase" value="(cn=write)"/>
>                               <property name="writeAttribute" value="member"/>
>                            </bean>
>                         </map>
>                 </authorizationPlugin>
>
>
>         </plugins>
>
>
> And the contents of login.conf :
>
>
> LdapConfiguration {
>
>   org.apache.activemq.jaas.LDAPLoginModule required
>
>   debug=true
>
>   initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
>
>   connectionURL="ldap://WSW710119:389"
>
>   connectionUsername="cn=mqbroker,ou=Services,dc=acme,dc=com"
>
>   connectionPassword=password
>
>   connectionProtocol=s
>
>   authentication=simple
>
>   userBase="ou=User,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>
>   userRoleName=dummyUserRoleName
>
>   userSearchMatching="(uid={0})"
>
>   userSearchSubtree=false
>
>   roleBase="ou=Groups,ou=ActiveMQ,ou=systems,dc=acme,dc=com"
>
>   roleName=cn
>
>   roleSearchMatching="(member=uid={1})"
>
>   roleSearchSubtree=true
>
> };
>
>
> <<<< this is the broker logs>>>>>
> 2012-10-16 16:57:16,098 | WARN  | Failed to add Connection
> ID:centos-test1.foo.com-43128-1350431835402-1:2, reason:
> java.lang.SecurityException: User name [null] or password is invalid.
> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
> ssl:///127.0.0.1:44983
> 2012-10-16 16:57:16,100 | WARN  | Failed to add Connection
> ID:centos-test1.foo.com-43128-1350431835402-1:3, reason:
> java.lang.SecurityException: User name [null] or password is invalid.
> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
> ssl:///127.0.0.1:44982
> 2012-10-16 16:57:16,108 | WARN  | Failed to add Connection
> ID:centos-test1.foo.com-43128-1350431835402-1:1, reason:
> java.lang.SecurityException: User name [null] or password is invalid.
> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
> ssl:///127.0.0.1:44981
> 2012-10-16 16:57:16,152 | WARN  | Transport Connection to:
> tcp://127.0.0.1:44982 failed: java.io.EOFException |
> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
> Transport: ssl:///127.0.0.1:44982
> 2012-10-16 16:57:16,171 | WARN  | Transport Connection to:
> tcp://127.0.0.1:44983 failed: java.io.EOFException |
> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
> Transport: ssl:///127.0.0.1:44983
> 2012-10-16 16:57:16,180 | WARN  | Transport Connection to:
> tcp://127.0.0.1:44981 failed: java.io.EOFException |
> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
> Transport: ssl:///127.0.0.1:44981
> 2012-10-16 16:57:16,613 | WARN  | Failed to add Connection
> ID:centos-test1.foo.com-43128-1350431835402-1:4, reason:
> java.lang.SecurityException: User name [null] or password is invalid.
> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
> ssl:///127.0.0.1:44984
> 2012-10-16 16:57:16,632 | WARN  | Transport Connection to:
> tcp://127.0.0.1:44984 failed: java.io.EOFException |
> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
> Transport: ssl:///127.0.0.1:44984
> 2012-10-16 16:57:17,585 | WARN  | Failed to add Connection
> ID:centos-test1.foo.com-43128-1350431835402-1:5, reason:
> java.lang.SecurityException: User name [null] or password is invalid.
> | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
> ssl:///127.0.0.1:44985
>
>
> <<<<this is the error that come back through the producer >>>>>>
> ]. Caused by: [org.quartz.JobExecutionException -
> org.springframework.jms.UncategorizedJmsException: Uncategorized
> exception occured during JMS processing; nested exception is
> javax.jms.JMSException: User name [null] or password is invalid.]
>  INFO [DefaultQuartzScheduler-camel-1_Worker-3] (JobRunShell.java:221)
> - Job DEFAULT.quartz-endpoint1 threw a JobExecutionException:
> org.quartz.JobExecutionException:
> org.springframework.jms.UncategorizedJmsException: Uncategorized
> exception occured during JMS processing; nested exception is
> javax.jms.JMSException: User name [null] or password is invalid. [See
> nested exception: org.springframework.jms.UncategorizedJmsException:
> Uncategorized exception occured during JMS processing; nested
> exception is javax.jms.JMSException: User name [null] or password is
> invalid.]
>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)
>         at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)
>         at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
>         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
> Caused by: org.springframework.jms.UncategorizedJmsException:
> Uncategorized exception occured during JMS processing; nested
> exception is javax.jms.JMSException: User name [null] or password is
> invalid.
>         at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
>         at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
>         at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:187)
>         at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:387)
>         at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:341)
>         at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:132)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
>         at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
>         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>         at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
>         at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>         at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>         at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>         at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
>         at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
>         at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
>         at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
>         at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:44)
>         at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
>         at org.apache.camel.processor.loadbalancer.QueueLoadBalancer.process(QueueLoadBalancer.java:71)
>         at org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:113)
>         ... 3 more
> Caused by: javax.jms.JMSException: User name [null] or password is invalid.
>         at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
>         at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1466)
>         at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:308)
>         at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196)
>         at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:457)
>         ... 43 more
> Caused by: java.lang.SecurityException: User name [null] or password is invalid.
>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)
>         at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)
>         at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
>         at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:715)
>         at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
>         at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>         at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>         at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>         at org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:91)
>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.SecurityException: Configuration Error:
>         Line 40: expected [option key]
>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at java.lang.Class.newInstance0(Class.java:355)
>         at java.lang.Class.newInstance(Class.java:308)
>         at javax.security.auth.login.Configuration$3.run(Configuration.java:247)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:242)
>         at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
>         at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
>         at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:75)
>         ... 15 more
> Caused by: java.io.IOException: Configuration Error:
>         Line 40: expected [option key]
>         at com.sun.security.auth.login.ConfigFile.match(ConfigFile.java:520)
>         at com.sun.security.auth.login.ConfigFile.parseLoginEntry(ConfigFile.java:406)
>         at com.sun.security.auth.login.ConfigFile.readConfig(ConfigFile.java:350)
>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:262)
>         at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:202)
>         at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91)
>         ... 29 more



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen