sasl配置失败:在arquillian集成测试中找不到remotingloginmodule

gkn4icbw  于 2021-06-08  发布在  Kafka
关注(0)|答案(1)|浏览(476)

我正在尝试连接到kafatestserver以运行storm拓扑。
我正在运行一个arquilian集成测试,我不断得到这个错误。
不确定为什么jaas.conf失败,以及它为什么找不到remotingloginmodule类。
当我尝试登录时,我的凭据为空,用户名为空。

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)

我的独立.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>
bqf10yzr

bqf10yzr1#

我通过删除认证部分解决了这个问题,只需使用这个。

<security-domain name="other" cache-type="default"></security-domain>

相关问题