Images attached on issues not showing
Closed
Images attached on issues not showing
Created by: agb80
1.- Summary: Attach images to issues or comments must display a preview of the image inline with the issue or comment
2.- Steps to reproduce: On a Gitlab 5.2.0 stable branch. Attach an image on any issue or comment
3.- Expected behavior: Image preview displayed on each issue comment.
4.- Observed behavior: Just an empty placeholder image html tag
5.- Relevant logs and/or screen shots: nginx error log
2013/06/05 23:57:37 [crit] 28994#0: *24 stat() "/home/git/gitlab/public/" failed (13: Permission denied), client: 189.131.81.183, server: gitlab.fedrojesa.dtdns.net, request: "GET /?limit=20&offset=0&_=1370494689144 HTTP/1.1", host: "gitlab.fedrojesa.dtdns.net", referrer: "http://gitlab.fedrojesa.dtdns.net/"
2013/06/05 23:57:37 [crit] 28994#0: *24 stat() "/home/git/gitlab/public//index.html" failed (13: Permission denied), client: 189.131.81.183, server: gitlab.fedrojesa.dtdns.net, request: "GET /?limit=20&offset=0&_=1370494689144 HTTP/1.1", host: "gitlab.fedrojesa.dtdns.net", referrer: "http://gitlab.fedrojesa.dtdns.net/"
2013/06/05 23:57:37 [crit] 28994#0: *24 stat() "/home/git/gitlab/public/.html" failed (13: Permission denied), client: 189.131.81.183, server: gitlab.fedrojesa.dtdns.net, request: "GET /?limit=20&offset=0&_=1370494689144 HTTP/1.1", host: "gitlab.fedrojesa.dtdns.net", referrer: "http://gitlab.fedrojesa.dtdns.net/"
2013/06/05 23:57:37 [error] 28994#0: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 189.131.81.183, server: gitlab.fedrojesa.dtdns.net, request: "GET /?limit=20&offset=0&_=1370494689144 HTTP/1.1", upstream: "http://[::1]:9292/?limit=20&offset=0&_=1370494689144", host: "gitlab.fedrojesa.dtdns.net", referrer: "http://gitlab.fedrojesa.dtdns.net/"
2013/06/05 23:57:39 [crit] 28994#0: *24 stat() "/home/git/gitlab/public/uploads/note/attachment/250/home.png" failed (13: Permission denied), client: 189.131.81.183, server: gitlab.fedrojesa.dtdns.net, request: "GET /uploads/note/attachment/250/home.png HTTP/1.1", host: "gitlab.fedrojesa.dtdns.net", referrer: "http://gitlab.fedrojesa.dtdns.net/"
2013/06/05 23:57:39 [crit] 28994#0: *24 stat() "/home/git/gitlab/public/uploads/note/attachment/250/home.png/index.html" failed (13: Permission denied), client: 189.131.81.183, server: gitlab.fedrojesa.dtdns.net, request: "GET /uploads/note/attachment/250/home.png HTTP/1.1", host: "gitlab.fedrojesa.dtdns.net", referrer: "http://gitlab.fedrojesa.dtdns.net/"
2013/06/05 23:57:39 [crit] 28994#0: *24 stat() "/home/git/gitlab/public/uploads/note/attachment/250/home.png.html" failed (13: Permission denied), client: 189.131.81.183, server: gitlab.fedrojesa.dtdns.net, request: "GET /uploads/note/attachment/250/home.png HTTP/1.1", host: "gitlab.fedrojesa.dtdns.net", referrer: "http://gitlab.fedrojesa.dtdns.net/"
2013/06/05 23:57:39 [crit] 28994#0: *26 stat() "/home/git/gitlab/public/uploads/note/attachment/244/compartir.png" failed (13: Permission denied), client: 189.131.81.183, server: gitlab.fedrojesa.dtdns.net, request: "GET /uploads/note/attachment/244/compartir.png HTTP/1.1", host: "gitlab.fedrojesa.dtdns.net", referrer: "http://gitlab.fedrojesa.dtdns.net/"
2013/06/05 23:57:39 [crit] 28994#0: *26 stat() "/home/git/gitlab/public/uploads/note/attachment/244/compartir.png/index.html" failed (13: Permission denied), client: 189.131.81.183, server: gitlab.fedrojesa.dtdns.net, request: "GET /uploads/note/attachment/244/compartir.png HTTP/1.1", host: "gitlab.fedrojesa.dtdns.net", referrer: "http://gitlab.fedrojesa.dtdns.net/"
2013/06/05 23:57:39 [crit] 28994#0: *26 stat() "/home/git/gitlab/public/uploads/note/attachment/244/compartir.png.html" failed (13: Permission denied), client: 189.131.81.183, server: gitlab.fedrojesa.dtdns.net, request: "GET /uploads/note/attachment/244/compartir.png HTTP/1.1", host: "gitlab.fedrojesa.dtdns.net", referrer: "http://gitlab.fedrojesa.dtdns.net/"
6.- Output of checks Results of GitLab Application Check (sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production) Two errors showing: I have to change the startup script because default dosn't work on my Centos Box and because of centos, I'm currently on git 1.7.1 but none of those two errors are related to the bad behaivor currently showed.
Checking Environment ...
Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 1.4.0 ? ... OK (1.4.0)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ...
Agustín Cruz / fad ... ok
Agustín Cruz / Nereid ... ok
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Checking Sidekiq ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... no
Try fixing it:
Redownload the init script
For more information see:
doc/install/installation.md in section "Install Init Script"
Please fix the error above and rerun the checks.
Projects have satellites? ...
Agustín Cruz / fad ... yes
Agustín Cruz / Nereid ... yes
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... no
Try fixing it:
Update your git to a version >= 1.7.10 from 1.7.1
Please fix the error above and rerun the checks.
Checking GitLab ... Finished
Version of GitLab you are running: 5.2.0
Standar setup made using the manual.
Created by: babatakao
Check your /etc/nginx/sites-enabled/gitlab.
https://github.com/gitlabhq/gitlabhq/blob/master/lib/support/nginx/gitlab
Is the "root" value valid?
By Administrator on 2013-06-05T01:36:52 (imported from GitLab project)
Created by: agb80
Thanks for your answer, this is my gitlab.conf on nginx. As you could see, except for the last line where I'm poiting to the right location from where I'm running Puma, there is just a copy paste from the one on the repo.
I also look for the /home/git/gitlab/public file and is there, including the path to the files asking for the server, just they are not being serverd.
# GITLAB # Maintainer: @randx # App Version: 5.0 upstream gitlab { server localhost:9292; } server { listen *:80; # e.g., listen 192.168.1.1:80; server_name gitlab.fedrojesa.*******; # e.g., server_name source.example.com; root /home/git/gitlab/public; # individual nginx logs for this gitlab vhost access_log /var/log/nginx/gitlab_access.log; error_log /var/log/nginx/gitlab_error.log; location / { # serve static files from defined root folder;. # @gitlab is a named location for the upstream fallback, see below try_files $uri $uri/index.html $uri.html @gitlab; } # if a file, which is not found in the root folder is requested, # then the proxy pass the request to the upsteam (gitlab unicorn) location @gitlab { proxy_read_timeout 300; # https://github.com/gitlabhq/gitlabhq/issues/694 proxy_connect_timeout 300; # https://github.com/gitlabhq/gitlabhq/issues/694 proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; #proxy_pass http://gitlab; proxy_pass http://localhost:9292; } }
By Administrator on 2013-06-06T05:08:19 (imported from GitLab project)
Created by: agb80
By the way, continue debuging from your comment I went to look at the nginx and found this error:
2013/06/04 23:01:14 [crit] 31856#0: *3 stat() "/home/git/gitlab/public/uploads/note/attachment/133/sobre-nosotros-satisfaccion.jpg.html" failed (13: Permission denied), client: 189.131.94.155, server: gitlab.fedrojesa.*****, request: "GET /uploads/note/attachment/133/sobre-nosotros-satisfaccion.jpg HTTP/1.1", host: "gitlab.fedrojesa.*****", referrer: "http://gitlab.fedrojesa.****/agb80/fad/issues/66"
Look for the corresponding file and found /home/git/gitlab/public/uploads/note/attachment/133/sobre-nosotros-satisfaccion.jpg not the one ending on .html.
Any other thing can you suggest?
By Administrator on 2013-06-05T04:19:02 (imported from GitLab project)
Created by: babatakao
Check your directory permission : /home/git/gitlab/public/uploads/note/attachment/133/ and its parent directory.
If executable bit is not set, same error "13: Permission denied" and 404 was occured. Try "find uploads -type f -print | xargs chmod 644; find uploads -type d -print | xargs chmod 755".
By Administrator on 2013-06-05T04:36:21 (imported from GitLab project)
Created by: bbodenmiller
Thanks for the issue report. Please reformat your issue to conform to the issue tracker guidelines found in our contributing guidelines.
By Administrator on 2013-06-06T03:26:02 (imported from GitLab project)
Created by: agb80
Found the answer here: https://groups.google.com/forum/#!searchin/gitlabhq/nginx/gitlabhq/n1FBzP8A0ao/dssiL5qbntsJ
For the record, the solution was make a chmod o+x -R /home/git/
By Administrator on 2013-06-06T05:36:02 (imported from GitLab project)