You are not logged in.

#1 2023-09-04 14:37:59

Solver86
Member
Registered: 2023-09-04
Posts: 4

[SOLVED] Problems with installation of Gitlab on fresh install of Arch

Hello everybody,

at the moment i am struggeling to install a gitlab server on a relatively fresh set up of ArchLinux on an intel nuc.

Any help and hints are highly appreciated, as i currently dont really know how to do further debugging.

Note:
NGINX is already running and is succesfully configured to serve an installation of NextCloud.

I did the following things, according to the this guide:
https://wiki.archlinux.org/title/GitLab


1. install Redis and Postgres

2. install gitlab from pacman

3. NGINX is already installed and running

4. modified / verified "/etc/webapps/gitlab/gitlab.yml" (inserted my hostname, checked "repository_downloads_path" , "builds_path")

5. created secret strings according to wiki

6. add gitlab to the redis user group: "gpasswd -a gitlab redis"
   added
   "unixsocket /run/redis/redis.sock" to "/etc/redis/redis.conf"
   "unixsocketperm 770" to "/etc/redis/redis.conf"

7. created database template1 as user "postgres":
   
     sudo -iu postgres
     psql -d template1

8. created Gitlab Postgres user with password, gave it superuser role, created database "gitlabhq_production" owned by gitlab postgres user

9. verified to be able to connect to new database: is ok.

10.edited "/etc/webapps/gitlab/database.yml" with gitlab postgres user name and password

11.initialized gitlab database (cd .. + "sudo -u gitlab $(cat environment | xargs) bundle-2.7 exec rake gitlab:setup"):
    this ends after a while and after a lot of lines naming already initialized constants with:
   
    "rake aborted
    YAML syntax error occurred while parsing /usr/share/webapps/gitlab/config/gitlab.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): did not find expected key while parsing a block mapping at line 763 column 9"

    again followed by lots of lines that i cant interpret

12. when i inspect the named file i cant find anything wrong about it at the specified line ... no tabs, indentation is ok ...

13. when proceeding according to the instructions, i can reach my server at the specified address with the gitlab logo, but all it says is:

"502
We're sorry. GitLab is taking too much time to respond."


So my question is: How can i further dig into this subject?
I already inspected "/usr/share/webapps/gitlab/config/gitlab.yml" but cant find anything wrong with it.
Why does the gitlab database initialization fail?
Any guidance / help is highly appreciated!

Last edited by Solver86 (2023-09-13 17:48:17)

Offline

#2 2023-09-04 14:42:53

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,115

Re: [SOLVED] Problems with installation of Gitlab on fresh install of Arch

I do not have experience with Gitlab myself,  but what is at (and around) line 763 in /usr/share/webapps/gitlab/config/gitlab.yml? I think the 'tab' remark is a generic message and not relevant in your case, it may actually be a missing key/value pair.

Offline

#3 2023-09-04 15:01:10

Solver86
Member
Registered: 2023-09-04
Posts: 4

Re: [SOLVED] Problems with installation of Gitlab on fresh install of Arch

Hi,

this is the file content around line 763.
Line 763 beeing:    label:  'LDAP'

To my understanding this would be an optional string giving the name to reach an LDAP-Service (i have no intention on using this though ...)

    servers:
      ##########################################################################
      #
      # Since GitLab 7.4, LDAP servers get ID's (below the ID is 'main'). GitLab
      # Enterprise Edition now supports connecting to multiple LDAP servers.
      #
      # If you are updating from the old (pre-7.4) syntax, you MUST give your
      # old server the ID 'main'.
      #
      ##########################################################################
      main: # 'main' is the GitLab 'provider ID' of this LDAP server
        ## label
        #
        # A human-friendly name for your LDAP server. It is OK to change the label later,
        # for instance if you find out it is too large to fit on the web page.
        #
        # Example: 'Paris' or 'Acme, Ltd.'
        label: 'LDAP'

        # Example: 'ldap.mydomain.com'
        host: '_your_ldap_server'
        # This port is an example, it is sometimes different but it is always an integer and not a string
        port: 389 # usually 636 for SSL
        uid: 'sAMAccountName' # This should be the attribute, not the value that maps to uid.

        # Examples: 'america\\momo' or 'CN=Gitlab Git,CN=Users,DC=mydomain,DC=com'
        bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
        password: '_the_password_of_the_bind_user'

Last edited by Solver86 (2023-09-07 09:16:56)

Offline

#4 2023-09-04 16:09:01

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,115

Re: [SOLVED] Problems with installation of Gitlab on fresh install of Arch

I did a quick search and the "did not find expected key while parsing" error is a YAML parsing error, so there has to be something odd with the YAML content. Can you please edit your post and put it in [ code ] tags? Also make sure to check the original file for any trailing whitespace around line 763.

Offline

#5 2023-09-07 09:53:44

Solver86
Member
Registered: 2023-09-04
Posts: 4

Re: [SOLVED] Problems with installation of Gitlab on fresh install of Arch

Hi everybody,

i finally managed to find (my) faults by running the .yml file through an online syntax checker, which revealed two errors.
These were anyhow at totally different spots than stated by the installation process, but hey!, its working now smile

first was my mistake: I entered an invalid path with some trash in it
second: Not a fatal error, but still probably somehow wrong... two identically named Cron-Jobs for different jobs

    # Elasticsearch bulk updater for initial updates.
    # NOTE: This will only take effect if elasticsearch is enabled.
    elastic_index_initial_bulk_cron_worker:
      cron: "*/1 * * * *"

    # Elasticsearch reindexing worker
    # NOTE: This will only take effect if elasticsearch is enabled.
    elastic_index_initial_bulk_cron_worker:
      cron: "*/10 * * * *" 

Offline

#6 2023-09-07 15:25:46

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,115

Re: [SOLVED] Problems with installation of Gitlab on fresh install of Arch

Please mark your topic SOLVED by editing the original post and adding [SOLVED] to its title.

Offline

#7 2023-09-07 22:08:17

loqs
Member
Registered: 2014-03-06
Posts: 17,764

Re: [SOLVED] Problems with installation of Gitlab on fresh install of Arch

Solver86 wrote:

second: Not a fatal error, but still probably somehow wrong... two identically named Cron-Jobs for different jobs

That is from upstream [1] it probably should be elastic_cluster_reindexing_cron_worker [2].

[1] https://gitlab.com/gitlab-org/gitlab/-/ … =tags#L653
[2] https://gitlab.com/gitlab-org/gitlab/-/ … =tags#L780

Offline

#8 2023-09-13 17:46:54

Solver86
Member
Registered: 2023-09-04
Posts: 4

Re: [SOLVED] Problems with installation of Gitlab on fresh install of Arch

@Ioqs and all others:

many thanks, server is up and running fine.

marked as solved.

Offline

Board footer

Powered by FluxBB