[Support] GitLab-CE


249 posts in this topic Last Reply

Recommended Posts

On 9/6/2020 at 8:55 PM, 062bel313 said:

Gitlab docker:
I was able to make the docker run. It was file permission issue and now after I corrected it, everything works, except for LFS; I get this error

image.png.b237409b2487a1e68537b3a37e017a12.png

 

In the error, I can see the docker is using "unraid" as hostname, but for my system it should have been "meroUNRAID". I tried passing -e hostname 'meroUNRAID', but the Gitlab is still looking for the unraid. While initializing the docker, I see HOST_OS = "Unraid". Not sure how to pass my own host name. Changing the hostname file inside /etc/hostname also didn't fix. Any help?

You can change the url in the Docker Container Config as Extra Parameters (advanced view): --env GITLAB_OMNIBUS_CONFIG="external_url ' YOUR URL  ( Example: http://192.168.1.22:1234) '"

Default is http://unraid:9080

 

It will set the url for your GitLab server and use it in the App. Also as the clone url.

 

You also could set your local DNS to map "unraid" to your unraid ip address. I use pihole to block ads and set local DNS settings.

Edited by andr0id
Link to post
  • Replies 248
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Thanks to thomast_88 for setting up this docker    I've set it up and muddled through learning git at the same time and just wanted to post a config I've came up with to let you use the "Linu

I've got this in my nginx config (in proxy-confs/gitlab-ce.subdomain.conf): server { listen *:80; server_name registry.subdomain.duckdns.org; server_tokens off; return 301 https://$http_h

GitLab Community Edition docker image based on the Omnibus package. I just created a template for this. It's pretty easy to get up and running, as this docker contains all necessary dependencies alrea

Posted Images

3 hours ago, andr0id said:

You can change the url in the Docker Container Config as Extra Parameters (advanced view): --env GITLAB_OMNIBUS_CONFIG="external_url ' YOUR URL  ( Example: http://192.168.1.22:1234) '"

Default is http://unraid:9080

 

It will set the url for your GitLab server and use it in the App. Also as the clone url.

 

You also could set your local DNS to map "unraid" to your unraid ip address. I use pihole to block ads and set local DNS settings.

Thank you andr0id, the environment variable helped. It is working now. I have installed pi-hole on my unraid, but need time to learn the DNS stuff.

 

Thank you again.

 

 

Link to post
  • 4 weeks later...

Hi,

 

I tried to install few times this docker container into my unraid, but always a have the same error:

 

 

[0m[0m
Running handlers:[0m
There was an error running gitlab-ctl reconfigure:

bash[migrate gitlab-rails database] (gitlab::database_migrations line 55) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20200930-27-71fnfu" ----
STDOUT: rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"?
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:53:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:db:configure
(See full trace by running task with --trace)
STDERR:
---- End output of "bash" "/tmp/chef-script20200930-27-71fnfu" ----
Ran "bash" "/tmp/chef-script20200930-27-71fnfu" returned 1

Running handlers complete
[0mChef Infra Client failed. 9 resources updated in 15 seconds[0m

 

***I tried to start up the docker few times, i tried to reinstall and the same result. Someone have a idea that's hapen.

***Unraid version 6.8.3

 

Regards

 

gitlab1.PNG

gitlab2.PNG

Link to post

I'm trying to get emails working on the latest gitlab build.

I have added Container Variables in its docker settings with key/value pairs that look like this:

- GITLAB_EMAIL=gitlab@local.host
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=587
- SMTP_USER=youremail@gmail.com
- SMTP_PASS=yourpassword
- SMTP_STARTTLS=true
- SMTP_AUTHENTICATION=login

When I try to send confirmation emails, nothing comes through. I don't see anything in the logs that could point to there being a problem.

Anyone else run into this problem?

Link to post

So I've had this docker for a long time. But eventually, like months, it will just shut itself off with no warning and no visible errors. I've lost data before because I had to delete and reinstall and setup. I cannot use the same configuration as last time. Once set up, the docker works and everything goes off like normal....until it breaks again. Each time this happens, I try to update it and that doesn't fix anything and it makes no difference. When it's in this state, I start the docker, I can access for about 4 seconds then it shuts off. This has been going on the same way for years. Any idea?

Link to post

I was getting the same permissions issue and the fix for me was to start the container and before it shuts down put this command in your terminal

 

docker exec -it gitlab chmod -R 2770 /var/opt/gitlab/git-data/repositories

 

This allowed the container to start properly.

Link to post
On 10/15/2020 at 3:42 PM, Snipe3000 said:

Does anyone out there have email support working?

I just got gmail based SMTP working today.  If you check the production.log for your install you will likely find password failures in there from Gmail.  The trick is that you need to understand that Gmail considers GitLab-CE to be a "less secure app" and will automatically block any login attempts from it *unless* you configure your gmail account to allow "less secure apps" to connect.  In my case, I'd created a new gmail account for it but had not enabled less secure apps.  As soon as I did, email started flowing normally.

Edited by M2Pilot
Link to post

I am tearing my hair out trying to actually access the GitLab CE instance from a development workstation.  Accessing the WebUI via unraid works fine - I can peruse the settings the live long day.  As I mentioned above, I even have emails being sent for new users now.  But actually trying to connect via a git command line, as it shows for the project I set up in the WebUI just isn't happening for me.  I follow the command lines to the letter, but always get a login failure when I try to push to master:

 

git@unraid: Permission denied (publickey,password,keyboard-interactive).
fatal: Could not read from remote repository.

 

I am completely baffled why this is not working for me.  Any can set me straight?

Link to post
  • 2 months later...
On 10/6/2020 at 9:33 PM, Hernaldo said:

Hi Thor, 

 

Sorry, I don't find any solution yet.

 

I've run into the same problem. I've found some references online to others with this issue, but nothing that talks about recovery. For example, https://serverfault.com/questions/1024377/gitlab-docker-error-on-database-migration-after-update-restart-loop shows exactly this error and has a link to instructions on how to manually upgrade PostgreSQL, but it requires a working docker container. And I can't figure out how to roll back or select an older version of the container with hopes that it will come up. If anyone know how to do that, I can poke around.

 

I do have git clones of the repo in my docker, but I don't really want to reset the docker and have to repopulate it from scratch.

Link to post
43 minutes ago, rbroberts said:

And I can't figure out how to roll back or select an older version of the container with hopes that it will come up. If anyone know how to do that, I can poke around.

 

Well, I can pull in an older version, but I'm not completely certain which version I had before I attempted the upgrade. And I only did the upgrade because I noticed the container was already down. But the older version hits the same problem; from the serverfault message, I had assumed this was a 12->13 issue, so I tried the last version 12, 12.10.8-ce.0. Same problem, though that be due to a half finished upgrade 😞

 

So, anyone know to convince the container to not exit? I'm thinking if I can get to a shell prompt, maybe I can work out how to get things running again.

Link to post
3 hours ago, rbroberts said:

Well, I can pull in an older version, but I'm not completely certain which version I had before I attempted the upgrade

 

Okay, if you have backups running of appdata, which I do, then you might be able to pull a backup from before the upgrade. I have a backup that was running 13.6.3. Move aside the old /mnt/cache/appdata/gitlab-ce, restore your backup, then configure the repository as gitlab/gitlab-ce:13.6.3-ce.0 (or whatever your version was, look at https://registry.hub.docker.com/r/gitlab/gitlab-ce/tags to available versions.

 

That doesn't solve the upgrade issue, but it does get me up and running. And I will never, never again upgrade gitlab without running a backup immediately beforehand. I really should have known better given the history of this one.

 

Link to post
  • 2 weeks later...

Installed this on a couple of days ago - Had no trouble installing this - pretty much runs out of the box just takes some time to startup the first time. Had some trouble registering the first user.. Couldn't figure out first username. But got is all running.

Got just a question: In case of a disaster, how do I recover/restore my code. Seems everything resides on the cache in appdata and since that is cache preferred and always active the mover will not move it to the array.. in fact the mover with move it from the array to the cache - I my cache is only about 112GiB which is enough for daily use.

But main question - If I need to reinstall the docker for some reason, how can I restore the data and configuration.

Link to post

How big should this container get?

 

I'm getting warnings about my docker image running out of space and this is the chief offender with the log taking up 19.6 GB. Is that supposed to be the mapped log directory in my config? Because that is mapped to /mnt/cache/appdata/gitlab-ce/log and that directory has files written in the last 20 minutes, as I shut it down, and is only 2.6 GB.

 

I can kill off the docker image and expand it's allocation, I'm just not clear what this is trying to tell me.

 

containersize.png

Link to post

 

 

Add --log-opt max-size=10m --log-opt max-file=1 to the extra parameters of the docker template. You can also disable prometheus_monitoring to trim it down a bit if you're not using that. Mine looks like this:

 

--log-opt max-size=10m --log-opt max-file=1 --env GITLAB_OMNIBUS_CONFIG="external_url 'http://xxxxxx:9080/'; postgresql['shared_buffers'] = '256MB'; sidekiq['concurrency'] = 15; prometheus_monitoring['enable'] = false;"

 

Link to post
3 minutes ago, frakman1 said:

Add --log-opt max-size=10m --log-opt max-file=1 to the extra parameters of the docker template. You can also disable prometheus_monitoring to trim it down a bit if you're not using that. Mine looks like this:


--log-opt max-size=10m --log-opt max-file=1 --env GITLAB_OMNIBUS_CONFIG="external_url 'http://xxxxxx:9080/'; postgresql['shared_buffers'] = '256MB'; sidekiq['concurrency'] = 15; prometheus_monitoring['enable'] = false;"

 

 

While that looks useful, I'm still not clear on why the docker image would balloon when the paths are mapped to actual storage. I was under the impression that the docker image would only grow from things that were not on mapped storage.

Link to post
On 1/29/2021 at 2:27 AM, sjoerd said:

Installed this on a couple of days ago - Had no trouble installing this - pretty much runs out of the box just takes some time to startup the first time. Had some trouble registering the first user.. Couldn't figure out first username. But got is all running.

Got just a question: In case of a disaster, how do I recover/restore my code. Seems everything resides on the cache in appdata and since that is cache preferred and always active the mover will not move it to the array.. in fact the mover with move it from the array to the cache - I my cache is only about 112GiB which is enough for daily use.

But main question - If I need to reinstall the docker for some reason, how can I restore the data and configuration.

 

cache should be some physical disk, either a hard drive or ssd. Otherwise, unraid will map it to memory and it all goes away at reboot. I've made that mistake....

 

Link to post
7 minutes ago, rbroberts said:

While that looks useful, I'm still not clear on why the docker image would balloon when the paths are mapped to actual storage. I was under the impression that the docker image would only grow from things that were not on mapped storage.

 

Ah, a bit more reading makes it obvious why that's the magic to make this work. Thanks frankman1!

Link to post
  • 3 months later...

I have a few answers to question of which I could not find the answers.

 

Problem:

  1. git push would not work.

 

Solution: 

  1. Follow the gitlab directions to set up the ssh key
  2. switch to advanced view in the docker settings
  3. go to the line "Extra Parameters" change the following:
  4. change the external url to http://[insert IP of unraid server]:[9080]/   
  5. When adding the origin remote repo you must change the http:// to ssh:// AND add 9022 after the colon for every .git inhabited directory you plan to add to the gitlab docker on unraid. Important to add the port that is set in the container settings for ssh, 9022.
  6. ex. git remote add origin ssh://git@192.168.101.176:9022/djhunter67/intro_java_proj_2.git
  7. djhunter67 is the user I created inside of gitlab.  This may be root for you.  Then the name of the remote repo, this does not have to be created on gitlab first.
  8. if ssh key directions are followed correctly then no password should be required, IF you make the key w/ no password required.
  9. Also, I already had ssh setup for my server but I created a new key regardless.

I did this using wsl2

Link to post
  • 2 weeks later...
Posted (edited)

Hello,

 

I am having problems starting Gitlab-ce. The logs tell me that postgress is missing folders. When I add the folder in postgres path, the log asks for a new missing folders in the postgres path. When I trigger gitlab-cli reconfigure, the folders disappears again.

 

Maybe the author of this docker image can fix this?

Or is there something I can do to fix this?

 

Error in Log:

 

==> /var/log/gitlab/postgresql/current <==
2021-05-16_05:27:18.92605 LOG: starting PostgreSQL 12.6 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2021-05-16_05:27:18.92808 LOG: listening on Unix socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"
2021-05-16_05:27:18.94794 LOG: could not open directory "pg_tblspc": No such file or directory
2021-05-16_05:27:18.95174 LOG: database system was shut down at 2021-05-16 03:45:11 GMT
2021-05-16_05:27:18.95216 LOG: could not open directory "pg_tblspc": No such file or directory
2021-05-16_05:27:18.95232 FATAL: could not open directory "pg_replslot": No such file or directory

 

Edited by Fusselkroete
Link to post
Posted (edited)

Hi, 

 

got new bug after update :D

 

database_objects[postgresql] (postgresql::standalone line 28) had an error: RuntimeError: postgresql_user[gitlab] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/database_objects.rb line 19) had an error: RuntimeError: execute[create gitlab postgresql user] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/resources/user.rb line 11) had an error: RuntimeError: Exhausted service checks and database is still not available

 

and after reinstall

 

There was an error running gitlab-ctl reconfigure:

rails_migration[gitlab-rails] (gitlab::database_migrations line 54) had an error: Mixlib::ShellOut::ShellCommandFailed: bash[migrate gitlab-rails database] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/resources/rails_migration.rb line 16) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'

 

 

Edited by Fusselkroete
Link to post
  • 2 weeks later...

Hi Gents,

 

I want to use a project specific runner to sync submodules. I know everything is in the gitlab docs like (https://docs.gitlab.com/runner/install/docker.html) but i'm not sure how to do that using unraid. Are the runners available in the Gitlab-ce by default or do i need to follow the docs. Bit uncertain how to proceed since I only used dockers from the "Community Applications"-section.

Regards,

Sjoerd

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.