Bash: gitlab-ctl: command not found

Hi,

I’ve had to provision a new serer for our GitLab-ce implementation. The new server is RHEL 8. I’ve had no issues setting up the repo and installing any version. However, after the nth attempt, I need to reach out for assistance.

Having changed the URL I’ve attempted to run gitlab-ctl reconfigure, only to be given the error “bash: gitlab-ctl: command not found”
No matter if I’m running as sudo or as my account and using sudo before the command, this will not work. I can navigate to /opt/gitlab/bin/ and run the command but it still gives the same error.

image

I have an existing gitlab-ce instance running and never had this problem (although that was several years ago now).

I cannot fathom why this does not work, does anyone have any ideas?

Cheers,

Security Profile chosen during installation by any chance? You can also find gitlab-ctl under /usr/bin - if it doesn’t exist there, then something is awry with your installation. If it is there, it would suggest some security profile chosen during installation is causing all your problems.

Cheers @iwalker ,

Interesting… as you say, it should exist in /usr/sbin but it does not. There were no issues reported during the install. I’ll ask out Linux team if they’ve selected a security profile though.

Rather /user/bin at least on my EL systems this is where it is, symlinked to what is under /opt/gitlab.

[root@gitlab ~]# file /usr/bin/gitlab-ctl 
/usr/bin/gitlab-ctl: symbolic link to /opt/gitlab/bin/gitlab-ctl

There is every possibility that a security profile stopped this link from being created. I know I install mine without using a security profile, but I have seen weird things happen when security profiles are chosen during installation. So it’s really the first thing that comes to my mind. I don’t see this being an selinux problem, since I have selinux enabled.

Hey @iwalker ,

Yeah, its definitely /usr/bin on my RHEL servers. I checked my current working instance and I can see three gitlab-ctl (/usr/bin/gitlab-ctl, /usr/sbin/gitlab-ctl, /opt/gitlab/bin/gitlab-ctl) and also a symlinked from /opt/gitlab/bin/ to /usr/bin/gitlab-cli. I may have created that, not sure, it was some time ago.

I’ll follow up with our admins and if push comes to shove I may just have to symlink it but would rather it installed correctly.

1 Like