Can't run gitlab using exising Nginx installation - ruby-on-rails

I have installed Gitlab through omnibus installation with existing NGINX installation. I was following the docs guide, installed Passenger using this guide (it also updated my installed nginx): https://www.phusionpassenger.com/library/install/nginx/install/oss/xenial/
Also i've updated /etc/gitlab/gitlab.rb to following settings:
external_url 'http://git.domain.kz'
nginx['enable'] = false
Here's the output of command sudo gitlab-ctl tail
https://pastebin.com/XKAwUY3U

Related

Gitlab as Docker won't start - no warnings, errors in the logs

I am a bit lost on this problem. I've been using Gitlab as Docker for some time now, but at some point it wouldn't boot up. All I get in the logs is this, with no errors or warnings:
Thank you for using GitLab Docker Image!
Current version: gitlab-ce=15.8.0-ce.0
Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
And restart this container to reload settings.
To do it use docker exec:
docker exec -it gitlab editor /etc/gitlab/gitlab.rb
docker restart gitlab
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
If this container fails to start due to permission problems try to fix it by executing:
docker exec -it gitlab update-permissions
docker restart gitlab
Cleaning stale PIDs & sockets
It seems you are upgrading from major version 14 to major version 15.
It is required to upgrade to the latest 15.0.x version first before proceeding.
Please follow the upgrade documentation at https://docs.gitlab.com/ee/update/index.html#upgrading-to-a-new-major-version
Thank you for using GitLab Docker Image!
Current version: gitlab-ce=15.8.0-ce.0
Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
And restart this container to reload settings.
To do it use docker exec:
docker exec -it gitlab editor /etc/gitlab/gitlab.rb
docker restart gitlab
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
If this container fails to start due to permission problems try to fix it by executing:
docker exec -it gitlab update-permissions
docker restart gitlab
Cleaning stale PIDs & sockets
It seems you are upgrading from major version 14 to major version 15.
It is required to upgrade to the latest 15.0.x version first before proceeding.
Please follow the upgrade documentation at https://docs.gitlab.com/ee/update/index.html#upgrading-to-a-new-major-version
Thank you for using GitLab Docker Image!
Current version: gitlab-ce=15.8.0-ce.0
Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
And restart this container to reload settings.
To do it use docker exec:
docker exec -it gitlab editor /etc/gitlab/gitlab.rb
docker restart gitlab
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
If this container fails to start due to permission problems try to fix it by executing:
docker exec -it gitlab update-permissions
docker restart gitlab
Cleaning stale PIDs & sockets
It seems you are upgrading from major version 14 to major version 15.
It is required to upgrade to the latest 15.0.x version first before proceeding.
Please follow the upgrade documentation at https://docs.gitlab.com/ee/update/index.html#upgrading-to-a-new-major-version
I tried to find other logs in the system with no luck. The recommended command to fix "update-permissions" didn't do the trick and I also started the container with sudo without success.
What can I try next?
Did a rollback to docker image 14.10.3-ce.0. After that I got weird databse errors. So I did (on Debian 11):
login in docker container
docker exec -it gitlab_web_1 /bin/bash
excuted all following commands to migrate the database
rm /var/opt/gitlab/postgresql/data/postmaster.pid
gitlab-rake gitlab:background_migrations:finalize[ProjectNamespaces::BackfillProjectNamespaces,projects,id,'[null\,"up"]']
gitlab-rake db:migrate
gitlab-ctl reconfigure
apt dist-upgrade
gitlab-ctl restart
or as one command:
rm /var/opt/gitlab/postgresql/data/postmaster.pid ; gitlab-rake gitlab:background_migrations:finalize[ProjectNamespaces::BackfillProjectNamespaces,projects,id,'[null\,"up"]'] && gitlab-rake db:migrate && gitlab-ctl reconfigure && apt dist-upgrade && gitlab-ctl restart
After that I could use my Gitlab again.

Nginx Install doesn't create /etc/rc.d/init.d/nginx

I'm installing Nginx using Passenger on an ubuntu server. I install Nginx using rvmsudo passenger-install-nginx-module but when I try to create a Nginx script using nano /etc/rc.d/init.d/nginx the directory rc.d does not exist. Any idea why?
I have the directories rc0.d through rc6.d but none of them have the init.d file in them. I'm following the Digital Ocean Tutorial
This is explained in detail in the Passenger documentation here: https://www.phusionpassenger.com/library/install/nginx/install/oss/rubygems_rvm/#note_about_nginx
The solution is to install Nginx from the Phusion Passenger APT repository, or to create an Nginx init script yourself.

Deploying Rails app using Nginx, Unicorn, Postgres and Capistrano to Digital Ocean : nginx eror

I have done all the steps by using this tutorial but while running below statement, I am getting the following error. I have created my Digital Ocean VPS host in port 3000.
$ sudo rm /etc/nginx/sites-enabled/default
$ sudo service nginx restart
* Restarting nginx nginx [fail]
$ sudo nginx -t
nginx: [emerg] "listen" directive is not allowed here in /etc/nginx/sites-enabled/hosting:1
nginx: configuration file /etc/nginx/nginx.conf test failed
Check for the solution here:
Nginx unknown directive "upstream" error when deploying Rails
That guy followed the same tutorial, and had the exact same problem. He also posted a solution.
Also, to avoid the issue altogether, you might consider using this plugin: https://github.com/bruno-/capistrano-unicorn-nginx

Gitlab hosting issue in linode VPS

I purchased a linode 1 GB plan recently. I have installed the basic LAMP stack on it.
I wanted to install gitlab on the server. I followed the documentation at: https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md
The documentation also says the official server is Nginx and I have got Nginx start with no issues.
Problem is when I start the gitlab service using:
sudo service gitlab start
I get:
rm: cannot remove `/home/git/gitlab/tmp/sockets/gitlab.socket': No such file or directory
bash: bundle: command not found
GitLab service started

Nginx configuration

When I run
sudo mate /opt/nginx/conf/nginx.conf
my nginx.conf file opens but is blank, what did i do wrong?
trying to deploy my rails app to a ubuntu 10.04 lucid with passenger, nginx, and REE
On which machine are you running "sudo mate ..."? If you're trying to deploy, you should be on the Ubuntu server. I suspect you're using a Mac for development and the command you've issued is to edit the local nginx installation on your Mac, not on the deployment server.
You can check where you are with command:
$ uname -a
Are you sure you're not looking for:
sudo nano /etc/nginx/nginx.conf
on your server?

Resources