I am trying to connect to a kafaTestServer to run a storm topology.
I am running a arquilian integration test and I keep getting this error.
Not sure why my jaas.conf is failing and why it cant locate the RemotingLoginModule class.
When I try to login my credentials are empty and my username is null.
31163 [Thread-100] ERROR org.apache.curator.test.TestingZooKeeperServer - From testing server (random state: false)
java.io.IOException: Could not configure server because SASL configuration did not allow the ZooKeeper server to authenticate itself properly: javax.security.auth.login.LoginException: unable to find LoginModule class: org.jboss.as.security.remoting.RemotingLoginModule
at org.apache.zookeeper.server.ServerCnxnFactory.configureSaslLogin(ServerCnxnFactory.java:205) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:87) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:110) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.curator.test.TestingZooKeeperMain.runFromConfig(TestingZooKeeperMain.java:68) ~[curator-test-2.4.0.jar:2.4.0]
at org.apache.curator.test.TestingZooKeeperServer$1.run(TestingZooKeeperServer.java:134) ~[curator-test-2.4.0.jar:2.4.0]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
32434 [main-SendThread(127.0.0.1:59676)] WARN org.apache.zookeeper.ClientCnxn - SASL configuration failed: javax.security.auth.login.LoginException: unable to find LoginModule class: org.jboss.as.security.remoting.RemotingLoginModule Will continue connection to Zookeeper server without SASL authentication, if Zookeeper server allows it.
33436 [main-SendThread(127.0.0.1:59676)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_11]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:712) ~[na:1.8.0_11]
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
34538 [main-SendThread(127.0.0.1:59676)] WARN org.apache.zookeeper.ClientCnxn - SASL configuration failed: javax.security.auth.login.LoginException: unable to find LoginModule class: org.jboss.as.security.remoting.RemotingLoginModule Will continue connection to Zookeeper server without SASL authentication, if Zookeeper server allows it.
35538 [main-SendThread(127.0.0.1:59676)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_11]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:712) ~[na:1.8.0_11]
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
36639 [main-SendThread(127.0.0.1:59676)] WARN org.apache.zookeeper.ClientCnxn - SASL configuration failed: javax.security.auth.login.LoginException: unable to find LoginModule class: org.jboss.as.security.remoting.RemotingLoginModule Will continue connection to Zookeeper server without SASL authentication, if Zookeeper server allows it.
37640 [main-SendThread(127.0.0.1:59676)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_11]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:712) ~[na:1.8.0_11]
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
38742 [main-SendThread(127.0.0.1:59676)] WARN org.apache.zookeeper.ClientCnxn - SASL configuration failed: javax.security.auth.login.LoginException: unable to find LoginModule class: org.jboss.as.security.remoting.RemotingLoginModule Will continue connection to Zookeeper server without SASL authentication, if Zookeeper server allows it.
Error 2
org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 6000
at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:880)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:98)
at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:84)
at kafka.server.KafkaServer.initZk(KafkaServer.scala:113)
at kafka.server.KafkaServer.startup(KafkaServer.scala:69)
at kafka.utils.TestUtils$.createServer(TestUtils.scala:118)
at com.testutils.kafka.KafkaTestServer.<init>(KafkaTestServer.scala:27)
at com.storm.Test.test(Test.java:55)
My standalone.xml
<security-domain name="other" cache-type="default">
<authentication>
<login-module code="Remoting" flag="optional">
<module-option name="password-stacking" value="useFirstPass"/>
</login-module>
<login-module code="RealmDirect" flag="required">
<module-option name="password-stacking" value="useFirstPass"/>
</login-module>
</authentication>
</security-domain>
I solved it by removing the authentication section, just use this.