I was able to partially configure Gitlab on a Linux CentOS server with Apache, Git, PHP, PostGreSQL and MySQL. I am launching the chef version of the chef . I got rpm from here . I wanted to use it to manage the Git repository better and visually, and it seemed like a good choice. But now I am facing problems that make it work.
Just so that it really works and updates all the files, I decided to restart the configuration using gitlab-ctl reconfigure . The second run worked:
Chef Client finished, 4 resources updated gitlab Reconfigured!
See full magazine
The host has already set NGINX to 8080 so as not to enter into an argument with Apache running on port 80, where we run the LAMP project. But now the Ruby Unicorn web server seems to be contrary to NGINX. I worked with NGINX a bit, not so much, and this is my first hit in Gitlab. In any case, this is what I found out with the help of my hoster.
When I enter testerver.domain.net and pass the following command:
netstat -ln |grep 8080 I see
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN
So, something works on 8080 According to my hoster, it should work on 0.0.0.0:8080. And when we check what works on this port, we see
netstat -tupln |grep 8080 tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 21627/unicorn maste
When we check the process ID 21627, we see that
cat /proc/21627/cmdline unicorn master -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
This is a Ruby process, not an NGINX process.
So NGINX seems to conflict with Unicorn.
And when we check the nginx logs, we see that nginx cannot exit because of this:
tail -f /var/log/gitlab/nginx/error.log 2014/07/28 09:43:10 [emerg] 23122
I googled Unicorn.rb and found the link. I also read that:
Unicorn is an HTTP server for Rack applications designed only to serve fast clients with low latency, high-speed connections and the advantage of features in Unix / Unix-like kernels. Slow clients should only be served by hosting a reverse proxy server, capable of fully buffering both the request and the response between Unicorn and slow clients.
When I check the file /var/opt/gitlab/gitlab-rails/etc/unicorn.rb , I see that it uses 8080. The problem is that it seems that Unicorn should work with NGINX, so maybe I donβt should change the port.
What step should I take to get Gitlab to work? Can Gitlab work without Unicorn? I would not have thought. Should I then choose a different port for it, or perhaps for NGINX?