我已在Windows Server 2012 r2上设置了具有kerberos身份验证的Active目录,在第二台计算机上设置了mongodb服务器。使用GSSAPI身份验证启动mongodb,现在如果我尝试使用以下URL连接到mongodb
mongo.exe --host Mongo32Test.ihubtest.com.com --authenticationMechanism = GSSAPI --authenticationDatabase = $ external -u mongoService@ihubtest.com --verbose
我收到以下消息。
错误:SASL(-1):泛型失败:SSPI:InitializeSecurityContext:指定的目标未知或无法访问
我已经安装了wireshark,数据包中包含此消息
“KRB5 167 KRB错误:KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN”
搜索我认为它与服务原则名称相关 mongoService@ihubtest.com是域用户,是mongodb中$ external数据库的一部分。
验证了服务原则名称,看起来很好。
C:> setspn -l mongoService CN = mongo服务的注册ServicePrincipalNames,CN = Users,DC = ihubtest,DC = com:
mongodb/Mongo32test.ihubtest.com@IHUBTEST.COM
尝试了此页面中提到的问题排查步骤https://docs.mongodb.com/manual/tutorial/troubleshoot-kerberos/,我是否遗漏了Active Directory配置中的内容?
答案 0 :(得分:1)
如果尚未查看此票据,MongoDB团队已经关闭了一些步骤
答案 1 :(得分:0)
我相信你错误地将你的主机名称改为“Mongo32Test.ihubtest.com.com”而不是“Mongo32Test.ihubtest.com”。
请验证提供的主机名是否正确