SUSE / Portus

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

docker-compose up Generating error because of ruby's version? #2197

Closed rhuankarlus closed 4 years ago

rhuankarlus commented 5 years ago

Description

I've started installing Portus via docker pull but it failed to get accessible, so I went to an underground approach using docker-compose up inside the examples/compose folder. When I ran the command I've got the following error caming from the background_1 container:

background_1  | /usr/bin/bundle:23:in `load': cannot load such file -- /usr/lib64/ruby/gems/2.6.0/gems/bundler-1.16.4/exe/bundle (LoadError)
background_1  |     from /usr/bin/bundle:23:in `<main>'

Steps to reproduce

  1. git clone https://github.com/SUSE/Portus.git
  2. cd Portus/examples/compose
  3. Change FQDN inside .env file
  4. Insert .key and .crt files inside secrets directory
  5. Run docker-compose up -d

Here's the full log for more information:

root@me:~/github/Portus/examples/compose# docker-compose up 
Starting compose_db_1 ... done
Starting compose_portus_1 ... done
Starting compose_background_1 ... done
Starting compose_registry_1   ... done
Attaching to compose_db_1, compose_portus_1, compose_registry_1, compose_background_1
db_1          | 190520 17:45:30 [Note] mysqld (mysqld 10.0.23-MariaDB-1~jessie) starting as process 1 ...
db_1          | 190520 17:45:30 [Note] InnoDB: Using mutexes to ref count buffer pool pages
db_1          | 190520 17:45:30 [Note] InnoDB: The InnoDB memory heap is disabled
db_1          | 190520 17:45:30 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1          | 190520 17:45:30 [Note] InnoDB: Memory barrier is not used
db_1          | 190520 17:45:30 [Note] InnoDB: Compressed tables use zlib 1.2.8
db_1          | 190520 17:45:30 [Note] InnoDB: Using Linux native AIO
db_1          | 190520 17:45:30 [Note] InnoDB: Using CPU crc32 instructions
db_1          | 190520 17:45:30 [Note] InnoDB: Initializing buffer pool, size = 256.0M
db_1          | 190520 17:45:30 [Note] InnoDB: Completed initialization of buffer pool
db_1          | 190520 17:45:30 [Note] InnoDB: Highest supported file format is Barracuda.
db_1          | 190520 17:45:30 [Note] InnoDB: 128 rollback segment(s) are active.
db_1          | 190520 17:45:30 [Note] InnoDB: Waiting for purge to start
db_1          | 190520 17:45:30 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-76.0 started; log sequence number 2185799
db_1          | 190520 17:45:30 [Note] Plugin 'FEEDBACK' is disabled.
db_1          | 190520 17:45:30 [Note] Server socket created on IP: '::'.
db_1          | 190520 17:45:30 [Warning] 'proxies_priv' entry '@% root@ff57fe270514' ignored in --skip-name-resolve mode.
db_1          | 190520 17:45:30 [Note] mysqld: ready for connections.
db_1          | Version: '10.0.23-MariaDB-1~jessie'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
registry_1    | time="2019-05-20T17:45:31Z" level=info msg="debug server listening 0.0.0.0:5001" 
registry_1    | time="2019-05-20T17:45:31Z" level=warning msg="No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable." go.version=go1.7.6 instance.id=bacbc0d0-5a87-41c1-9bbb-159d5cc6cf4b version=v2.6.2-14-ga66a4c3 
registry_1    | time="2019-05-20T17:45:31Z" level=info msg="configuring endpoint portus (http://pop-os:3000/v2/webhooks/events), timeout=2s, headers=map[]" go.version=go1.7.6 instance.id=bacbc0d0-5a87-41c1-9bbb-159d5cc6cf4b version=v2.6.2-14-ga66a4c3 
registry_1    | time="2019-05-20T17:45:31Z" level=info msg="redis not configured" go.version=go1.7.6 instance.id=bacbc0d0-5a87-41c1-9bbb-159d5cc6cf4b version=v2.6.2-14-ga66a4c3 
registry_1    | time="2019-05-20T17:45:31Z" level=info msg="Starting upload purge in 42m0s" go.version=go1.7.6 instance.id=bacbc0d0-5a87-41c1-9bbb-159d5cc6cf4b version=v2.6.2-14-ga66a4c3 
registry_1    | time="2019-05-20T17:45:31Z" level=info msg="listening on [::]:5000" go.version=go1.7.6 instance.id=bacbc0d0-5a87-41c1-9bbb-159d5cc6cf4b version=v2.6.2-14-ga66a4c3 
portus_1      | /usr/bin/bundle:23:in `load': cannot load such file -- /usr/lib64/ruby/gems/2.6.0/gems/bundler-1.16.4/exe/bundle (LoadError)
portus_1      |     from /usr/bin/bundle:23:in `<main>'
portus_1      | Database ready
background_1  | /usr/bin/bundle:23:in `load': cannot load such file -- /usr/lib64/ruby/gems/2.6.0/gems/bundler-1.16.4/exe/bundle (LoadError)
background_1  |     from /usr/bin/bundle:23:in `<main>'
background_1  | Database ready
portus_1      | [34] Puma starting in cluster mode...
portus_1      | [34] * Version 3.12.1 (ruby 2.6.3-p62), codename: Llamas in Pajamas
portus_1      | [34] * Min threads: 1, max threads: 4
portus_1      | [34] * Environment: production
portus_1      | [34] * Process workers: 4
portus_1      | [34] * Preloading application
portus_1      | [schema] Selected the schema for mysql
portus_1      | [Mailer config] Host:     pop-os
portus_1      | [Mailer config] Protocol: https://
portus_1      | Creating scope :owner. Overwriting existing method TeamUser.owner.
portus_1      | Creating scope :contributor. Overwriting existing method TeamUser.contributor.
portus_1      | Creating scope :viewer. Overwriting existing method TeamUser.viewer.
portus_1      | [34] * Listening on tcp://0.0.0.0:3000
portus_1      | [34] ! WARNING: Detected 1 Thread(s) started in app boot:
portus_1      | [34] ! #<Thread:0x0000558934f7d790@/srv/Portus/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:299 sleep> - /srv/Portus/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:301:in `sleep'
portus_1      | [34] Use Ctrl-C to stop
portus_1      | [34] - Worker 0 (pid: 36) booted, phase: 0
portus_1      | [34] - Worker 1 (pid: 39) booted, phase: 0
portus_1      | [34] - Worker 2 (pid: 48) booted, phase: 0
portus_1      | [34] - Worker 3 (pid: 56) booted, phase: 0
background_1  | [schema] Selected the schema for mysql
background_1  | [Mailer config] Host:     pop-os
background_1  | [Mailer config] Protocol: https://
background_1  | Creating scope :owner. Overwriting existing method TeamUser.owner.
background_1  | Creating scope :contributor. Overwriting existing method TeamUser.contributor.
background_1  | Creating scope :viewer. Overwriting existing method TeamUser.viewer.
background_1  | /usr/bin/bundle:23:in `load': cannot load such file -- /usr/lib64/ruby/gems/2.6.0/gems/bundler-1.16.4/exe/bundle (LoadError)
background_1  |     from /usr/bin/bundle:23:in `<main>'
jasonnoble commented 5 years ago

Rolling back to the last tagged version gets rid of the error:

diff --git a/examples/compose/docker-compose.yml b/examples/compose/docker-compose.yml
index 78de7fe8..74ba2630 100644
--- a/examples/compose/docker-compose.yml
+++ b/examples/compose/docker-compose.yml
@@ -2,7 +2,7 @@ version: "2"

 services:
   portus:
-    image: opensuse/portus:head
+    image: opensuse/portus:2.4.3
     environment:
       - PORTUS_MACHINE_FQDN_VALUE=${MACHINE_FQDN}

@@ -34,7 +34,7 @@ services:
       - static:/srv/Portus/public

   background:
-    image: opensuse/portus:head
+    image: opensuse/portus:2.4.3
     depends_on:
       - portus
       - db

// @mssola

NoyHaim commented 5 years ago

I have the same issue..

stale[bot] commented 5 years ago

Thanks for all your contributions! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

SuperSandro2000 commented 4 years ago

Why got this closed?

rhuankarlus commented 4 years ago

@SuperSandro2000 it was closed by the Stale - bot 🤦‍♂

SuperSandro2000 commented 4 years ago

I know that and I honestly believe that he is the worst thing this platform has seen since a longer time.

zhangyoufu commented 4 years ago

FYI, this is a bug in bundler and fixed by https://github.com/rubygems/bundler/pull/6689. The author wrote a blog post explaining the debugging procedure in details.