502哎呀,GitLab花了太多时间来回应

Seo*_*Ha 26 gitlab

我在Raspberry Pi2上安装了Gitlab,它运行了几个月.但是由于关闭了RPi的功能,它不再起作用了.网页返回502错误.

502哎呀,GitLab花了太多时间来回应.

所以我尝试了reconfigure(sudo gitlab-ctl reconfigure)但是,它失败并显示错误消息:

FATAL: Errono::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
Run Code Online (Sandbox Code Playgroud)

我不知道如何解决这个问题.

Vla*_*lad 23

我多次看到这样的问题.

如果GitLab工作正常,请不要碰任何东西.等一下 似乎GitLab还没有正确启动:(

我的意思是在启动系统后你必须等待1-2分钟才能使用GitLab.GitLab需要一些时间来启动.

  • 等待没有帮助我,增加了更多的记忆. (3认同)
  • 我在 Ubuntu 虚拟机上运行 GitLab 时看到了这个问题;分配更多的内存有帮助;从内存我从 1 GB 增加到 2 GB。 (2认同)

vik*_*027 22

我没有添加评论,因为我的答案需要一些好的格式.

这意味着,您的端口8080已被使用.我建议停止GitLab,并将unicorn端口从8080更改为8081(或一些未使用的端口).

启动/重启GitLab后等待2分钟,你应该没问题.如果没有,请再次检查gitlab-ctl tail是否有错误.

# gitlab-ctl stop

# vi /etc/gitlab/gitlab.rb   (change only these lines, uncomment if required)
unicorn['port'] = 8081
gitlab_git_http_server['auth_backend'] = "http://localhost:8081"

# gitlab-ctl reconfigure  (to apply the changes)
# gitlab-ctl restart
# lsof -i:8081        (check whether unicorn has started properly)
Run Code Online (Sandbox Code Playgroud)

您需要是root用户或sudo用户(具有root权限)才能运行这些命令.

  • 我将端口号8080更改为8081并在gitlab.rb文件中添加了一行`gitlab_git_http_server ['auth_backend'] ="http:// localhost:8081"`,因为它不在那里.但是,它仍然提供相同的错误消息.`FATAL - :添加侦听器addr = 127.0.0.1:8080`时出错 (4认同)

tro*_*jan 5

在检查了gitlab-ctl尾部(重新引导循环)后,结果是我的新Ubuntu设置中没有足够的RAM(2GB)并且没有交换文件。

如要求中所述, GitLab至少需要2GB RAM + 2GB交换内存...

因此,要创建交换文件,请遵循以下步骤:

  1. gitlab-ctl stop

  2. mkdir /swap && touch /swap/swapfile.img

  3. dd if=/dev/zero of=/swap/swapfile.img bs=1024 count=2M #如果要4G将2M更改为4M
  4. chmod 0600 /swap/swapfile.img
  5. mkswap /swap/swapfile.img
  6. nano /etc/fstab 并添加“ /swap/swapfile.img swap swap sw 0 0”
  7. swapon /swap/swapfile.img
  8. 验证是否有效: cat /proc/swaps

    Filename                Type        Size    Used    Priority
    
    /swap/swapfile.img      file        2097148 0       -1
    
    Run Code Online (Sandbox Code Playgroud)
  9. gitlab-ctl start

有关创建交换的更多信息:此处