I am trying configure BitNami GitLab Stack 5.1.0-2 with LDAP
Then ran into problem
Could not authorize you from Ldap because “Server 192.168.133.100 refused connection on port 389”.
where 192.168.133.100 is actually gitlab server itself.
I change /opt/bitnami/apps/gitlab/htdocs/config/gitlab.yml
to have
ldap:
enabled: true
host: '192.168.1.14'
, but after reboot
or GitLab restart, it is back to 192.168.133.100. That is bug!
How to make BitNami GitLab Stack not to do that?
How to restart GitLab for changed gitlab.yml to take effect? ->
sudo /opt/bitnami/ctlscript.sh restart gitlab_sidekiq
https://github.com/gitlabhq/gitlabhq/issues/3934
UPDATE Renaming /opt/bitnami/apps/gitlab/updateip
doesn't solve the problem.
UPDATE 2: Problem still exists on 5.4.0-0
sudo chmod -x /etc/init.d/bnconfig-gitlab
helps.
Even in version 6.2.0.0 there isn't any proper procedure for using a static IP or FQDN. I am using my own bind servers, with full reverse records for my bitnami gitlab servers local IP. (since im vpn in, and inside a vpc) This solution should work in any environment. This solution isn't as advanced as all the text would indicate. I just wanted to make sure i gave enough background on the problem.
Apparently the init.d script "/etc/init.d/bitnami" first loads needed/used bash functions from "/opt/bitnami/scripts/init/functions". Then the init.d (bitnami) script executes "/opt/bitnami/var/init/pre-start/" scripts located in this folder (executed by sort order of filenamed ie 010, 020, 030 etc). Then executes "/opt/bitnami/ctlscript.sh start". This starts up the majority, if not all, needed stuff for bitnami gitlab to function.
If the "/opt/bitnami/ctlscript.sh" script returns 0 ($?==0), which means success! The init.d (bitnami) script executes "/opt/bitnami/var/init/post-start/" scripts located in this directory once again by sort order. Inside the post-start directory contains the script "020_update_ip".
Long story short (sparing you from all the function info) bitnami does a lot of redundant stuff (functions) in order to decide what to use as the 'host address'. It uses a total of four functions, with varying return values. It also queries bitnami's own servers to find out your public IP. My server is inside a VPC has an Elastic IP, and an FQDN for its local IP. Their system pretty much always decides to use the Reverse public PTR DNS name for my Elastic IP. Which would always be worn, and they sure love to use your AMZ public dns.
I sorted out all the crazy non functional detection logic (that makes crazy asumptions about your environment and added the following logic to "/opt/bitnami/var/init/post-start/020_update_ip". I added an extra elif condition for, to find out if you have declared $GITLABHOST in your environment. And if so to use the value as the PUBLIC_IP. So when the script runs updateip|bnconfig it will use the provided value from $GITLABHOST.
"/opt/bitnami/var/init/post-start/020_update_ip" >
I then added the following into "/opt/bitnami/scripts/setenv.sh"
I added this here so that it is fully integrated into Bitnami Gitlab 6.2, as to not worry about its existance. Since it is loaded by "/opt/bitnami/ctlscript.sh" (. "$INSTALLDIR/scripts/setenv.sh") before the post-start scripts. Other may want to put it somewhere else. Make sure you provide a valid host/ip address :)
It not closed yet
/opt/bitnami/apps/gitlab/updateip --machine_hostname your_dns.name
This not solved the problem yet, I think there a bug. I'm using version Bitnami - Gitlab 5.2.1
In /etc/init.d/bnconfig-gitlab It call to /opt/bitnami/apps/gitlab/bnconfig (instead of updateip, updateip only a link to bnconfig), so when you remove/rename updateip, there is no effect, it still reset your hostname.
Solution
This may be due to the "updatetip" script which is started on ever reboot and changes configuration files to reflect changed IP address (which can be useful for cloud hosting).
Ad the documentation says you should remove or rename /opt/bitnami/apps/gitlab/updateip if you're using static IP address.
Before doing this you may wish to run
Have you tried the following to disable the bncofnig-gitlab service instead of renaming files?
or