gitlab-ctl reconfigure: Unable to determine node n

2019-07-23 16:04发布

I did setup a new GitLab instance on Ubuntu 16.04.4 LTS. Installing the package went fine and GitLab seems to be up and running. I then started to configure the instance and setup SMTP in /etc/gitlab/gitlab.rb. Afterwards I ran sudo gitlab-ctl reconfigure. It failed with the following error message:

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

The system's hostname and fqdn are set:

$ hostname --fqdn
git-lab.dom
$ hostname
git-lab

Ohai seems to to successfully read hostname, fqdn and domain:

$ /opt/gitlab/embedded/bin/ohai
[...]
"hostname": "git-lab",
"machinename": "git-lab",
"fqdn": "git-lab.dom",
"domain": "dom",
[...]

The answer to a similar question suggested to manually set the node_name in /etc/chef/client.rb. However, the gitlab omnibus package seems to put the client.rb somewhere else. I am also reluctant to follow this advice since it seems strange to me that I did not have to do it for other GitLab installations so far. Also the docs state (emphasis mine):

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.

How can I solve the issue and continue configuring my new installation?

2条回答
啃猪蹄的小仙女
2楼-- · 2019-07-23 16:54

Restarting the machine has resolved this issue for me.

查看更多
等我变得足够好
3楼-- · 2019-07-23 16:59

The problem seems to be caused by insufficient memory. After giving the virtual machine more memory the error went away.

查看更多
登录 后发表回答