Fuse MQ in Fabric - External MQ project receives KeeperErrorCode = NoAuth
komododave Jan 24, 2013 10:43 AMWe're trying to run the External MQ Client Example on a single child container of a single ensemble node for our Fabric.
The child container has been configured with the native mq profile applied, and is otherwise untouched.
That profile itself is unmodified.
We've also tried the below with a custom broker group as opposed to default; the results are the same; a zookeeper "NoAuth" error is received (see final section of post).
Customisation of External MQ Client Project
We've slightly customised the External MQ Client Example as follows:
1. Two version properties have been updated to the following, since we run Fuse Fabric 7.1 GA (i.e. the 047 RC):
* <activemq.version>5.7.0.fuse-71-047</activemq.version>
* <fabric.version>7.1.0.fuse-047</fabric.version>
2. We provide an explicit username/password at point of creating a Connection:
connection = factory.createConnection("admin","admin");
// we've also tried "karaf","karaf" in the line above.
3. We've added the dependency fabric-activemq to the project POM to provide the class FabricDiscoveryAgent. The latest version we could find is 1.0:
*
<version>1.0</version>
* </dependency>
User configuration in Fabric
We have added these two lines..
karaf=karaf,admin
admin=admin,admin
..to both of these files:
$FABRIC/etc/users.properties
$FABRIC/instances/<broker-container-name>/etc/users.properties
Running the project -> Zookeeper "NoAuth"
Here's what mvn -e -Pproducer-default prints out when run on the fabric host:
11:34:23 INFO ******************************
11:34:23 INFO Connecting to Fuse MQ Broker using URL: discovery:(fabric:default)
11:34:23 INFO ******************************
11:34:23 INFO Client environment:zookeeper.version=3.4.3-1240972, built on 02/06/2012 10:48 GMT
11:34:23 INFO Client environment:host.name=ithffu01.ocado.com
11:34:23 INFO Client environment:java.version=1.6.0_26
11:34:23 INFO Client environment:java.vendor=Sun Microsystems Inc.
11:34:23 INFO Client environment:java.home=/usr/lib/jvm/java-6-sun-1.6.0.26/jre
11:34:23 INFO Client environment:java.class.path=/usr/share/maven2/boot/classworlds.jar
11:34:23 INFO Client environment:java.library.path=/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
11:34:23 INFO Client environment:java.io.tmpdir=/tmp
11:34:23 INFO Client environment:java.compiler=<NA>
11:34:23 INFO Client environment:os.name=Linux
11:34:23 INFO Client environment:os.arch=amd64
11:34:23 INFO Client environment:os.version=2.6.32-5-amd64
11:34:23 INFO Client environment:user.name=root
11:34:23 INFO Client environment:user.home=/root
11:34:23 INFO Client environment:user.dir=/var/tmp/external-mq-fabric-client-master
11:34:23 INFO Initiating client connection, connectString=localhost:2181 sessionTimeout=10000 watcher=org.linkedin.zookeeper.client.ZKClient@39fba2af
11:34:23 DEBUG zookeeper.disableAutoWatchReset is false
11:34:23 INFO Opening socket connection to server /0:0:0:0:0:0:0:1:2181
11:34:23 WARN SecurityException: java.lang.SecurityException: Unable to locate a login configuration occurred when trying to find JAAS configuration.
11:34:23 INFO Client will not SASL-authenticate because the default JAAS configuration section 'Client' could not be found. If you are not using SASL, you may ignore this. On the other hand, if you expected SASL to work, please fix your JAAS configuration.
11:34:23 INFO Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session
11:34:23 DEBUG Session establishment request sent on localhost/0:0:0:0:0:0:0:1:2181
11:34:23 INFO Session establishment complete on server localhost/0:0:0:0:0:0:0:1:2181, sessionid = 0x13c6c1b9f0f000b, negotiated timeout = 10000
11:34:23 DEBUG event: SyncConnected
11:34:23 DEBUG Reading reply sessionid:0x13c6c1b9f0f000b, packet:: clientPath:null serverPath:null finished:false header:: 1,3 replyHeader:: 1,3028,-101 request:: '/fabric/activemq-clusters/default,F response::
11:34:23 DEBUG Reading reply sessionid:0x13c6c1b9f0f000b, packet:: clientPath:null serverPath:null finished:false header:: 2,3 replyHeader:: 2,3028,-101 request:: '/fabric/activemq-clusters/default,F response::
11:34:23 DEBUG Reading reply sessionid:0x13c6c1b9f0f000b, packet:: clientPath:null serverPath:null finished:false header:: 3,3 replyHeader:: 3,3028,-101 request:: '/fabric/activemq-clusters,F response::
11:34:23 DEBUG Reading reply sessionid:0x13c6c1b9f0f000b, packet:: clientPath:null serverPath:null finished:false header:: 4,3 replyHeader:: 4,3028,0 request:: '/fabric,F response:: s{2,2,1358934101891,1358934101891,0,3,1,0,0,3,137}
11:34:23 DEBUG Reading reply sessionid:0x13c6c1b9f0f000b, packet:: clientPath:null serverPath:null finished:false header:: 5,1 replyHeader:: 5,3029,-102 request:: '/fabric/activemq-clusters,,v{s{31,s{'world,'anyone}}},0 response::
11:34:23 ERROR Could not stop service: org.fusesource.fabric.activemq.FabricDiscoveryAgent@ada6d09. Reason: java.lang.NullPointerException
java.lang.NullPointerException
at org.fusesource.fabric.activemq.FabricDiscoveryAgent.stop(FabricDiscoveryAgent.java:180)
at org.apache.activemq.util.ServiceStopper.stop(ServiceStopper.java:41)
at org.apache.activemq.transport.discovery.DiscoveryTransport.stop(DiscoveryTransport.java:67)
at org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)
at org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)
at org.apache.activemq.transport.ResponseCorrelator.stop(ResponseCorrelator.java:132)
at org.apache.activemq.util.ServiceSupport.dispose(ServiceSupport.java:43)
at org.apache.activemq.ActiveMQConnection.close(ActiveMQConnection.java:701)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:290)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:191)
at com.fusesource.examples.activemq.SimpleProducer.main(SimpleProducer.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:662)
11:34:23 ERROR javax.jms.JMSException: Could not connect to broker URL: discovery:(fabric:default). Reason: org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode = NoAuth for /fabric/activemq-clusters
Any suggestions what might be misconfigured?