GitLab on Synology 412+ "502 too much time to respond"

Hello All,

Background:

  1. I am running a Synology 412+ with DSM 6.1.4-15217 Update 5
  2. I installed Docker and GitLab from the package manager.
  3. I then, incorrectly so, installed GitLab again (atop/parallel with the package manger install) from here https://hub.docker.com/r/sameersbn/gitlab/#prerequisites thinking I was getting the latest version than what Synology made available. This actually worked albeit painfully slow.
  4. I uninstalled all the above, Docker, GitLab, MariaDB, etc… and started over with only the Synology package.

I would like to mention that this was my first exposure to Docker and containers as well as any Git/GitLab admin so I am still learning about them thus I claim to understand very little at the moment.

After the fresh install I get the “502 too much time to respond” error. When I log on to the GitLab container and run

tail -f /var/log/gitlab/gitlab/unicorn.stderr.log

It outputs the following:

    from /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/bin/unicorn_rails:209:in `<top (required)>'
    from /home/git/gitlab/vendor/bundle/ruby/2.3.0/bin/unicorn_rails:22:in `load'
    from /home/git/gitlab/vendor/bundle/ruby/2.3.0/bin/unicorn_rails:22:in `<main>'
    I, [2018-01-12T15:33:58.477934 #976]  INFO -- : Refreshing Gem list
    I, [2018-01-12T15:40:18.963037 #976]  INFO -- : listening on addr=/home/git/gitlab/tmp/sockets/gitlab.socket fd=22
    I, [2018-01-12T15:40:29.326164 #976]  INFO -- : listening on addr=127.0.0.1:8080 fd=25
    I, [2018-01-12T15:40:36.106423 #976]  INFO -- : master process ready
    I, [2018-01-12T15:40:36.523794 #991]  INFO -- : worker=0 ready
    I, [2018-01-12T15:40:36.523793 #994]  INFO -- : worker=1 ready
    I, [2018-01-12T15:40:36.524014 #997]  INFO -- : worker=2 ready

Any guidance would be highly appreciated.

Cheers,

Wess

I too am having the same problem. I have tried to install Gitlab first using the installer and that installed Docker, Maria10 and yielded a 502 page. I then uninstalled all and installed each separately so that I could see what was going on and collect the user/admin names/passwords. That too yielded a 502 page.

I tried to view the log using the command you provided and I was told the file does not exist. Checked the path contents and it doesn’t. The install failed somewhere, perhaps there is an installation log? I’ll keep looking and trying.

Good luck,
Paul

Hey Paul,

I have made some headway on this since I posted this. Here are some steps that I took:

  1. Upgraded the memory of my DS412+ from 1GB to 4GB. I think this was critical. Some web references state that the minimum is 1GB for GitLab but it ran so slow so maybe untrue for a “Dockerized GitLab” which needs more memory. I am unsure but it may be possible that the memory size was related to the 502 error if the “Gitlab Server” cannot get all the memory it needs in time to do its thing.

  2. I installed the official Synology Docker package.

  3. I removed the official Synology GitLab package along with the Maria10 DB.

  4. I installed the sameersbn image from WITHIN the Synology Docker registry. If you open Docker from the DS admin/application area you will find a registry with Docker images galore. You can launch those images as “containers” once you have downloaded them. You will need three packages minimum which are sameersbn_gitlab, sameersbn_postgresql, and sameersbn_redis. There is a link within the registry attached with each image. If you click on the sameersbn gitlab link it will take you to the step by step instructions for setup which was not really straight forward for me but I now have GitLab up and running.

  5. Note that it does take about 5 minutes for the “Gitlab Container to Boot” so even with the memory upgrade I have to wait a long time until GitLab is actually responsive to web requests. You will get the 502 error when trying to access GitLab if it is not fully up and running.

I am still trying to figure out how to get Gitlab to send secure email via port 587 with my email host provider. I got it working over the unsecured port (non SSL) but its unclear to me whether port 587 is internal to the container or whether it needs to be opened up on the router. I installed a certificate from Letsencrypty using the Synology security features and I have a HTTPS connection with my diskstation and with gitlab using the diskstation’s reverse proxy but I do not know if this is the best setup. If I understand this setup correctly the HTTPS connection is secure between the web and the diskstation but then the encryption is lost between the diskstation and the container (NGINX is taking care of encryption/decryption maybe?).

The biggest challenge has been that no two references document or discuss the same setup. Much to learn. Feel free to reach out if you decide you want to go down this path. I am happy to share details if needed.

PS: Did you attach to the running Gitlab container and then run the command? To attach to a running container the command can look something like this from a Diskstation terminal i.e. SSH etc…:

sudo docker exec -it synology_gitlab bash

sudo docker exec -it your_GitLab_container_name bash

This “logs you onto” the container and will get you a command line “on the container” which will allow you to poke around at logs and see directory structures etc… for the container itself.

Cheers,

Wess