通过Helm安装jFrog Artifactory,安装错误

时间:2019-03-05 20:23:37

标签: kubernetes artifactory kubernetes-helm

尝试安装:jFrog Artifactory HA 平台:CoreOS上的GCE kubernetes集群;硕士1人,工人2人 安装方法:Helm chart 掌舵步骤:

  1. 将jFrog存储库添加到本地头盔:helm repo add jfrog https://charts.jfrog.io
  2. 将许可证作为kubernetes秘密安装在群集中:kubectl create secret generic artifactory-cluster-license --from-file=./art.lic
  3. 通过头盔安装: helm install --name artifactory-ha jfrog/artifactory-ha --set artifactory.masterKey=,artifactory.license.secret=artifactory-cluster-license,artifactory.license.dataKey=art.lic

结果:

头盔的安装毫无疑问。已检查的服务似乎还不错,LoadBalancer处于待处理状态,并且已联机。

经检查的PV和PVC似乎很好并且有约束力:

NAME STATUS artifactory-ha-postgresql Bound volume-artifactory-ha-artifactory-ha-member-0 Bound volume-artifactory-ha-artifactory-ha-primary-0 Bound

检查了吊舱,仅准备了postgres:

NAME READY STATUS RESTARTS AGE artifactory-ha-artifactory-ha-member-0 0/1 Running 0 3m artifactory-ha-artifactory-ha-primary-0 0/1 Running 0 3m artifactory-ha-nginx-697844f76-jt24s 0/1 Init:0/1 0 3m artifactory-ha-postgresql-676999df46-bchq9 1/1 Running 0 3m

等待几分钟,没有任何变化。等待了2个小时,仍然保持与上述相同的状态。已检查artifactory-ha-artifactory-ha-primary-0窗格的日志(很长,但是我可以发帖是否可以帮助任何人确定问题),但指出了此错误:

SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file。我想不起来还要在哪里检查日志。服务正在运行,其他吊舱似乎正在该主吊舱上等待。

日志以SEVERE: Context [/artifactory] startup failed due to previous errors继续,然后在“ ACCESS” ASCII码之后开始喷洒Java堆栈转储,消息诸如WARNING: The web application [artifactory] appears to have started a thread named [Thread-5] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:

我最终将集群留了一整夜,现在,大约12个小时后,我很惊讶地看到“主”吊舱确实已经上线了:

NAME READY STATUS RESTARTS AGE artifactory-ha-artifactory-ha-member-0 1/1 Terminating 0 19m artifactory-ha-artifactory-ha-member-1 0/1 Terminating 0 17m artifactory-ha-artifactory-ha-primary-0 1/1 Running 0 3h artifactory-ha-nginx-697844f76-vsmzq 0/1 Running 38 3h artifactory-ha-postgresql-676999df46-gzbpm 1/1 Running 0 3h

但是,nginx容器没有。最终,它成功完成了init容器命令(until nc -z -w 2 artifactory-ha 8081 && echo artifactory ok; do),但无法通过其准备情况调查: Warning Unhealthy 1m (x428 over 3h) kubelet, spczufvthh-worker-1 Readiness probe failed: Get http://10.2.2.45:80/artifactory/webapp/#/login: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

也许我错过了设置或头盔安装开关中的某些必需步骤?这是我第一次尝试设置jFrog Artifactory HA,我注意到大多数说明似乎都是针对裸机集群的,所以也许我感到有些困惑。

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

原来,我们搞砸了两件事,并对安装过程的工作方式有一些误解。也许这会对将来的人们有所帮助。

1)masterKey的值必须至少为16个字符。我们最初尝试的密钥太短。我们尝试再次安装,并将这个新的masterKey写成一个秘密,但是...

2)机密信息的值似乎在初次安装尝试时被读取一次,然后将其写入永久卷,并在此之后更新机密信息似乎无效。

3)我们还不了解许可证密钥的格式和约束。对于将要运行Artifactory的每个节点,您都需要一个许可证,并且所有许可证都放入一个文件中,每个许可证之间用两行返回/换行分隔。

这些错误日志对我们几乎没有帮助。我们最终清除了安装,包括PV,最后一切正常。