Database Migration of old version to the lastest of fabmanager

sure!

RAILS_LOCALE=pt-BR
APP_LOCALE=pt
MOMENT_LOCALE=pt
SUMMERNOTE_LOCALE=pt-BR
ANGULAR_LOCALE=pt
FULLCALENDAR_LOCALE=pt

POSTGRESQL_LANGUAGE_ANALYZER=portuguese

TIME_ZONE=Brasilia
WEEK_STARTING_DAY=monday
D3_DATE_FORMAT=%d/%m/%y
UIB_DATE_FORMAT=dd/MM/yyyy
EXCEL_DATE_FORMAT=dd/mm/yyyy

Well, it works like a charm here with the config you gave…
Maybe you can try to post here the output of the assets compilation command (bundle exec rake assets:precompile) ?

Well, it works like a charm here with the config you gave…
Maybe you can try to post here the output of the assets compilation command (bundle exec rake assets:precompile) ?

Sure!

here: LogFabamanger

Well, the link you gave me is empty… can you check?

Sure!

Please, check it again @Sylvain!

Logs

1 « J'aime »

@Sylvain, seaching about the redirect problem, I found it a answer saying that the problem is about « client side routing was faulty »( link Here ), would be it a clue?

but I did not have a conclusion until now, and I am still stucked on this.

have any idea what should I investigate?

I have talked with the network administrator again, and he still says that everything is like a bypass, direct connection by the DNS to the VM. :sob::sob::sob::sob::sob:

Hi Sergio,
I’m just back from hollidays and I checked your problem again. Everything seems to work in https. Do you still have an issue?

Hi @Syvain, hope you have taken a good rest!

Yes, but with good progress.

The system is up, but with some issues about certificate that we are trying to fix, I was with certificate conflicts…

I will try to install our own https certificate on nginx docker image and I believe it is gonna work.

Just in advance, how can I migrade the old database to the new, that the cenario is two virtual machines separated, only connection by the network, is it simple?

Great!

To migrate the database, you’ll need to copy the /apps/fabmanager/postgresql folder from your old instance to the new one, then run all the TODO DEPLOY commands for the intermediate versions (basically, at least, rails db:migrate and rails db:seed, plus some maintenance tasks)

Hi @Sylvain, thanks for the support!

I have changed the postgresql folder (copied the fabmanager production VM to the new fabmanager vm) and made the commands:

docker-compose exec fabmanager bundle exec rails db:migrate

    rails aborted!
    PG::ConnectionBad: could not translate host name "postgres" to address: Try again
    /usr/local/bundle/gems/pg-1.2.2/lib/pg.rb:58:in `initialize'
    /usr/local/bundle/gems/pg-1.2.2/lib/pg.rb:58:in `new'
    /usr/local/bundle/gems/pg-1.2.2/lib/pg.rb:58:in `connect'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:692:in `connect'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:223:in `initialize'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `new'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `postgresql_connection'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:830:in `new_connection'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:538:in `checkout'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1033:in `retrieve_connection'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_handling.rb:90:in `connection'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/model_schema.rb:466:in `load_schema!'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/attributes.rb:234:in `load_schema!'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/attribute_decorators.rb:51:in `load_schema!'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/model_schema.rb:459:in `block in load_schema'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/model_schema.rb:456:in `load_schema'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/model_schema.rb:336:in `columns_hash'
    /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/core.rb:188:in `find_by'
    /usr/src/app/app/models/auth_provider.rb:34:in `active'
    /usr/src/app/lib/omni_auth/omni_auth.rb:3:in `<main>'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:49:in `require_relative'
    /usr/src/app/config/initializers/devise.rb:231:in `block in <main>'
    /usr/local/bundle/gems/devise-4.7.1/lib/devise.rb:311:in `setup'
    /usr/src/app/config/initializers/devise.rb:5:in `<main>'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:285:in `block in load'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:285:in `load'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:663:in `block in load_config_initializer'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/notifications.rb:170:in `instrument'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:662:in `load_config_initializer'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:619:in `each'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:32:in `instance_exec'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:32:in `run'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:61:in `block in run_initializers'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:50:in `each'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:50:in `tsort_each_child'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:60:in `run_initializers'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/application.rb:361:in `initialize!'
    /usr/src/app/config/environment.rb:5:in `<main>'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/application.rb:337:in `require_environment!'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/application.rb:520:in `block in run_tasks_blocks'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/commands/rake/rake_command.rb:20:in `perform'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/command.rb:48:in `invoke'
    /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/commands.rb:18:in `<main>'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
    /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
    bin/rails:4:in `<main>'
    Tasks: TOP => db:migrate => db:load_config => environment
    (See full trace by running task with --trace)

docker-compose run --rm fabmanager bundle exec rake db:seed

And I got :"Tasks: TOP => db:abort_if_pending_migrations => db:load_config => environment
"

And on the new fabmanger VM, and I got this errors:

`Attaching to fabmanager_redis_1, fabmanager_elasticsearch_1, fabmanager_postgres_1, fabmanager_fabmanager_1, fabmanager_nginx_1
elasticsearch_1  | [2020-08-28T18:05:36,228][INFO ][o.e.n.Node               ] [] initializing ...
elasticsearch_1  | [2020-08-28T18:05:36,372][INFO ][o.e.e.NodeEnvironment    ] [9fxB9Pv] using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/mapper/fablab2020--vg-root)]], net usable_space [830.8gb], net total_space [884.1gb], spins? [possibly], types [ext4]
elasticsearch_1  | [2020-08-28T18:05:36,373][INFO ][o.e.e.NodeEnvironment    ] [9fxB9Pv] heap size [494.9mb], compressed ordinary object pointers [true]
elasticsearch_1  | [2020-08-28T18:05:36,398][INFO ][o.e.n.Node               ] node name [9fxB9Pv] derived from node ID [9fxB9PvQT16VG_PuCMydeQ]; set [node.name] to override
elasticsearch_1  | [2020-08-28T18:05:36,398][INFO ][o.e.n.Node               ] version[5.6.16], pid[1], build[3a740d1/2019-03-13T15:33:36.565Z], OS[Linux/4.4.0-186-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_212/25.212-b01]
elasticsearch_1  | [2020-08-28T18:05:36,399][INFO ][o.e.n.Node               ] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Xms512m, -Xmx512m, -Des.path.home=/usr/share/elasticsearch]
elasticsearch_1  | [2020-08-28T18:05:37,705][INFO ][o.e.p.PluginsService     ] [9fxB9Pv] loaded module [aggs-matrix-stats]
elasticsearch_1  | [2020-08-28T18:05:37,706][INFO ][o.e.p.PluginsService     ] [9fxB9Pv] loaded module [ingest-common]
elasticsearch_1  | [2020-08-28T18:05:37,706][INFO ][o.e.p.PluginsService     ] [9fxB9Pv] loaded module [lang-expression]
elasticsearch_1  | [2020-08-28T18:05:37,706][INFO ][o.e.p.PluginsService     ] [9fxB9Pv] loaded module [lang-groovy]
elasticsearch_1  | [2020-08-28T18:05:37,706][INFO ][o.e.p.PluginsService     ] [9fxB9Pv] loaded module [lang-mustache]
elasticsearch_1  | [2020-08-28T18:05:37,706][INFO ][o.e.p.PluginsService     ] [9fxB9Pv] loaded module [lang-painless]
elasticsearch_1  | [2020-08-28T18:05:37,706][INFO ][o.e.p.PluginsService     ] [9fxB9Pv] loaded module [parent-join]
elasticsearch_1  | [2020-08-28T18:05:37,706][INFO ][o.e.p.PluginsService     ] [9fxB9Pv] loaded module [percolator]
elasticsearch_1  | [2020-08-28T18:05:37,706][INFO ][o.e.p.PluginsService     ] [9fxB9Pv] loaded module [reindex]
elasticsearch_1  | [2020-08-28T18:05:37,706][INFO ][o.e.p.PluginsService     ] [9fxB9Pv] loaded module [transport-netty3]
elasticsearch_1  | [2020-08-28T18:05:37,706][INFO ][o.e.p.PluginsService     ] [9fxB9Pv] loaded module [transport-netty4]
elasticsearch_1  | [2020-08-28T18:05:37,707][INFO ][o.e.p.PluginsService     ] [9fxB9Pv] no plugins loaded
nginx_1          | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx_1          | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
fabmanager_1     | 2020-08-28 18:05:36,327 INFO Set uid to user 0 succeeded
fabmanager_1     | 2020-08-28 18:05:36,334 CRIT Server 'unix_http_server' running without any HTTP authentication checking
fabmanager_1     | 2020-08-28 18:05:36,334 INFO supervisord started with pid 1
fabmanager_1     | 2020-08-28 18:05:37,337 INFO spawned: 'app' with pid 9
fabmanager_1     | 2020-08-28 18:05:37,339 INFO spawned: 'worker' with pid 10
postgres_1       |
postgres_1       | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_1       |
postgres_1       | FATAL:  database files are incompatible with server
postgres_1       | DETAIL:  The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.6.19.
redis_1          | 1:C 28 Aug 2020 18:05:34.181 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1          | 1:C 28 Aug 2020 18:05:34.181 # Redis version=6.0.6, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1          | 1:C 28 Aug 2020 18:05:34.181 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1          | 1:M 28 Aug 2020 18:05:34.183 * Running mode=standalone, port=6379.
redis_1          | 1:M 28 Aug 2020 18:05:34.183 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1          | 1:M 28 Aug 2020 18:05:34.183 # Server initialized
redis_1          | 1:M 28 Aug 2020 18:05:34.183 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1          | 1:M 28 Aug 2020 18:05:34.183 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1          | 1:M 28 Aug 2020 18:05:34.184 * Loading RDB produced by version 6.0.6
redis_1          | 1:M 28 Aug 2020 18:05:34.184 * RDB age 6 seconds
redis_1          | 1:M 28 Aug 2020 18:05:34.184 * RDB memory usage when created 0.81 Mb
redis_1          | 1:M 28 Aug 2020 18:05:34.184 * DB loaded from disk: 0.001 seconds
redis_1          | 1:M 28 Aug 2020 18:05:34.184 * Ready to accept connections
nginx_1          | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx_1          | 10-listen-on-ipv6-by-default.sh: error: /etc/nginx/conf.d/default.conf is not a file or does not exist
nginx_1          | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx_1          | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx_1          | nginx: [warn] "ssl_stapling" ignored, issuer certificate not found for certificate "/etc/nginx/conf.d/ssl/unisanta.crt"
elasticsearch_1  | [2020-08-28T18:05:38,020][WARN ][o.e.d.c.s.Settings       ] [script.inline] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
elasticsearch_1  | [2020-08-28T18:05:38,023][WARN ][o.e.d.c.s.Settings       ] [script.engine.groovy.inline.update] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
fabmanager_1     | 2020-08-28 18:05:38,342 INFO success: app entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
fabmanager_1     | 2020-08-28 18:05:38,342 INFO success: worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
fabmanager_postgres_1 exited with code 1
postgres_1       |
postgres_1       | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_1       |
postgres_1       | FATAL:  database files are incompatible with server
postgres_1       | DETAIL:  The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.6.19.
elasticsearch_1  | [2020-08-28T18:05:41,227][INFO ][o.e.d.DiscoveryModule    ] [9fxB9Pv] using discovery type [zen]
elasticsearch_1  | [2020-08-28T18:05:42,247][INFO ][o.e.n.Node               ] initialized
elasticsearch_1  | [2020-08-28T18:05:42,247][INFO ][o.e.n.Node               ] [9fxB9Pv] starting ...
elasticsearch_1  | [2020-08-28T18:05:42,454][INFO ][o.e.t.TransportService   ] [9fxB9Pv] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
elasticsearch_1  | [2020-08-28T18:05:42,474][WARN ][o.e.b.BootstrapChecks    ] [9fxB9Pv] max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
postgres_1       |
postgres_1       | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_1       |
postgres_1       | FATAL:  database files are incompatible with server
postgres_1       | DETAIL:  The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.6.19.
fabmanager_postgres_1 exited with code 1
fabmanager_1     | 2020-08-28 18:05:45,227 INFO exited: app (exit status 1; not expected)
fabmanager_1     | 2020-08-28 18:05:45,279 INFO spawned: 'app' with pid 15
fabmanager_1     | 2020-08-28 18:05:45,279 INFO exited: worker (exit status 1; not expected)
elasticsearch_1  | [2020-08-28T18:05:45,541][INFO ][o.e.c.s.ClusterService   ] [9fxB9Pv] new_master {9fxB9Pv}{9fxB9PvQT16VG_PuCMydeQ}{QJurz_moTGGr_Kg_-s1Waw}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
elasticsearch_1  | [2020-08-28T18:05:45,580][INFO ][o.e.h.n.Netty4HttpServerTransport] [9fxB9Pv] publish_address {172.19.0.4:9200}, bound_addresses {0.0.0.0:9200}
elasticsearch_1  | [2020-08-28T18:05:45,580][INFO ][o.e.n.Node               ] [9fxB9Pv] started
elasticsearch_1  | [2020-08-28T18:05:45,872][INFO ][o.e.g.GatewayService     ] [9fxB9Pv] recovered [2] indices into cluster_state
fabmanager_1     | 2020-08-28 18:05:46,280 INFO success: app entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
fabmanager_1     | 2020-08-28 18:05:46,283 INFO spawned: 'worker' with pid 16
elasticsearch_1  | [2020-08-28T18:05:46,287][INFO ][o.e.c.r.a.AllocationService] [9fxB9Pv] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[stats][4], [stats][0]] ...]).
postgres_1       |
postgres_1       | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_1       |
postgres_1       | FATAL:  database files are incompatible with server
postgres_1       | DETAIL:  The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.6.19.
fabmanager_postgres_1 exited with code 1
fabmanager_1     | 2020-08-28 18:05:47,285 INFO success: worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
fabmanager_1     | 2020-08-28 18:05:52,559 INFO exited: app (exit status 1; not expected)
postgres_1       |
postgres_1       | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_1       |
postgres_1       | FATAL:  database files are incompatible with server
postgres_1       | DETAIL:  The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.6.19.
fabmanager_1     | 2020-08-28 18:05:53,562 INFO spawned: 'app' with pid 21
fabmanager_postgres_1 exited with code 1
fabmanager_1     | 2020-08-28 18:05:53,844 INFO exited: worker (exit status 1; not expected)
fabmanager_1     | 2020-08-28 18:05:54,845 INFO success: app entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
fabmanager_1     | 2020-08-28 18:05:54,847 INFO spawned: 'worker' with pid 23
fabmanager_1     | 2020-08-28 18:05:55,848 INFO success: worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
fabmanager_1     | 2020-08-28 18:06:00,832 INFO exited: app (exit status 1; not expected)
fabmanager_1     | 2020-08-28 18:06:01,835 INFO spawned: 'app' with pid 27
fabmanager_1     | 2020-08-28 18:06:02,346 INFO exited: worker (exit status 1; not expected)
fabmanager_1     | 2020-08-28 18:06:03,348 INFO success: app entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
fabmanager_1     | 2020-08-28 18:06:03,349 INFO spawned: 'worker' with pid 29
fabmanager_1     | 2020-08-28 18:06:04,351 INFO success: worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)`

on app-stderr.log:

/usr/local/bundle/gems/pg-1.2.2/lib/pg.rb:58:in `initialize': could not connect to server: Host is unreachable (PG::ConnectionBad)
        Is the server running on host "postgres" (172.19.0.3) and accepting
        TCP/IP connections on port 5432?
        from /usr/local/bundle/gems/pg-1.2.2/lib/pg.rb:58:in `new'
        from /usr/local/bundle/gems/pg-1.2.2/lib/pg.rb:58:in `connect'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:692:in `connect'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:223:in `initialize'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `new'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `postgresql_connection'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:830:in `new_connection'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:538:in `checkout'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1033:in `retrieve_connection'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_handling.rb:90:in `connection'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/model_schema.rb:466:in `load_schema!'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/attributes.rb:234:in `load_schema!'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/attribute_decorators.rb:51:in `load_schema!'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/model_schema.rb:459:in `block in load_schema'
        from /usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/model_schema.rb:456:in `load_schema'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/model_schema.rb:336:in `columns_hash'
        from /usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/core.rb:188:in `find_by'
        from /usr/src/app/app/models/auth_provider.rb:34:in `active'
        from /usr/src/app/lib/omni_auth/omni_auth.rb:3:in `<main>'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:49:in `require_relative'
        from /usr/src/app/config/initializers/devise.rb:231:in `block in <main>'
        from /usr/local/bundle/gems/devise-4.7.1/lib/devise.rb:311:in `setup'
        from /usr/src/app/config/initializers/devise.rb:5:in `<main>'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:285:in `block in load'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:285:in `load'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:663:in `block in load_config_initializer'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/notifications.rb:170:in `instrument'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:662:in `load_config_initializer'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:619:in `each'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:32:in `instance_exec'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:32:in `run'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:61:in `block in run_initializers'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:50:in `each'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:50:in `tsort_each_child'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:415:in `call'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:415:in `each_strongly_connected_component_from'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in `each'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in `call'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
        from /usr/local/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:60:in `run_initializers'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/application.rb:361:in `initialize!'
        from /usr/src/app/config/environment.rb:5:in `<main>'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
        from config.ru:3:in `block in <main>'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/commands/server/server_command.rb:27:in `app'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:312:in `block in start'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:379:in `handle_profiling'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:311:in `start'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/commands/server/server_command.rb:53:in `start'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/commands/server/server_command.rb:147:in `block in perform'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/commands/server/server_command.rb:142:in `tap'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/commands/server/server_command.rb:142:in `perform'
        from /usr/local/bundle/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
        from /usr/local/bundle/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
        from /usr/local/bundle/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/command/base.rb:69:in `perform'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/command.rb:46:in `invoke'
        from /usr/local/bundle/gems/railties-5.2.4.3/lib/rails/commands.rb:18:in `<main>'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
        from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
        from /usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
        from bin/rails:4:in `<main>'

and worker-sdterr.log:

could not translate host name "postgres" to address: Try again
/usr/local/bundle/gems/pg-1.2.2/lib/pg.rb:58:in `initialize'
/usr/local/bundle/gems/pg-1.2.2/lib/pg.rb:58:in `new'
/usr/local/bundle/gems/pg-1.2.2/lib/pg.rb:58:in `connect'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:692:in `connect'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:223:in `initialize'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `new'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `postgresql_connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:830:in `new_connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:538:in `checkout'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1033:in `retrieve_connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_handling.rb:90:in `connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/model_schema.rb:466:in `load_schema!'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/attributes.rb:234:in `load_schema!'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/attribute_decorators.rb:51:in `load_schema!'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/model_schema.rb:459:in `block in load_schema'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/model_schema.rb:456:in `load_schema'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/model_schema.rb:336:in `columns_hash'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/core.rb:188:in `find_by'
/usr/src/app/app/models/auth_provider.rb:34:in `active'
/usr/src/app/lib/omni_auth/omni_auth.rb:3:in `<main>'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
/usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:49:in `require_relative'
/usr/src/app/config/initializers/devise.rb:231:in `block in <main>'
/usr/local/bundle/gems/devise-4.7.1/lib/devise.rb:311:in `setup'
/usr/src/app/config/initializers/devise.rb:5:in `<main>'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load'
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load'
/usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:285:in `block in load'
/usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:285:in `load'
/usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:663:in `block in load_config_initializer'
/usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/notifications.rb:170:in `instrument'
/usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:662:in `load_config_initializer'
/usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
/usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:619:in `each'
/usr/local/bundle/gems/railties-5.2.4.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
/usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:32:in `instance_exec'
/usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:32:in `run'
/usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:61:in `block in run_initializers'
/usr/local/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
/usr/local/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/usr/local/lib/ruby/2.6.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
/usr/local/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
/usr/local/lib/ruby/2.6.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
/usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:50:in `each'
/usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:50:in `tsort_each_child'
/usr/local/lib/ruby/2.6.0/tsort.rb:415:in `call'
/usr/local/lib/ruby/2.6.0/tsort.rb:415:in `each_strongly_connected_component_from'
/usr/local/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
/usr/local/lib/ruby/2.6.0/tsort.rb:347:in `each'
/usr/local/lib/ruby/2.6.0/tsort.rb:347:in `call'
/usr/local/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
/usr/local/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
/usr/local/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
/usr/local/bundle/gems/railties-5.2.4.3/lib/rails/initializable.rb:60:in `run_initializers'
/usr/local/bundle/gems/railties-5.2.4.3/lib/rails/application.rb:361:in `initialize!'
/usr/src/app/config/environment.rb:5:in `<top (required)>'
/usr/local/bundle/gems/sidekiq-6.0.7/lib/sidekiq/cli.rb:252:in `require'
/usr/local/bundle/gems/sidekiq-6.0.7/lib/sidekiq/cli.rb:252:in `boot_system'
/usr/local/bundle/gems/sidekiq-6.0.7/lib/sidekiq/cli.rb:37:in `run'
/usr/local/bundle/gems/sidekiq-6.0.7/bin/sidekiq:31:in `<top (required)>'
/usr/local/bundle/bin/sidekiq:23:in `load'
/usr/local/bundle/bin/sidekiq:23:in `<top (required)>'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/usr/local/bundle/bin/bundle:23:in `load'
/usr/local/bundle/bin/bundle:23:in `<main>'

I believe that the fabamanger app is not connection on postgre image now.

So I was thinking about postgre user login, may it be wrong? something about the Internal docker ip network, may it be a problem?

I realized that I do not know what version of production fabmanager I am. How can I just see?:sweat_smile:

It seems that is not connecting to postgree image docker, Would be a internal IP problem after postgre subfolder change?

I do not know how to get my fabamanger version to see what is the precedure to get the migration done.

I have logged with wrong user here(inovfablab :sweat_smile: ). the answer is good for you ?? Something about the answer that is occulted. I do not know why.

here:

postgres_1       |
postgres_1       | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_1       |
postgres_1       | FATAL:  database files are incompatible with server
postgres_1       | DETAIL:  The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.6.19.
fabmanager_postgres_1 exited with code 1

What do you suggest @Sylvain ? upgrade the postgree image docker by cmd?

Hi Sergio,

You must follow this procedure to upgrade your postgreSQL database from 9.4 to 9.6 : fab-manager/postgres_upgrade.md at master · sleede/fab-manager · GitHub

Hi Sylvain, sorry about delay!

I have upgraded the database postgree to 9.6 (everything looked good on upgrade process script)

But when I tried to up the system I got the error on postgree docker container:

PostgreSQL Database directory appears to contain a database; Skipping initialization

LOG:  database system was shut down at 2020-09-22 14:24:06 UTC


LOG:  MultiXact member wraparound protections are now enabled


LOG:  database system is ready to accept connections


LOG:  autovacuum launcher started


ERROR:  relation "history_values" does not exist at character 566


STATEMENT:                SELECT a.attname, format_type(a.atttypid, a.atttypmod),


	                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,


	                     c.collname, col_description(a.attrelid, a.attnum) AS comment


	                FROM pg_attribute a


	                LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum


	                LEFT JOIN pg_type t ON a.atttypid = t.oid


	                LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation


	               WHERE a.attrelid = '"history_values"'::regclass


	                 AND a.attnum > 0 AND NOT a.attisdropped


	               ORDER BY a.attnum


	


FATAL:  terminating connection due to unexpected postmaster exit


FATAL:  terminating connection due to unexpected postmaster exit




PostgreSQL Database directory appears to contain a database; Skipping initialization




LOG:  database system was interrupted; last known up at 2020-09-22 14:24:19 UTC


LOG:  database system was not properly shut down; automatic recovery in progress


LOG:  invalid record length at 0/58085610: wanted 24, got 0


G:  redo is not required


LOG:  MultiXact member wraparound protections are now enabled


LOG:  database system is ready to accept connections


LOG:  autovacuum launcher started


ERROR:  relation "history_values" does not exist at character 566


STATEMENT:                SELECT a.attname, format_type(a.atttypid, a.atttypmod),


	                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,


	                     c.collname, col_description(a.attrelid, a.attnum) AS comment


	                FROM pg_attribute a


	                LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum


	                LEFT JOIN pg_type t ON a.atttypid = t.oid


	                LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation


	               WHERE a.attrelid = '"history_values"'::regclass


	                 AND a.attnum > 0 AND NOT a.attisdropped


	               ORDER BY a.attnum

Do you know What could be?

should I continue with the fabmanager upgrade anyway?

The database seems to startup correctly (see LOG: database system is ready to accept connections). Then comes the issue ERROR: relation "history_values" does not exist at character 566. If think this can be fixed with the following:

docker-compose run --rm fabmanager bundle exec rake db:migrate

Nice!

Running the cmd, I got this:

docker-compose run --rm fabmanager bundle exec rake db:migrate

Starting fabmanager_redis_1         ... done
Starting fabmanager_elasticsearch_1 ... done
Starting fabmanager_postgres_1      ... done
Starting fabmanager_elasticsearch_1 ... done
Starting fabmanager_redis_1         ... done
Starting fabmanager_postgres_1      ... done
  AuthProvider Load (1.3ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]                                                                                                                                                             ]
  AuthProvider Load (1.0ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]                                                                                                                                                             ]
2020-09-23T17:48:45.803Z pid=1 tid=gq47wfm6d middleware=SidekiqUniqueJobs::Clien                                                                                                                                                             t::Middleware unique_digest=uniquejobs:86311f9a63c73dba95cf40e8c8a07b12 INFO: Ad                                                                                                                                                             ding dead VersionCheckWorker job fad3c0e49f29344bd32bce0d
  AuthProvider Load (0.8ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]                                                                                                                                                             ]
  AuthProvider Load (1.6ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]                                                                                                                                                             ]
   (286.0ms)  CREATE TABLE "ar_internal_metadata" ("key" character varying NOT N                                                                                                                                                             ULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "up                                                                                                                                                             dated_at" timestamp NOT NULL)
   (10.6ms)  SELECT pg_try_advisory_lock(367513146985461015)
   (16.1ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER                                                                                                                                                              BY "schema_migrations"."version" ASC
Migrating to RenameExpiredAtToExpirationDateFromSubscription (20181210105917)
   (1.6ms)  BEGIN
== 20181210105917 RenameExpiredAtToExpirationDateFromSubscription: migrating ==
-- rename_column(:subscriptions, :expired_at, :expiration_date)
   (47.0ms)  ALTER TABLE "subscriptions" RENAME COLUMN "expired_at" TO "expirati                                                                                                                                                             on_date"
   -> 0.0555s
== 20181210105917 RenameExpiredAtToExpirationDateFromSubscription: migrated (0.0                                                                                                        bundler: command not found: c
Install missing gem executables with `bundle install`
root@FABLABTESTE:/apps/fabmanager# docker-compose run --rm fabmanager bundle exec rake db:migrate --trace
Starting fabmanager_postgres_1      ... done
Starting fabmanager_elasticsearch_1 ... done
Starting fabmanager_redis_1         ... done
** Invoke db:migrate (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
  AuthProvider Load (0.9ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]]
  AuthProvider Load (0.9ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]]
2020-09-23T17:54:46.397Z pid=1 tid=gnpe8bthx middleware=SidekiqUniqueJobs::Client::Middleware unique_digest=uniquejobs:86311f9a63c73dba95cf40e8c8a07b12 INFO: Adding dead VersionCheckWorker job e32da1c6926854392b54dbe7
  AuthProvider Load (0.9ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]]
  AuthProvider Load (1.4ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]]
** Execute db:load_config
** Execute db:migrate
   (0.5ms)  SELECT pg_try_advisory_lock(367513146985461015)
   (1.1ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
Migrating to MigrateSettingsValueToHistoryValues (20181217103441)
   (1.8ms)  BEGIN
== 20181217103441 MigrateSettingsValueToHistoryValues: migrating ==============
  User Load (4.9ms)  SELECT  "users".* FROM "users" INNER JOIN "users_roles" ON "users_roles"."user_id" = "users"."id" INNER JOIN "roles" ON "roles"."id" = "users_roles"."role_id" WHERE (((roles.name = 'admin') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) ORDER BY "users"."id" ASC LIMIT $1  [["LIMIT", 1]]
  Setting Load (7.5ms)  SELECT "settings".* FROM "settings"
   (0.7ms)  ROLLBACK
   (0.8ms)  SELECT pg_advisory_unlock(367513146985461015)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

unknown attribute 'user' for HistoryValue.
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:53:in `_assign_attribute'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:44:in `block in _assign_attributes'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:43:in `each'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:43:in `_assign_attributes'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/attribute_assignment.rb:23:in `_assign_attributes'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:35:in `assign_attributes'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/core.rb:315:in `initialize'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/inheritance.rb:66:in `new'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/inheritance.rb:66:in `new'
/usr/src/app/db/migrate/20181217103441_migrate_settings_value_to_history_values.rb:7:in `block in up'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/relation/delegation.rb:71:in `each'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/relation/delegation.rb:71:in `each'
/usr/src/app/db/migrate/20181217103441_migrate_settings_value_to_history_values.rb:6:in `up'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:817:in `exec_migration'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
/usr/local/lib/ruby/2.6.0/benchmark.rb:293:in `measure'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:797:in `block in migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:796:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:977:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1343:in `block in ddl_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `block in transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/transactions.rb:212:in `transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1343:in `ddl_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1262:in `each'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1210:in `block in migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1210:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1036:in `up'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1011:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <main>'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:160:in `invoke_task'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:116:in `each'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:116:in `block in top_level'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:110:in `top_level'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:83:in `block in run'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
/usr/local/bundle/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/rake:23:in `load'
/usr/local/bundle/bin/rake:23:in `<top (required)>'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/usr/local/bundle/bin/bundle:23:in `load'
/usr/local/bundle/bin/bundle:23:in `<main>'

Caused by:
ActiveModel::UnknownAttributeError: unknown attribute 'user' for HistoryValue.
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:53:in `_assign_attribute'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:44:in `block in _assign_attributes'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:43:in `each'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:43:in `_assign_attributes'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/attribute_assignment.rb:23:in `_assign_attributes'
/usr/local/bundle/gems/activemodel-5.2.4.3/lib/active_model/attribute_assignment.rb:35:in `assign_attributes'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/core.rb:315:in `initialize'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/inheritance.rb:66:in `new'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/inheritance.rb:66:in `new'
/usr/src/app/db/migrate/20181217103441_migrate_settings_value_to_history_values.rb:7:in `block in up'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/relation/delegation.rb:71:in `each'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/relation/delegation.rb:71:in `each'
/usr/src/app/db/migrate/20181217103441_migrate_settings_value_to_history_values.rb:6:in `up'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:817:in `exec_migration'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
/usr/local/lib/ruby/2.6.0/benchmark.rb:293:in `measure'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:797:in `block in migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:796:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:977:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1343:in `block in ddl_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `block in transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/transactions.rb:212:in `transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1343:in `ddl_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1262:in `each'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1210:in `block in migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1210:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1036:in `up'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/migration.rb:1011:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/usr/local/bundle/gems/activerecord-5.2.4.3/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <main>'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:160:in `invoke_task'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:116:in `each'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:116:in `block in top_level'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:110:in `top_level'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:83:in `block in run'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/bundle/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
/usr/local/bundle/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/rake:23:in `load'
/usr/local/bundle/bin/rake:23:in `<top (required)>'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/usr/local/bundle/bin/bundle:23:in `load'
/usr/local/bundle/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate

and the aplication is still down.

Hi @Sergio, can you tell me what was your previous version fo Fab-manager and what’s the current one?

Sure!

2.6.7

I have never Upgraded it! Better now, than never !:sweat_smile:

actually the database of fabamanger has a lot of user registrations (around 2k now, in 1 year), and We always was afraid of something get wrong on the upgrade process (like today), but now we have a testing eviroment, so it is safier.

Hi @Sylvain, In another attempt to have upgrade, I made pull from my image and tried to upgrade from 2.6.7 to 2.7.0, then keep going step by step until the newest version, but I got some issues that make the system be down.

First I changed the docker-compose.yml to v2.7.0

...
 fabmanager:
    image: sleede/fab-manager:release-v2.7.0
    environment:
...

And I followed the procedure (from here):

go to your app folder

cd /apps/fabmanager

pull last docker images

docker-compose pull

stop the app

docker-compose stop fabmanager

remove old assets

rm -Rf public/assets/

compile new assets

docker-compose run --rm fabmanager bundle exec rails assets:precompile (here would be "rake" or "rails"?)

then here the results:

 docker-compose pull
Pulling postgres      ... done
Pulling elasticsearch ... done
Pulling redis         ... done
Pulling fabmanager    ... done
Pulling nginx         ... done
root@FABLABTESTE:/apps/fabmanager# docker-compose stop fabmanager
Stopping fabmanager_fabmanager_1 ... done
root@FABLABTESTE:/apps/fabmanager# rm -Rf public/assets/
root@FABLABTESTE:/apps/fabmanager# docker-compose run --rm fabmanager bundle exe                                                                                                                                                             c rails assets:precompile
Starting fabmanager_redis_1 ... done
Starting fabmanager_elasticsearch_1 ... done
Starting fabmanager_postgres_1      ... done
Error: Command 'assets:precompile' not recognized
Did you mean: `$ rake assets:precompile` ?

Usage: rails COMMAND [ARGS]

The most common rails commands are:
 generate    Generate new code (short-cut alias: "g")
 console     Start the Rails console (short-cut alias: "c")
 server      Start the Rails server (short-cut alias: "s")
 dbconsole   Start a console for the database specified in config/database.yml
             (short-cut alias: "db")
 new         Create a new Rails application. "rails new my_app" creates a
             new application called MyApp in "./my_app"

In addition to those, there are:
 destroy      Undo code generated with "generate" (short-cut alias: "d")
 plugin new   Generates skeleton for developing a Rails plugin
 runner       Run a piece of code in the application environment (short-cut alia                                                                                                                                                             s: "r")

All commands can be run with -h (or --help) for more information.
root@FABLABTESTE:/apps/fabmanager# docker-compose run --rm fabmanager bundle exe                                                                                                                                                             c rake assets:precompile
Starting fabmanager_redis_1 ... done
Starting fabmanager_postgres_1      ... done
Starting fabmanager_elasticsearch_1 ... done
  AuthProvider Load (0.9ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT 1  [["status", "active"]]
  AuthProvider Load (0.6ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT 1  [["status", "active"]]
  AuthProvider Load (0.5ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT 1  [["status", "active"]]
  AuthProvider Load (1.3ms)  SELECT  "auth_providers".* FROM "auth_providers" WH                                                                                                                                                             ERE "auth_providers"."status" = $1 LIMIT 1  [["status", "active"]]
I, [2020-09-28T17:13:20.533029 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /fablab-logo-439bcddddc31b3a30044f1556f843eab.png
I, [2020-09-28T17:13:20.537035 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /fablab-w-00412c9ebdbe51f6c6e22230757cab94.png
I, [2020-09-28T17:13:20.539947 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /fablab-b187dd3d2e2cbbcfd9df979853d72327.jpg
I, [2020-09-28T17:13:20.542689 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /fablab-1c6db71e84bfcdf219828524a0b30d83.png
I, [2020-09-28T17:13:20.545245 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /favicons/favicon-b24ed6574e1d37b025b17f5330704a0b.ico
I, [2020-09-28T17:13:20.548185 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /fleche-left-37ebe9657a30085f4b2b9bf6d185d040.png
I, [2020-09-28T17:13:20.551411 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /la_casemate-logo-8f8a5f9062fe9d404f24c5eb5d36e61b.png
I, [2020-09-28T17:13:20.554454 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /mastercard-cba3078d24cb85be6fb26cd3766d8dff.png
I, [2020-09-28T17:13:20.557166 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /no_avatar-4ed257f03d2cdc53ab8c2a917a176a6a.png
I, [2020-09-28T17:13:20.559877 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /powered_by_stripe-4e22e57b6a4aecb2292a6175a2941ae0.png
I, [2020-09-28T17:13:20.562702 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /social/dailymotion-629944e3d8ada0c3dca217137bea1204.png
I, [2020-09-28T17:13:20.566416 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /social/echosciences-40437d99a7c69f0aba98e56b6109a80b.png
I, [2020-09-28T17:13:20.569401 #1]  INFO -- : Writing /usr/src/app/public/assets                                                                                                                                                             /visa-c63d23b4f77f4d9256788daea68328fb.png
rake aborted!
Sprockets::FileNotFound: couldn't find file 'jquery-ui/ui/jquery.ui.core'
  (in /usr/src/app/app/assets/javascripts/application.js.erb:17)
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:106:in `resolve                                                                                                                                                             '
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:146:in `require                                                                                                                                                             _asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:217                                                                                                                                                             :in `process_require_directive'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:167                                                                                                                                                             :in `block in process_directives'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:165                                                                                                                                                             :in `each'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:165                                                                                                                                                             :in `process_directives'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/directive_processor.rb:99:                                                                                                                                                             in `evaluate'
/usr/local/bundle/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:197:in `block i                                                                                                                                                             n evaluate'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:194:in `each'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/context.rb:194:in `evaluat                                                                                                                                                             e'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/processed_asset.rb:12:in `                                                                                                                                                             initialize'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:374:in `new'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:374:in `block in b                                                                                                                                                             uild_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:395:in `circular_c                                                                                                                                                             all_protection'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:373:in `build_asse                                                                                                                                                             t'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:94:in `block in b                                                                                                                                                             uild_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/caching.rb:58:in `cache_as                                                                                                                                                             set'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:93:in `build_asse                                                                                                                                                             t'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:287:in `find_asset                                                                                                                                                             '
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:61:in `find_asset                                                                                                                                                             '
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/bundled_asset.rb:16:in `in                                                                                                                                                             itialize'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:377:in `new'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:377:in `build_asse                                                                                                                                                             t'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:94:in `block in b                                                                                                                                                             uild_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/caching.rb:58:in `cache_as                                                                                                                                                             set'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:93:in `build_asse                                                                                                                                                             t'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/base.rb:287:in `find_asset                                                                                                                                                             '
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/index.rb:61:in `find_asset                                                                                                                                                             '
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:211:in `block                                                                                                                                                              in find_asset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:257:in `benchm                                                                                                                                                             ark'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:210:in `find_a                                                                                                                                                             sset'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:119:in `block                                                                                                                                                              in compile'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:118:in `each'
/usr/local/bundle/gems/sprockets-2.12.5/lib/sprockets/manifest.rb:118:in `compil                                                                                                                                                             e'
/usr/local/bundle/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:70:in `                                                                                                                                                             block (3 levels) in define'
/usr/local/bundle/gems/sprockets-2.12.5/lib/rake/sprocketstask.rb:146:in `with_l                                                                                                                                                             ogger'
/usr/local/bundle/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:69:in `                                                                                                                                                             block (2 levels) in define'
/usr/local/bundle/gems/rake-12.2.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
root@FABLABTESTE:/apps/fabmanager#  docker-compose down
Stopping fabmanager_nginx_1         ... done
Stopping fabmanager_redis_1         ... done
Stopping fabmanager_elasticsearch_1 ... done
Stopping fabmanager_postgres_1      ... done
Removing fabmanager_nginx_1         ... done
Removing fabmanager_fabmanager_1    ... done
Removing fabmanager_redis_1         ... done
Removing fabmanager_elasticsearch_1 ... done
Removing fabmanager_postgres_1      ... done
Removing network fabmanager_default
root@FABLABTESTE:/apps/fabmanager# docker-compose up -d
Creating network "fabmanager_default" with the default driver
Creating fabmanager_postgres_1      ... done
Creating fabmanager_elasticsearch_1 ... done
Creating fabmanager_redis_1         ... done
Creating fabmanager_fabmanager_1    ... done
Creating fabmanager_nginx_1         ... done

and got the the system down.

I saw that this version(2.7.0) hasn´t a TODO DEPLOY CMD to do. What could it be too?