Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kubernetes 无法从Ldapmain对您进行身份验证,因为;无效的凭据(<;用户名>"E;”Gitlab社区版通过Helm Chart安装_Kubernetes_Ldap_Gitlab_Kubernetes Helm_Gitlab Ce - Fatal编程技术网

Kubernetes 无法从Ldapmain对您进行身份验证,因为;无效的凭据(<;用户名>"E;”Gitlab社区版通过Helm Chart安装

Kubernetes 无法从Ldapmain对您进行身份验证,因为;无效的凭据(<;用户名>"E;”Gitlab社区版通过Helm Chart安装,kubernetes,ldap,gitlab,kubernetes-helm,gitlab-ce,Kubernetes,Ldap,Gitlab,Kubernetes Helm,Gitlab Ce,我有,但是我们的广告用户不能登录到这个平台。登录UI中显示以下错误:无法从Ldapmain对您进行身份验证,因为“userX的凭据无效”(但是凭据正常!) 安装: helm upgrade --install gitlab gitlab/gitlab --namespace my-ns --tiller-namespace tiller-ns --timeout 600 --set global.edition=ce --set global.hosts.domain=example.com

我有,但是我们的广告用户不能登录到这个平台。登录UI中显示以下错误:
无法从Ldapmain对您进行身份验证,因为“userX的凭据无效”
(但是凭据正常!)

安装

helm upgrade --install gitlab gitlab/gitlab --namespace my-ns --tiller-namespace tiller-ns  --timeout 600 --set global.edition=ce --set global.hosts.domain=example.com --set global.hosts.externalIP=<ExternalIPAddressAllocatedToTheNGINXIngressControllerLBService> --set nginx-ingress.enabled=false --set global.ingress.class=mynginx-ic --set certmanager.install=false --set global.ingress.configureCertmanager=false --set gitlab-runner.install=false --set prometheus.install=false --set registry.enabled=false --set gitlab.gitaly.persistence.enabled=false --set postgresql.persistence.enabled=false --set redis.persistence.enabled=false --set minio.persistence.enabled=false --set global.appConfig.ldap.servers.main.label='LDAP' --set global.appConfig.ldap.servers.main.host=<IPAddressOfMyDomainController> --set global.appConfig.ldap.servers.main.port='389' --set global.appConfig.ldap.servers.main.uid='sAMAccountName' --set global.appConfig.ldap.servers.main.bind_dn='CN=testuser,OU=sampleOU3,OU=sampleOU2,OU=sampleOU1,DC=example,DC=com' --set global.appConfig.ldap.servers.main.password.secret='gitlab-ldap-secret' --set global.appConfig.ldap.servers.main.password.key='password' 
-我之前为配置为bind_dn的用户创建了一个密码(“CN=testuser,OU=sampleOU3,OU=sampleOU2,OU=sampleOU1,DC=example,DC=com”)。密码使用base64编码,如中所示

文件:gitlab-ldap-secret.yaml

apiVersion: v1  
kind: Secret  
metadata:  
 name: gitlab-ldap-secret  
data:  
 password: encodedpass-blablabla 
-在图表安装期间,我没有在命令行中提供所有这些参数,而是尝试在提供的各种values.yaml中配置所有参数,但为了复制目的,在这里以这种方式记录似乎更容易

-我尝试添加这些参数,但没有成功:

--set global.appConfig.ldap.servers.main.encryption='plain'  
--set global.appConfig.ldap.servers.main.base='OU=sampleOU1,DC=example,DC=com'  
-为了更简单,我们不考虑任何组件的持久性。这就是为什么这些都设置为false:

--set gitlab.gitaly.persistence.enabled=false  
--set postgresql.persistence.enabled=false  
--set redis.persistence.enabled=false  
--set minio.persistence.enabled=false   
*我确实需要持久性,但这次让我们只关注LDAP身份验证,这是我目前的主要问题

-我已经和我的系统管理员核实过了,我们在Active Directory中使用了普通389。不加密

我的环境

kubectl.exe version  
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.1", GitCommit:"4485c6f18cee9a5d3c3b4e523bd27972b1b53892", GitTreeState:"clean", BuildDate:"2019-07-18T09:18:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"windows/amd64"}  
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.1", GitCommit:"4485c6f18cee9a5d3c3b4e523bd27972b1b53892", GitTreeState:"clean", BuildDate:"2019-07-18T09:09:21Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}  

helm version  
Client: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}  
Server: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}  

helm ls --tiller-namespace tiller-ns  
NAME                    REVISION        UPDATED                         STATUS          CHART                   APP VERSION     NAMESPACE
gitlab                  1               Tue Oct 29 18:16:06 2019        DEPLOYED        gitlab-2.3.7            12.3.5          my-ns

kubectl.exe get nodes
NAME                                    STATUS   ROLES    AGE     VERSION
kubernetes01.example.com                Ready    master   102d    v1.15.1
kubernetes02.example.com                Ready    <none>   7h16m   v1.15.1
kubernetes03.example.com                Ready    <none>   102d    v1.15.1
kubernetes04.example.com                Ready    <none>   11d     v1.15.1
现在,如果我尝试使用LDAP用户登录,就会出现前面提到的错误。如果我进入独角兽舱,我可以在
/var/log/gitlab/production.log
中看到以下消息:

我错过了什么?我还需要配置其他东西吗?我已经为上面提到的LDAP身份验证配置了所有参数,但在尝试身份验证时仍然遇到问题

很抱歉,我是Gitlab及其所有内部组件的新手。我似乎找不到编辑此文件的位置,例如:
/etc/gitlab/gitlab.rb
(我应该在哪个pod中输入?我逐字输入了每个pod,但没有找到此配置文件)。另外,我注意到一些文档说可以执行一些诊断工具,例如
gitlab-rake
gitlab:ldap:check
,或者可以执行
gitlab-ctl-reconfigure
,但是。。。。在哪里运行这些??在独角兽舱上?gitlab shell?我注意到各种Gitlab文档页面引用了其中一些用于故障排除的工具,但我不认为此图表遵循相同的体系结构

例如,我已经查找了,因为它似乎是相同的问题,但我找不到
/etc/gitlab/gitlab.rb


任何帮助都将不胜感激。我已经有几个星期没有处理这个问题了。

我忘了回答这个问题。通过再次添加基本参数,我成功地解决了这个问题

正如我在最初的帖子中所解释的那样,我已经在尝试这一点,但结果证明我需要避开逗号:

--set global.appConfig.ldap.servers.main.base='OU=sampleOU1\,DC=example\,DC=com'
*与绑定dn一样,需要转义逗号

多亏了LDAP诊断工具gitlab rake,我才意识到这一点,这在这个helm图表中有点不同。您必须进入unicorn容器上的
/srv/gitlab
目录,并执行
/bin/rake gitlab:ldap:check
。这有助于我了解问题所在。您还可以检查
/srv/gitlab/config/gitlab.yaml
文件,查看LDAP参数是否已成功加载/解析

您还可以运行以下命令来查看有关Gitlab部署的更多信息:
/bin/rake Gitlab:env:info

kubectl.exe get pods
NAME                                                   READY   STATUS      RESTARTS   AGE
gitlab-gitaly-0                                        1/1     Running     0          65m
gitlab-gitlab-exporter-5b649bfbb-5pn7q                 1/1     Running     0          65m
gitlab-gitlab-shell-7d9497fcd7-h5478                   1/1     Running     0          65m
gitlab-gitlab-shell-7d9497fcd7-jvt9p                   1/1     Running     0          64m
gitlab-migrations.1-gf8jr                              0/1     Completed   0          65m
gitlab-minio-cb5945f79-kztmj                           1/1     Running     0          65m
gitlab-minio-create-buckets.1-d2bh5                    0/1     Completed   0          65m
gitlab-postgresql-685b68b4d7-ns2rw                     2/2     Running     0          65m
gitlab-redis-5cb5c8b4c6-jtfnr                          2/2     Running     0          65m
gitlab-sidekiq-all-in-1-5b997fdffd-n5cj2               1/1     Running     0          65m
gitlab-task-runner-5777748f59-gkf9v                    1/1     Running     0          65m
gitlab-unicorn-764f6548d5-fmggl                        2/2     Running     0          65m
gitlab-unicorn-764f6548d5-pqcm9                        2/2     Running     0          64m
--set global.appConfig.ldap.servers.main.base='OU=sampleOU1\,DC=example\,DC=com'