Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #2899

Closed
Open
Created 12 years ago by Administrator@rootOwner
  • New issue

  • Report abuse

  • New issue

  • Report abuse

*30 connect() to unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket failed (13: Permission denied)

Closed

*30 connect() to unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket failed (13: Permission denied)

Created by: minhvn

I get 502 BAD gateway and view log below(cat /var/log/nginx/gitlab_error.log): 2013/02/04 11:08:45 [crit] 21566#0: *30 connect() to unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket failed (13: Permission denied) while connecting to upstream, client: 192.168.20.37

Please help me :)

Linked issues
0

Related merge requests

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: scalp42

    Make sure the permissions of

    /home/gitlab/gitlab/tmp/sockets/gitlab.socket

    are correct, meaning nginx can access it.

    By Administrator on 2013-02-04T04:57:21 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: minhvn

    Yes, Below is permission : [root@git ~]# ls -lai /home/gitlab/gitlab/tmp/sockets/ total 8 802975 drwxrwxr-x. 2 gitlab gitlab 4096 Feb 4 09:34 . 801862 drwxr-xr-x. 6 gitlab gitlab 4096 Feb 4 09:31 .. 802980 srwxrwxrwx. 1 gitlab gitlab 0 Feb 4 09:34 gitlab.socket [root@git ~]#

    By Administrator on 2013-02-04T05:27:57 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: minhvn

    2013/02/04 20:28:57 [crit] 21566#0: *84 stat() "/home/gitlab/gitlab/public/" failed (13: Permission denied), client: 192.168.20.37, server: myserver, request: "GET / HTTP/1.1", host: "myserver" 2013/02/04 20:28:57 [crit] 21566#0: *84 stat() "/home/gitlab/gitlab/public//index.html" failed (13: Permission denied), client: 192.168.20.37, server: myserver, request: "GET / HTTP/1.1", host: "myserver" 2013/02/04 20:28:57 [crit] 21566#0: *84 stat() "/home/gitlab/gitlab/public/.html" failed (13: Permission denied), client: 192.168.20.37, server: myserver, request: "GET / HTTP/1.1", host: "myserver" 2013/02/04 20:28:57 [crit] 21566#0: *84 connect() to unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket failed (13: Permission denied) while connecting to upstream, client: 192.168.20.37, server: myserver, request: "GET / HTTP/1.1", upstream: "http://unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket:/", host: "myserver" 2013/02/04 20:29:32 [crit] 21566#0: *84 stat() "/home/gitlab/gitlab/public/" failed (13: Permission denied), client: 192.168.20.37, server: myserver, request: "GET / HTTP/1.1", host: "myserver" 2013/02/04 20:29:32 [crit] 21566#0: *84 stat() "/home/gitlab/gitlab/public//index.html" failed (13: Permission denied), client: 192.168.20.37, server: myserver, request: "GET / HTTP/1.1", host: "myserver" 2013/02/04 20:29:32 [crit] 21566#0: *84 stat() "/home/gitlab/gitlab/public/.html" failed (13: Permission denied), client: 192.168.20.37, server: myserver, request: "GET / HTTP/1.1", host: "myserver" 2013/02/04 20:29:32 [crit] 21566#0: *84 connect() to unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket failed (13: Permission denied) while connecting to upstream, client: 192.168.20.37, server: myserver, request: "GET / HTTP/1.1", upstream: "http://unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket:/", host: "myserver"

    Help me please :)

    By Administrator on 2013-02-04T23:29:52 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: koenpunt

    You should head over to the Support Forum for questions regarding setup/configuration.

    By Administrator on 2013-02-04T14:46:23 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: minhvn

    I have post in google groups, but any reply this :( Hic hic

    By Administrator on 2013-02-05T04:34:47 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: scalp42

    This log line

     (13: Permission denied)

    is pretty explicit.

    Check the group access on the folder maybe?

    By Administrator on 2013-02-05T18:36:42 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: minhvn

    I have change user in nginx.conf with gitlab, it work :)

    By Administrator on 2013-02-05T23:21:01 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: koenpunt

    Please close the issue if is resolved.

    By Administrator on 2013-02-06T09:29:53 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: scalp42

    Just make sure to understand the implication of having nginx run under the gitlab user (http://en.wikipedia.org/wiki/Principle_of_least_privilege)

    By Administrator on 2013-02-06T17:42:20 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: robgjansen

    I had this same problem: file and directory permissions were fine but nginx was reporting the following when I tried to connect via the web browser:

    502 Bad Gateway

    Tailing the nginx gitlab error log (tail -f /var/log/nginx/gitlab_error.log) gives the following:

    2013/08/23 14:32:13 [crit] 32627#0: *11 stat() "/home/gitlab/gitlab/public/" failed (13: Permission denied), client: [scrubbed], server: [scrubbed], request: "GET / HTTP/1.1", host: "[scrubbed]"
    2013/08/23 14:32:13 [crit] 32627#0: *11 stat() "/home/gitlab/gitlab/public//index.html" failed (13: Permission denied), client: [scrubbed], server: [scrubbed], request: "GET / HTTP/1.1", host: "[scrubbed]"
    2013/08/23 14:32:13 [crit] 32627#0: *11 stat() "/home/gitlab/gitlab/public/.html" failed (13: Permission denied), client: [scrubbed], server: [scrubbed], request: "GET / HTTP/1.1", host: "[scrubbed]"
    2013/08/23 14:32:13 [crit] 32627#0: *11 connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream, client: [scrubbed], server: [scrubbed], request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "[scrubbed]"
    2013/08/23 14:32:13 [crit] 32627#0: *11 stat() "/home/gitlab/gitlab/public/favicon.ico" failed (13: Permission denied), client: [scrubbed], server: [scrubbed], request: "GET /favicon.ico HTTP/1.1", host: "[scrubbed]"
    2013/08/23 14:32:13 [crit] 32627#0: *11 stat() "/home/gitlab/gitlab/public/favicon.ico/index.html" failed (13: Permission denied), client: [scrubbed], server: [scrubbed], request: "GET /favicon.ico HTTP/1.1", host: "[scrubbed]"
    2013/08/23 14:32:13 [crit] 32627#0: *11 stat() "/home/gitlab/gitlab/public/favicon.ico.html" failed (13: Permission denied), client: [scrubbed], server: [scrubbed], request: "GET /favicon.ico HTTP/1.1", host: "[scrubbed]"
    2013/08/23 14:32:13 [crit] 32627#0: *11 connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream, client: [scrubbed], server: [scrubbed], request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8080/favicon.ico", host: "[scrubbed]"

    Turns out this was an SELinux issue. Some rules must have gotten nuked on an SELinux update.

    You could do this:

    # setenforce Permissive

    But I prefer to do this:

    # setsebool -P httpd_enable_homedirs 1
    # setsebool -P httpd_read_user_content 1
    # setsebool -P httpd_can_network_connect 1

    And it works. Note that the correct solution here is probably to relabel the files in /home/gitlab/gitlab, and set a policy so they get labeled correctly in future updates, but I didn't pursue that route (UPDATE: this guy did).

    Helpful link: http://wiki.centos.org/HowTos/SELinux

    By Administrator on 2014-04-11T15:42:27 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: idevit

    Be sure to verify your nginx vhost.. If you read unicorn config you see a port 8080. So be sure nothing else runs on 8080, if not change it.

    Then modify /etc/nginx/sites-available/gitlab with your favorite text editor

    Then set the proxy_pass to where gitlab_shell is actually running: proxy_pass http://localhost:8080;

    Its in the last line..

    By Administrator on 2013-12-29T21:51:21 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: datBoiMoudi

    I also figured out that this error occurred after an CentOS 6.6 update. By setting SELinux to Permissive with setenforce 0 does the trick for now but it would be great if anyone could figure out what specific SELinux settings have to be adjusted so that SELinux isn't disabled for the whole system

    By Administrator on 2014-11-12T06:59:50 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: robgjansen

    @Tobi555666 I take it you didn't try the settings I suggested in my post above, i.e.:

    # setsebool -P httpd_enable_homedirs 1
    # setsebool -P httpd_read_user_content 1
    # setsebool -P httpd_can_network_connect 1

    By Administrator on 2014-11-15T12:38:43 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: veegee

    I am using the system's nginx instead of the one included in the omnibus distribution.

    Do usermod -aG gitlab-www www-data to solve the issue. You may need to do it every time you restart nginx or gitlab via gitlab-ctl. I haven't bothered to figure out exactly why, but this fixes it, assuming nginx is running with the user www-data.

    By Administrator on 2015-01-11T01:18:04 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: danj-ca

    @veegee Have you set web_server['external_users'] = ['www-data'] in gitlab.rb? That might solve the problem of having to re-set permissions on every restart.

    By Administrator on 2015-03-16T05:08:57 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: veegee

    @danj-ca, I didn't even know that option existed. Thanks! The documentation really needs to be updated.

    It worked after I set that option and did gitlab-ctl reconfigure.

    By Administrator on 2015-03-16T07:24:29 (imported from GitLab project)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
Assign to
Milestone
No milestone
None
None
Time tracking
Due date
None
None
0
Labels
None
Assign labels
  • No matching results
  • Manage project labels
Confidentiality
Not confidential

You are going to turn on confidentiality. Only team members with at least Reporter access will be able to see and leave comments on the issue.

Lock issue
Unlocked
participants
Reference: