500 when listing registry images

Summary

It's not possible to list the images (https://git.domain.com/group/project/container_registry) from one project. When accessed it shows an error 500 page.

Steps to reproduce

Could not be established a list of steps to reproduce this error.

Example Project

What is the current bug behavior?

Error 502

What is the expected correct behavior?

Correct show the list of images.

Relevant logs and/or screenshots

[root@gitlab-1 gitlab]# tail -f /var/log/gitlab/gitlab-rails/production.log
Started GET "/deployment/test/container_registry" for x.x.x.x at 2017-10-11 13:42:00 +0000
Processing by Projects::Registry::RepositoriesController#index as HTML
  Parameters: {"namespace_id"=>"deployment", "project_id"=>"test"}
Completed 500 Internal Server Error in 521ms (ActiveRecord: 6.3ms | Elasticsearch: 0.0ms)

ActionView::Template::Error (A JSON text must at least contain two octets!):
    17:       .light
    18:         \-
    19:   %td
    20:     - if tag.created_at
    21:       = time_ago_in_words(tag.created_at)
    22:     - else
    23:       .light
  lib/container_registry/config.rb:7:in `initialize'
  lib/container_registry/tag.rb:56:in `new'
  lib/container_registry/tag.rb:56:in `config'
  lib/container_registry/tag.rb:60:in `created_at'
  app/views/projects/registry/repositories/_tag.html.haml:20:in `_app_views_projects_registry_repositories__tag_html_haml__2750008641653337480_69918697622560'
  app/views/projects/registry/repositories/_image.html.haml:30:in `_app_views_projects_registry_repositories__image_html_haml___4516906668571272393_69918697715800'
  app/views/projects/registry/repositories/index.html.haml:55:in `_app_views_projects_registry_repositories_index_html_haml___2942130797006292665_69919001301080'
  lib/gitlab/i18n.rb:46:in `with_locale'
  lib/gitlab/i18n.rb:52:in `with_user_locale'
  app/controllers/application_controller.rb:334:in `set_locale'
  lib/gitlab/middleware/multipart.rb:93:in `call'
  lib/gitlab/request_profiler/middleware.rb:14:in `call'
  lib/gitlab/middleware/go.rb:17:in `call'
  lib/gitlab/etag_caching/middleware.rb:11:in `call'
  lib/gitlab/middleware/readonly_geo.rb:30:in `call'
  lib/gitlab/request_context.rb:18:in `call'
  lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'

`
### Output of checks


#### Results of GitLab environment info

`[root@gitlab-1 gitlab]# sudo gitlab-rake gitlab:env:info

System information
System:
Proxy:          no
Current User:   git
Using RVM:      no
Ruby Version:   2.3.3p222
Gem Version:    2.6.6
Bundler Version:1.13.7
Rake Version:   12.0.0
Redis Version:  3.2.5
Git Version:    2.13.5
Sidekiq Version:5.0.4
Go Version:     unknown

GitLab information
Version:        9.5.4-ee
Revision:       08803f6
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     postgresql
DB Version:     9.6.3
URL:            https://git.domain.com
HTTP Clone URL: https://git.domain.com/some-group/some-project.git
SSH Clone URL:  git@git.domain.com:some-group/some-project.git
Elasticsearch:  no
Geo:            no
Using LDAP:     no
Using Omniauth: no

GitLab Shell
Version:        5.8.0
Repository storage paths:
- default:      /var/opt/gitlab/git-data/repositories
Hooks:          /opt/gitlab/embedded/service/gitlab-shell/hooks
Git:            /opt/gitlab/embedded/bin/git

Results of GitLab application Check

[root@gitlab-1 gitlab]# sudo gitlab-rake gitlab:check SANITIZE=true
Checking GitLab Shell ...

GitLab Shell version >= 5.8.0 ? ... OK (5.8.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:root, or git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ... 
1/1 ... ok
40/2 ... ok
1/3 ... ok
11/4 ... ok
41/5 ... ok
32/6 ... ok
11/7 ... ok
11/8 ... ok
14/11 ... ok
14/13 ... ok
14/16 ... ok
14/18 ... ok
3/20 ... ok
14/21 ... ok
38/22 ... ok
11/23 ... ok
11/24 ... ok
38/26 ... ok
30/27 ... ok
11/29 ... ok
14/30 ... ok
30/32 ... ok
33/33 ... ok
32/34 ... ok
11/35 ... ok
30/36 ... ok
11/37 ... ok
11/38 ... ok
30/40 ... ok
46/41 ... ok
38/43 ... ok
11/44 ... ok
11/46 ... ok
30/48 ... ok
36/50 ... ok
35/53 ... ok
33/54 ... ok
35/55 ... repository is empty
35/56 ... ok
30/57 ... ok
39/58 ... ok
14/60 ... ok
30/61 ... ok
15/64 ... ok
30/65 ... ok
14/66 ... ok
32/67 ... ok
30/68 ... ok
32/70 ... ok
35/71 ... ok
35/72 ... ok
44/73 ... ok
42/74 ... ok
15/75 ... ok
46/77 ... ok
43/78 ... repository is empty
11/79 ... ok
11/80 ... ok
47/81 ... ok
47/82 ... ok
47/83 ... ok
32/84 ... ok
11/85 ... ok
49/86 ... ok
50/87 ... ok
51/88 ... ok
47/91 ... ok
47/92 ... ok
11/93 ... ok
52/94 ... ok
35/95 ... ok
30/97 ... ok
52/98 ... ok
32/99 ... ok
55/100 ... ok
55/101 ... ok
11/102 ... ok
52/103 ... ok
35/104 ... ok
11/105 ... ok
33/106 ... ok
57/107 ... ok
11/108 ... ok
52/109 ... ok
32/110 ... ok
11/111 ... ok
11/112 ... ok
52/113 ... ok
35/114 ... ok
58/115 ... ok
11/116 ... ok
47/117 ... ok
11/118 ... ok
32/119 ... ok
32/120 ... ok
47/122 ... ok
47/123 ... ok
62/124 ... ok
62/125 ... ok
11/126 ... ok
35/127 ... ok
32/128 ... ok
64/129 ... ok
47/130 ... ok
32/131 ... ok
32/132 ... ok
62/133 ... ok
62/134 ... ok
35/135 ... ok
47/136 ... ok
61/137 ... ok
35/140 ... ok
11/141 ... ok
30/142 ... ok
30/144 ... ok
11/145 ... ok
32/147 ... ok
63/148 ... ok
11/150 ... ok
32/151 ... ok
63/152 ... ok
32/154 ... ok
32/155 ... ok
32/156 ... ok
32/157 ... ok
66/158 ... ok
66/159 ... ok
57/160 ... ok
62/162 ... ok
3/163 ... ok
3/164 ... ok
30/165 ... ok
11/166 ... ok
3/167 ... ok
11/168 ... ok
35/169 ... ok
63/170 ... ok
3/171 ... ok
63/172 ... ok
64/174 ... ok
73/175 ... ok
73/176 ... repository is empty
61/177 ... ok
61/178 ... ok
32/179 ... ok
64/180 ... ok
35/181 ... ok
32/182 ... ok
63/183 ... ok
11/185 ... ok
63/186 ... ok
63/187 ... ok
11/189 ... ok
11/190 ... ok
64/191 ... ok
47/193 ... ok
47/194 ... ok
47/195 ... ok
47/196 ... ok
47/197 ... ok
47/198 ... ok
47/199 ... ok
47/200 ... ok
32/202 ... ok
47/203 ... ok
47/204 ... ok
47/205 ... ok
47/206 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Reply by email ...

Reply by email is disabled in config/gitlab.yml

Checking Reply by email ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Projects have namespace: ... 
1/1 ... yes
40/2 ... yes
1/3 ... yes
11/4 ... yes
41/5 ... yes
32/6 ... yes
11/7 ... yes
11/8 ... yes
14/11 ... yes
14/13 ... yes
14/16 ... yes
14/18 ... yes
3/20 ... yes
14/21 ... yes
38/22 ... yes
11/23 ... yes
11/24 ... yes
38/26 ... yes
30/27 ... yes
11/29 ... yes
14/30 ... yes
30/32 ... yes
33/33 ... yes
32/34 ... yes
11/35 ... yes
30/36 ... yes
11/37 ... yes
11/38 ... yes
30/40 ... yes
46/41 ... yes
38/43 ... yes
11/44 ... yes
11/46 ... yes
30/48 ... yes
36/50 ... yes
35/53 ... yes
33/54 ... yes
35/55 ... yes
35/56 ... yes
30/57 ... yes
39/58 ... yes
14/60 ... yes
30/61 ... yes
15/64 ... yes
30/65 ... yes
14/66 ... yes
32/67 ... yes
30/68 ... yes
32/70 ... yes
35/71 ... yes
35/72 ... yes
44/73 ... yes
42/74 ... yes
15/75 ... yes
46/77 ... yes
43/78 ... yes
11/79 ... yes
11/80 ... yes
47/81 ... yes
47/82 ... yes
47/83 ... yes
32/84 ... yes
11/85 ... yes
49/86 ... yes
50/87 ... yes
51/88 ... yes
47/91 ... yes
47/92 ... yes
11/93 ... yes
52/94 ... yes
35/95 ... yes
30/97 ... yes
52/98 ... yes
32/99 ... yes
55/100 ... yes
55/101 ... yes
11/102 ... yes
52/103 ... yes
35/104 ... yes
11/105 ... yes
33/106 ... yes
57/107 ... yes
11/108 ... yes
52/109 ... yes
32/110 ... yes
11/111 ... yes
11/112 ... yes
52/113 ... yes
35/114 ... yes
58/115 ... yes
11/116 ... yes
47/117 ... yes
11/118 ... yes
32/119 ... yes
32/120 ... yes
47/122 ... yes
47/123 ... yes
62/124 ... yes
62/125 ... yes
11/126 ... yes
35/127 ... yes
32/128 ... yes
64/129 ... yes
47/130 ... yes
32/131 ... yes
32/132 ... yes
62/133 ... yes
62/134 ... yes
35/135 ... yes
47/136 ... yes
61/137 ... yes
35/140 ... yes
11/141 ... yes
30/142 ... yes
30/144 ... yes
11/145 ... yes
32/147 ... yes
63/148 ... yes
11/150 ... yes
32/151 ... yes
63/152 ... yes
32/154 ... yes
32/155 ... yes
32/156 ... yes
32/157 ... yes
66/158 ... yes
66/159 ... yes
57/160 ... yes
62/162 ... yes
3/163 ... yes
3/164 ... yes
30/165 ... yes
11/166 ... yes
3/167 ... yes
11/168 ... yes
35/169 ... yes
63/170 ... yes
3/171 ... yes
63/172 ... yes
64/174 ... yes
73/175 ... yes
73/176 ... yes
61/177 ... yes
61/178 ... yes
32/179 ... yes
64/180 ... yes
35/181 ... yes
32/182 ... yes
63/183 ... yes
11/185 ... yes
63/186 ... yes
63/187 ... yes
11/189 ... yes
11/190 ... yes
64/191 ... yes
47/193 ... yes
47/194 ... yes
47/195 ... yes
47/196 ... yes
47/197 ... yes
47/198 ... yes
47/199 ... yes
47/200 ... yes
32/202 ... yes
47/203 ... yes
47/204 ... yes
47/205 ... yes
47/206 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.3 ? ... yes (2.3.3)
Git version >= 2.7.3 ? ... yes (2.13.5)
Active users: ... 24
Elasticsearch version 5.1 - 5.3? ... skipped (elasticsearch is disabled)

Checking GitLab ... Finished

Possible fixes

Edited Oct 12, 2017 by Kenny Casagrande
Assignee Loading
Time tracking Loading