Showing posts with label Error executing action `run` on resource 'execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp]'. Show all posts
Showing posts with label Error executing action `run` on resource 'execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp]'. Show all posts

Monday, September 2, 2019

gitlab Error - execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp] (gitlab::selinux line 20) had an error: Errno::ENOENT: No such file or directory - semodule


While configuring gitlab if you get the above error, it means either the module semodule ( /usr/sbin/semodule) does not exist or the way you are configuring gitlab  does have access to execute the file /usr/sbin/semodule.
Are you using any cron or shell script to configure gitlab?
Because if you are configuring gitlab on terminal by user root, it is not possible you get this error if no respective module is corrupted.

Error executing action `run` on resource 'execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp]'
Solution :
gitlab has its own bin directory where it has all the necessary executable files.
Default Path of the directory is /opt/gitlab/bin. (You can find this path in gitlab configuration file i.e. /etc/gitlab/gitlab.rb)
Make a soft link for the file.
sudo ln -s /usr/sbin/semodule /opt/gitlab/bin

Now configure gitlab using same methid, you should not get the error.