SUSE / Portus

Authorization service and frontend for Docker registry (v2)
http://port.us.org/
Apache License 2.0
3k stars 470 forks source link

Portus error (Something's wrong with our lighthouse.) #2186

Closed EdanBrooke closed 5 years ago

EdanBrooke commented 5 years ago

Description

I am trying to run Portus v2.4.3 locally on my machine to test it. Having cloned the project, I've ran docker-compose up -d.

I've been trying for 8 hours now to get this working and am very close to switching to an alternative but I thought it'd be nice to get this working. Though unfortunately existing documentation seems poor and outdated.

$ docker ps                                                                                                                                                                                                                                                                     CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                              NAMES                                                                                                                     92f4f32f6d1c        registry:2.6                  "/entrypoint.sh /etc…"   18 minutes ago      Up 18 minutes       0.0.0.0:5000-5001->5000-5001/tcp   portus_registry_1                                                                                                         a479f180203c        opensuse/portus:development   "bundle exec rails r…"   18 minutes ago      Up 18 minutes       3000/tcp                           portus_background_1                                                                                                       e2ad55b9c382        quay.io/coreos/clair:v2.0.2   "/clair -config /cla…"   18 minutes ago      Up 18 minutes       0.0.0.0:6060-6061->6060-6061/tcp   portus_clair_1                                                                                                            b2499c1ca2db        opensuse/portus:development   "bundle exec rails r…"   18 minutes ago      Up 18 minutes       0.0.0.0:3000->3000/tcp             portus_portus_1                                                                                                           8f296a8a73eb        postgres:10-alpine            "docker-entrypoint.s…"   18 minutes ago      Up 18 minutes       5432/tcp                           portus_postgres_1                                                                                                         6b754c8801e4        mariadb:10.0.23               "/docker-entrypoint.…"   18 minutes ago      Up 18 minutes       3306/tcp                           portus_db_1

However, when browsing to http://localhost:3000 I am greeted with the Portus error page. "Something's wrong with our lighthouse. If you are the application owner check the logs for more information."

I had a look at the portus_portus_1 logs which rather unhelpfully report that the error page was successfully generated.

Started GET "/users/sign_up" for 172.24.0.1 at 2019-04-22 17:34:03 +0000
Processing by Auth::RegistrationsController#new as HTML
(0.3ms)  SELECT COUNT(*) FROM `users` WHERE (`users`.`username` != 'portus') AND `users`.`enabled` = 1 AND `users`.`admin` = 1
(0.2ms)  SELECT COUNT(*) FROM `users` WHERE (`users`.`username` != 'portus')
Rendered shared/_notification.html.slim (0.1ms)
Rendered shared/_notification.html.slim (0.0ms)
Rendered shared/_notifications.html.slim (31.9ms)
Rendered devise/registrations/new.html.slim within layouts/authentication (59.5ms)
Completed 401 Unauthorized in 167ms (ActiveRecord: 0.5ms)
Processing by ErrorsController#show as HTML
Parameters: {"status"=>"500"}
Rendered errors/500.html.erb within layouts/errors (0.0ms)
Rendered errors/_status_title.html.slim (0.0ms)
Completed 500 Internal Server Error in 62ms (Views: 52.6ms \| ActiveRecord: 0.0ms)

Configuration:

You can get this information like this:


email:                                                                                                                                                                                                                                                                            from: portus@example.com                                                                                                                                                                                                                                                        name: Portus                                                                                                                                                                                                                                                                    reply_to: ''                                                                                                                                                                                                                                                                    smtp:                                                                                                                                                                                                                                                                             enabled: false                                                                                                                                                                                                                                                                  address: smtp.example.com                                                                                                                                                                                                                                                       port: 587                                                                                                                                                                                                                                                                       domain: example.com                                                                                                                                                                                                                                                             ssl_tls: ''                                                                                                                                                                                                                                                                     enable_starttls_auto: false                                                                                                                                                                                                                                                     openssl_verify_mode: none                                                                                                                                                                                                                                                       ca_path: ''                                                                                                                                                                                                                                                                     ca_file: ''                                                                                                                                                                                                                                                                     user_name: ''                                                                                                                                                                                                                                                                   password: "****"                                                                                                                                                                                                                                                                authentication: login                                                                                                                                                                                                                                                       gravatar:                                                                                                                                                                                                                                                                         enabled: true                                                                                                                                                                                                                                                                 delete:                                                                                                                                                                                                                                                                           enabled: true                                                                                                                                                                                                                                                                   contributors: false                                                                                                                                                                                                                                                             garbage_collector:                                                                                                                                                                                                                                                                enabled: false                                                                                                                                                                                                                                                                  older_than: 30                                                                                                                                                                                                                                                                  tag: ''                                                                                                                                                                                                                                                                     ldap:                                                                                                                                                                                                                                                                             enabled: false                                                                                                                                                                                                                                                                  hostname: ldap_hostname                                                                                                                                                                                                                                                         port: 389                                                                                                                                                                                                                                                                       timeout: 5                                                                                                                                                                                                                                                                      encryption:                                                                                                                                                                                                                                                                       method: ''                                                                                                                                                                                                                                                                      options:                                                                                                                                                                                                                                                                          ca_file: ''                                                                                                                                                                                                                                                                     ssl_version: TLSv1_2                                                                                                                                                                                                                                                        base: ''                                                                                                                                                                                                                                                                        filter: ''                                                                                                                                                                                                                                                                      uid: uid                                                                                                                                                                                                                                                                        authentication:                                                                                                                                                                                                                                                                   enabled: false                                                                                                                                                                                                                                                                  bind_dn: ''                                                                                                                                                                                                                                                                     password: "****"                                                                                                                                                                                                                                                              guess_email:                                                                                                                                                                                                                                                                      enabled: false                                                                                                                                                                                                                                                                  attr: ''                                                                                                                                                                                                                                                                    oauth:                                                                                                                                                                                                                                                                            local_login:                                                                                                                                                                                                                                                                      enabled: true                                                                                                                                                                                                                                                                 google_oauth2:                                                                                                                                                                                                                                                                    enabled: false                                                                                                                                                                                                                                                                  id: ''                                                                                                                                                                                                                                                                          secret: ''                                                                                                                                                                                                                                                                      domain: ''                                                                                                                                                                                                                                                                      options:                                                                                                                                                                                                                                                                          hd: ''                                                                                                                                                                                                                                                                      open_id:                                                                                                                                                                                                                                                                          enabled: false                                                                                                                                                                                                                                                                  identifier: ''                                                                                                                                                                                                                                                                  domain: ''                                                                                                                                                                                                                                                                    github:                                                                                                                                                                                                                                                                           enabled: false                                                                                                                                                                                                                                                                  client_id: ''                                                                                                                                                                                                                                                                   client_secret: ''                                                                                                                                                                                                                                                               organization: ''                                                                                                                                                                                                                                                                team: ''                                                                                                                                                                                                                                                                        domain: ''                                                                                                                                                                                                                                                                    gitlab:                                                                                                                                                                                                                                                                           enabled: false                                                                                                                                                                                                                                                                  application_id: ''                                                                                                                                                                                                                                                              secret: ''                                                                                                                                                                                                                                                                      group: ''                                                                                                                                                                                                                                                                       domain: ''                                                                                                                                                                                                                                                                      server: ''                                                                                                                                                                                                                                                                    bitbucket:                                                                                                                                                                                                                                                                        enabled: false                                                                                                                                                                                                                                                                  key: ''                                                                                                                                                                                                                                                                         secret: ''                                                                                                                                                                                                                                                                      domain: ''                                                                                                                                                                                                                                                                      options:                                                                                                                                                                                                                                                                          team: ''                                                                                                                                                                                                                                                                  first_user_admin:                                                                                                                                                                                                                                                                 enabled: true                                                                                                                                                                                                                                                                 signup:                                                                                                                                                                                                                                                                           enabled: true                                                                                                                                                                                                                                                                 check_ssl_usage:                                                                                                                                                                                                                                                                  enabled: false                                                                                                                                                                                                                                                                registry:                                                                                                                                                                                                                                                                         jwt_expiration_time:                                                                                                                                                                                                                                                              value: 15                                                                                                                                                                                                                                                                     catalog_page:                                                                                                                                                                                                                                                                     value: 100                                                                                                                                                                                                                                                                    timeout:                                                                                                                                                                                                                                                                          value: 2                                                                                                                                                                                                                                                                      read_timeout:                                                                                                                                                                                                                                                                     value: 120                                                                                                                                                                                                                                                                  machine_fqdn:                                                                                                                                                                                                                                                                     value: 172.17.0.1                                                                                                                                                                                                                                                             display_name:                                                                                                                                                                                                                                                                     enabled: false                                                                                                                                                                                                                                                                user_permission:                                                                                                                                                                                                                                                                  change_visibility:                                                                                                                                                                                                                                                                enabled: true                                                                                                                                                                                                                                                                 create_team:                                                                                                                                                                                                                                                                      enabled: true                                                                                                                                                                                                                                                                 manage_team:                                                                                                                                                                                                                                                                      enabled: true                                                                                                                                                                                                                                                                 create_namespace:                                                                                                                                                                                                                                                                 enabled: true                                                                                                                                                                                                                                                                 manage_namespace:                                                                                                                                                                                                                                                                 enabled: true                                                                                                                                                                                                                                                                 create_webhook:                                                                                                                                                                                                                                                                   enabled: true                                                                                                                                                                                                                                                                 manage_webhook:                                                                                                                                                                                                                                                                   enabled: true                                                                                                                                                                                                                                                                 push_images:                                                                                                                                                                                                                                                                      policy: allow-teams                                                                                                                                                                                                                                                         security:                                                                                                                                                                                                                                                                         clair:                                                                                                                                                                                                                                                                            server: http://clair:6060                                                                                                                                                                                                                                                       health_port: 6061                                                                                                                                                                                                                                                               timeout: 900                                                                                                                                                                                                                                                                  zypper:                                                                                                                                                                                                                                                                           server: ''                                                                                                                                                                                                                                                                    dummy:                                                                                                                                                                                                                                                                            server: ''                                                                                                                                                                                                                                                                  anonymous_browsing:                                                                                                                                                                                                                                                               enabled: true                                                                                                                                                                                                                                                                 background:                                                                                                                                                                                                                                                                       registry:                                                                                                                                                                                                                                                                         enabled: true                                                                                                                                                                                                                                                                 sync:                                                                                                                                                                                                                                                                             enabled: true                                                                                                                                                                                                                                                                   strategy: initial                                                                                                                                                                                                                                                           pagination:                                                                                                                                                                                                                                                                       limit: 10                                                                                                                                                                                                                                                                       per_page: 10                                                                                                                                                                                                                                                                    before_after: 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Portus version: 2.4.3
--

Portus version: 2.4.3

EdanBrooke commented 5 years ago

Okay so, the issue was with examples/development/compose/bootstrap-webpack I had opened it on my Windows host and closed it down again. It had saved it with both line feeds and carriage returns at the end of each line (as Windows does) so I removed the carriage returns and restarted the webpack container and it all worked as expected.

Only took me 12 hours to figure it out!