GitLab was configured on Ali Cloud today, but the error 502 error kept coming up.
502
GitLab is not responding.
Please contact your GitLab administrator if this problem persists.
After searching for one afternoon, a mistake was finally found. It turned out that a Tomcat service was opened on the server and occupied port 8080, which made the Unicorn service of GitLab unable to be opened.
is finally modified as follows in /etc/gitlab/gitlab.rb
unicorn['port'] = 9090
Then gitlab-ctl reconfigure
restart the configuration so that the gitlab server is up and running.
Here, write down the general process of solving the problem, and count it as a good experience for yourself.
install GitLab, start service, 502 error found. This is the beginning of the search for solutions to various Baidu.
1. Find the /var/log/gitlab/nginx code> in the error log file, found the following error
/var/opt/gitlab/gitlab - rails/sockets/gitlab socket failed (2: No such file or directory)
, and then use the nc command to create the socket file, the final permission is set to SRWXRWXRWX
, users and groups are set to git:git, but found that this method does not work.
2. When I ran to the GitLab website to find a solution, https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
CTRL + f 502 find the official tutorial says 502 problems
Note that on a single-core server it may take up to a minute to restart Unicorn and Sidekiq. Your GitLab instance will give a 502 error until Unicorn is up again.
It is also possible to start, stop or restart individual components.
sudo gitlab-ctl restart sidekiq
Unicorn supports zero-downtime reloads. These can be triggered as follows:
sudo gitlab-ctl hup unicorn
Note that you cannot use a Unicorn reload to update the Ruby runtime.
Try using the above two commands and find that it doesn't work. When I got angry, I kept typing gitlab-ctl status
until I found that unicorn pid was getting bigger all the time. The PID for the other services has not changed.
3. Now we've almost found the problem -- unicorn's question. For the official tutorial, you can use gitlab-ctl tail unicorn
to track the unicorn's status. Unfortunately, when we discovered that port 8080 was occupied, the unicorn's status was reported to have been captured
E, [2015-02-11T17:27:57.818492 #26687] ERROR -- : adding listener failed addr=127.0.0.1:8080 (in use)
E, [2015-02-11T17:27:57.818621 #26687] ERROR -- : retrying in 0.5 seconds (4 tries left)
E, [2015-02-11T17:27:58.318902 #26687] ERROR -- : adding listener failed addr=127.0.0.1:8080 (in use)
E, [2015-02-11T17:27:58.318998 #26687] ERROR -- : retrying in 0.5 seconds (3 tries left)
E, [2015-02-11T17:27:58.819309 #26687] ERROR -- : adding listener failed addr=127.0.0.1:8080 (in use)
E, [2015-02-11T17:27:58.819423 #26687] ERROR -- : retrying in 0.5 seconds (2 tries left)
E, [2015-02-11T17:27:59.319954 #26687] ERROR -- : adding listener failed addr=127.0.0.1:8080 (in use)
E, [2015-02-11T17:27:59.320076 #26687] ERROR -- : retrying in 0.5 seconds (1 tries left)
4. Well, here's the problem. The choice then became whether to kill the original 8080 port service or to change the unicorn port. This depends on your specific needs. I've changed the unicorn port to 9090, and the method is the one described at the beginning.
Read More:
- About the problem I encountered: 226 transfer done but failed to open directory
- Gitlab service migration and gitlab administrator password retrieval
- To solve this problem, we can’t find the solution of / storage / emulated / 0 / file. I can’t. You can try this
- There are three ways to deal with the problem of vs (Visual Studio) 2017 flashback. I feel that none of them is the fundamental solution.
- I encountered a compilation error twice: crosses initialization of…
- Solving environment: failed solution to the problem encountered when updating Anaconda
- BarTender operation encountered the problem of “OLE DB encountered error 0x80004005”
- The first time I write OpenGL program, what should I do when I encounter “can’t open include file:” GL / glaux. H “: no such file or directory”?
- [unity problem] what should I do if I encounter ‘Global::’ already contains a definition
- MSDN I tell you new site next I tell you open invitation code registration! Today’s quota is 5000!
- git@gitlab invalid privatekey
- GitLab You are not allowed to push code to this project
- The problem encountered in pyinstaller packaging “failed to execute script × *”
- Using pop-up window and I18N, error in render: “typeerror: cannot read property” appears_ T ‘of undefined’ solution
- windows GitLab: PTY allocation request failed on channel 0
- DB2 encountered the problem of sqlcode = 911 lock table when updating record update
- Docker encountered a problem 4: yaml: Line 1: mapping values are not allowed in this context
- Raspberry pie 4B uses adafruit_ Pca9685 report error ioerror: [errno 121] remote I / O error solution
- In thinkphp5, we encountered the problem of class’ phpoffice / phpspredsheet / spreadsheet ‘not found
- Solve the problem of error loading MySQL DB module. Encountered during Django project