我确实在 Ubuntu 16.04.4 LTS 上设置了一个新的 GitLab 实例。安装包很顺利,GitLab 似乎已启动并正在运行。然后我开始在 /etc/gitlab/gitlab.rb
中配置实例和设置 SMTP。之后我运行了 sudo gitlab-ctl reconfigure
。它失败并显示以下错误消息:
Starting Chef Client, version 13.6.4
Running handlers:
There was an error running gitlab-ctl reconfigure:
Unable to determine node name: configure node_name or configure the system's hostname and fqdn
Running handlers complete
Chef Client failed. 0 resources updated in 10 seconds
设置系统的主机名和fqdn:
$ hostname --fqdn
git-lab.dom
$ hostname
git-lab
Ohai 似乎成功读取了主机名、fqdn 和域:
$ /opt/gitlab/embedded/bin/ohai
[...]
"hostname": "git-lab",
"machinename": "git-lab",
"fqdn": "git-lab.dom",
"domain": "dom",
[...]
answer to a similar question建议在 /etc/chef/client.rb
中手动设置 node_name
。但是,gitlab omnibus 包似乎将 client.rb 放在其他地方。我也不愿意遵循这个建议,因为到目前为止我不必为其他 GitLab 安装做这件事对我来说似乎很奇怪。还有文档状态(强调我的):
node_name: The name of the node. Determines which configuration should be applied and sets the client_name, which is the name used when authenticating to a Chef server. The default value is the FQDN of the chef-client, as detected by Ohai. In general, Chef recommends that you leave this setting blank and let Ohai assign the FQDN of the node as the node_name during each chef-client run.
如何解决问题并继续配置我的新安装?
最佳答案
重启机器为我解决了这个问题。
关于chef-infra - gitlab-ctl 重新配置 : Unable to determine node name,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49528292/