Gitlab github 启动报错: Permission denied

xiess@asiainfo-linkage.com · 2014年06月23日 · 8 次阅读

gitlab 突然挂了,无法访问,页面报错 403 forbidden。 后台重启提示: [root@DR710-69 gitlab-6.3.0]# ./ctlscript.sh restart Syntax OK /home/cloudetl/disk2/gitlab-6.3.0/apache2/scripts/ctl.sh : httpd stopped /home/cloudetl/disk2/gitlab-6.3.0/apps/gitlab/scripts/sidekiq.sh : gitlab_sidekiq not running /home/cloudetl/disk2/gitlab-6.3.0/apps/gitlabci/scripts/sidekiq.sh : gitlabci_sidekiq not running /home/cloudetl/disk2/gitlab-6.3.0/apps/gitlabci/scripts/runner.sh : gitlabci_runner not running bash: /home/cloudetl/disk2/gitlab-6.3.0/redis/bin/redis-cli: Permission denied /home/cloudetl/disk2/gitlab-6.3.0/redis/scripts/ctl.sh : redis could not be stopped /home/cloudetl/disk2/gitlab-6.3.0/mysql/scripts/ctl.sh : mysql not running Warning: World-writable config file '/home/cloudetl/disk2/gitlab-6.3.0/mysql/my.cnf' is ignored Warning: World-writable config file '/home/cloudetl/disk2/gitlab-6.3.0/mysql/my.cnf' is ignored 140620 10:57:47 mysqld_safe Logging to '/home/cloudetl/disk2/gitlab-6.3.0/mysql/data/mysqld.log'. 140620 10:57:47 mysqld_safe Starting mysqld daemon with databases from /home/cloudetl/disk2/gitlab-6.3.0/mysql/data 140620 10:57:49 mysqld_safe mysqld from pid file /home/cloudetl/disk2/gitlab-6.3.0/mysql/data/mysqld.pid ended /home/cloudetl/disk2/gitlab-6.3.0/mysql/scripts/ctl.sh : mysql could not be started /home/cloudetl/disk2/gitlab-6.3.0/redis/scripts/ctl.sh : redis (pid 32407) already running /home/git/.bashrc: line 13: /home/cloudetl/disk2/gitlab-6.1.0/scripts/setenv.sh: Permission denied /home/git/.bashrc: line 15: /home/cloudetl/disk2/gitlab-6.3.0/scripts/setenv.sh: Permission denied -bash: line 0: cd: /home/cloudetl/disk2/gitlab-6.3.0/apps/gitlab/htdocs: Permission denied /home/cloudetl/disk2/gitlab-6.3.0/apps/gitlab/scripts/sidekiq.sh : gitlab_sidekiq could not be started /home/gitlab_ci/.profile: line 2: /home/cloudetl/disk2/gitlab-6.3.0/scripts/setenv.sh: Permission denied -bash: line 0: cd: /home/cloudetl/disk2/gitlab-6.3.0/apps/gitlabci/htdocs: Permission denied /home/cloudetl/disk2/gitlab-6.3.0/apps/gitlabci/scripts/sidekiq.sh : gitlabci_sidekiq could not be started /home/gitlab_ci/.profile: line 2: /home/cloudetl/disk2/gitlab-6.3.0/scripts/setenv.sh: Permission denied -bash: /home/cloudetl/disk2/gitlab-6.3.0/apps/gitlabci/gitlabci-runner/logs/gitlabci-runner.log: Permission denied /home/cloudetl/disk2/gitlab-6.3.0/apps/gitlabci/scripts/runner.sh : gitlabci_runner could not be started Syntax OK /home/cloudetl/disk2/gitlab-6.3.0/apache2/scripts/ctl.sh : httpd started at port 80

想了很多可能的原因: 1、将文件夹权限改成了 777,无效 2、网上搜索到的修改 httpd.conf 文件,无效 3、重装恢复,重装就直接装不上,报错,没有文件夹的操作权限。

[color=Red] 解决办法: 误打误撞,重装的时候,把整个 gitlab 的文件夹 MV 了一下备份。结果重装失败,就把文件夹有还原回去了,再次重启,居然发现报的错误变了,报错为:mysql 的 my.conf 读取失败。鉴于刚刚 MV 之后居然好了,于是找到 my.conf 文件,mv 走又 mv 回来,再次重启,奇迹般的好了。。。 [color=Red] 简单说,解决办法就是把无权访问的文件和文件夹移动一下再还原,OK

[color=Lime] 总结: 估计是 linux 系统问题,磁盘出来些问题,索引乱了,mv 一下,索引就重新建了,所以就好了。

需要 登录 后方可回复。