1

Trying to use a recent version of gitlab, I'm despairing somewhat with its configuration process (or rather that of its "embedded packages").

I have installed the gitlab-omnibus package (version 7.4.3) on my Ubuntu server 14.04, which is also running an apache for other stuff; therefore I want to change the port that gitlab is running under.

Supposedly it can all be done through editing /etc/gitlab/gitlab.rb, by adding the port number at the end, like so:

external_url='http://myurl:myport'

and then running

sudo gitlab-ctl reconfigure

Well, that doesn't work. nginx still wants to connect to port 80, as a

gitlab-ctl tail nginx

spews out:

date&time [emerg] 31321#0: bind() to 0.0.0.0:80 failed (98: Address already in use)

Searching the web, I have found numerous mentions of such problems, and numerous files which should be edited (see e.g. this other question: https://serverfault.com/a/587800/151655). The only thing I found so far that actually worked somewhat was changing the port in the file /var/opt/gitlab/nginx/conf/gitlab-http.conf; but apparently this change only lasts until the next run to gitlab-ctl reconfigure. So is there some way to make this change stick, or do I need to avoid running gitlab-ctl reconfigure or do the manual adaptation everytime again?

By the way I find it very irritating that even though the actual binding of the network port fails, gitlab-ctl start isn't reporting anything out of the ordinary at all (just as if everything worked normally). Am I missing something here or is this just very bad usability?

1

There's a simple answer it seems - I initially had changed the /etc/gitlab/gitlab.rb because of some error in gitlabctl reconfigure ; however the current syntax wasn't right (but apparently ignored, and not causing errors); I was using external_url='http://myurl:myport', but apparently

external_url "http://myurl:myport"

has to be used, then it works!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.