gitlab-ctl reconfigure:无法确定节点名称

gitlab-ctl reconfigure: Unable to determine node name

我确实在 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",
[...]

建议在/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.

如何解决问题并继续配置我的新安装?

问题似乎是内存不足引起的。为虚拟机提供更多内存后,错误消失了。

重新启动机器已为我解决了这个问题。