fab-manager icon indicating copy to clipboard operation
fab-manager copied to clipboard

Problem after upgrade

Open aukfood opened this issue 2 years ago • 2 comments

@sylvainbx

Describe the bug After upgrade 5.4.4 to 5.4.6 I have some error on fabmanager start, I'll try to upgrade to 5.4.15 and same error

NB before I upgraded step by step from 4.7.10 to 5.4.4 without errors

2022-08-02 12:49:48,069 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2022-08-02 12:49:48,070 INFO supervisord started with pid 1
2022-08-02 12:49:49,072 INFO spawnerr: unknown error making dispatchers for 'app': EACCES
2022-08-02 12:49:49,073 INFO spawnerr: unknown error making dispatchers for 'worker': EACCES
2022-08-02 12:49:50,075 INFO spawnerr: unknown error making dispatchers for 'app': EACCES
2022-08-02 12:49:50,076 INFO spawnerr: unknown error making dispatchers for 'worker': EACCES
2022-08-02 12:49:52,078 INFO spawnerr: unknown error making dispatchers for 'app': EACCES
2022-08-02 12:49:52,079 INFO spawnerr: unknown error making dispatchers for 'worker': EACCES
2022-08-02 12:49:55,085 INFO spawnerr: unknown error making dispatchers for 'app': EACCES
2022-08-02 12:49:55,085 INFO gave up: app entered FATAL state, too many start retries too quickly
2022-08-02 12:49:55,086 INFO spawnerr: unknown error making dispatchers for 'worker': EACCES
2022-08-02 12:49:55,087 INFO gave up: worker entered FATAL state, too many start retries too quickly

And error 500 on web

2022/08/02 12:51:50 [error] 7#7: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.224.2, server: *******.fr, request: "GET / HTTP/1.1", upstream: "http://172.18.0.5:3000/", host: "**********.fr"

Server (please complete the following information):

  • OS: Debian GNU/Linux 10
  • Kernel: 4.19.0-19-cloud-amd64
  • Fab-manager version 5.4.6 to 5.4.15

Browser (please complete the following information):

  • Name: Firefox
  • Version: 103

Additional context Add any other context about the problem here.

aukfood avatar Aug 02 '22 12:08 aukfood

Pour compléter voici ce que j'ai testé

debian@fabmanager:~/fabm-emode$ docker-compose exec fabmanager bundle exec rails assets:precompile
yarn install v1.22.17
warning Skipping preferred cache folder "/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @tiptap/[email protected]" has unmet peer dependency "@tiptap/extension-text-style@^2.0.0-beta.1".
warning "angular-bootstrap-switch > [email protected]" has unmet peer dependency "bootstrap@^4.3.1".
warning " > [email protected]" has incorrect peer dependency "eslint-plugin-n@^14.0.0".
[4/4] Building fresh packages...
warning Cannot find a suitable global folder. Tried these: "/usr/local, /.yarn"
warning Your current version of Yarn is out of date. The latest version is "1.22.19", while you're on "1.22.17".
info To upgrade, run the following command:
$ apk update && apk add -u yarn
Done in 61.98s.
Error: EACCES: permission denied, open '/.yarnrc'
  AuthProvider Load (1.1ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]]
2022-08-02T12:57:33.908Z pid=7 tid=ov27opudn uniquejobs=client until_executed=uniquejobs:cc0574218e68e72b42b613c67a256545 INFO: Adding dead VersionCheckWorker job fb9bb899a4865829117a7d90
  AuthProvider Load (0.6ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]]
  AuthProvider Load (0.5ms)  SELECT  "auth_providers".* FROM "auth_providers" WHERE "auth_providers"."status" = $1 LIMIT $2  [["status", "active"], ["LIMIT", 1]]
I, [2022-08-02T12:57:34.228665 #7]  INFO -- : Compiling...
I, [2022-08-02T13:01:15.670865 #7]  INFO -- : Compiled all packs in /usr/src/app/public/packs
E, [2022-08-02T13:01:15.671021 #7] ERROR -- : warning Skipping preferred cache folder "/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating

I, [2022-08-02T13:01:15.671069 #7]  INFO -- : assets by chunk 3.15 MiB (auxiliary name: application) 36 assets
assets by path js/*.js 5.55 MiB
  assets by status 5.55 MiB [big] 2 assets
  + 3 assets
assets by path css/*.css 478 KiB
  asset css/application-e1737905.css 476 KiB [emitted] [immutable] [minimized] [big] (name: application) 3 related assets
  asset css/printer-9c13df01.css 1.97 KiB [emitted] [immutable] [minimized] (name: printer) 3 related assets
  asset css/plugins-31d6cfe0.css 0 bytes [emitted] [immutable] [minimized] (name: plugins)
assets by path static/*.gz 8.63 KiB
  asset static/social-icons-35635332d130c885a901.svg.gz 4.71 KiB [emitted] [immutable] [compressed]
  asset static/icons-7d9e58b4ff522545d7e8.svg.gz 3.93 KiB [emitted] [immutable] [compressed]
assets by path static/*.br 7.63 KiB
  asset static/social-icons-35635332d130c885a901.svg.br 4.18 KiB [emitted] [immutable] [compressed]
  asset static/icons-7d9e58b4ff522545d7e8.svg.br 3.45 KiB [emitted] [immutable] [compressed]
asset manifest.json 13.9 KiB [emitted] 2 related assets
Entrypoint application [big] 6.02 MiB (24.3 MiB) = js/runtime-d66b648ac2302ca23b08.js 2.23 KiB js/855-05fb1c9a01c56b29579a.js 4.28 MiB css/application-e1737905.css 476 KiB js/application-956a89e4f963bb160ef4.js 1.27 MiB 40 auxiliary assets
Entrypoint plugins 2.37 KiB (10.9 KiB) = js/runtime-d66b648ac2302ca23b08.js 2.23 KiB css/plugins-31d6cfe0.css 0 bytes js/plugins-033f3a141641f8dc9d6e.js 146 bytes 1 auxiliary asset
Entrypoint printer 4.35 KiB (13.7 KiB) = js/runtime-d66b648ac2302ca23b08.js 2.23 KiB js/printer-59b8f2774f1d2b2e31eb.js 148 bytes css/printer-9c13df01.css 1.97 KiB 2 auxiliary assets
orphan modules 7.68 MiB (javascript) 3.09 MiB (asset) 3.96 KiB (runtime) [orphan] 1322 modules
runtime modules 5.05 KiB 10 modules
javascript modules 14 MiB
  modules by path ./node_modules/ 12.2 MiB 997 modules
  modules by path ./app/frontend/ 1.83 MiB 478 modules
asset modules 2.71 KiB (javascript) 61.2 KiB (asset) 12 modules
css modules 493 KiB
  modules by path ./app/frontend/*.scss 2.17 KiB 2 modules
  + 3 modules
json modules 184 KiB
  ./node_modules/moment-timezone/data/packed/latest.json 182 KiB [built] [code generated]
  ./node_modules/axios/package.json 1.92 KiB [built] [code generated]

LOG from webpack.FileSystemInfo
<w> Managed item /usr/src/app/node_modules/angular-minicolors isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
<w> Managed item /usr/src/app/node_modules/ng-caps-lock isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
+ 14 hidden lines

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  static/@fortawesome/fontawesome-free/webfonts/fa-brands-400-63b566233f163d538cce.svg (713 KiB)
  static/@fortawesome/fontawesome-free/webfonts/fa-solid-900-3e2bc2ffd29f01066d23.svg (893 KiB)
  css/application-e1737905.css (476 KiB)
  js/application-956a89e4f963bb160ef4.js (1.27 MiB)
  js/855-05fb1c9a01c56b29579a.js (4.28 MiB)
  static/@fortawesome/fontawesome-free/webfonts/fa-solid-900-3e2bc2ffd29f01066d23.svg.gz (249 KiB)
  js/application-956a89e4f963bb160ef4.js.map.gz (496 KiB)
  js/855-05fb1c9a01c56b29579a.js.gz (1.13 MiB)
  js/855-05fb1c9a01c56b29579a.js.map.gz (4.3 MiB)
  js/application-956a89e4f963bb160ef4.js.map.br (372 KiB)
  js/855-05fb1c9a01c56b29579a.js.br (871 KiB)
  js/855-05fb1c9a01c56b29579a.js.map.br (3.26 MiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  application (6.02 MiB)
      js/runtime-d66b648ac2302ca23b08.js
      js/855-05fb1c9a01c56b29579a.js
      css/application-e1737905.css
      js/application-956a89e4f963bb160ef4.js

WARNING in webpack performance recommendations: 
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/

webpack 5.70.0 compiled with 3 warnings in 218064 ms

yarn install v1.22.17
warning Skipping preferred cache folder "/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
[1/4] Resolving packages...
success Already up-to-date.
Done in 1.31s.
Error: EACCES: permission denied, open '/.yarnrc'
rails aborted!
Command failed with exit 1: /usr/local/bin/ruby "/usr/src/app/bin/yarn" install --no-progress --frozen-lockfile
/usr/local/bundle/gems/shakapacker-6.2.0/lib/tasks/yarn.rake:22:in `system'
/usr/local/bundle/gems/shakapacker-6.2.0/lib/tasks/yarn.rake:22:in `block (2 levels) in <main>'
/usr/local/bundle/gems/railties-5.2.8.1/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/usr/local/bundle/gems/railties-5.2.8.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/usr/local/bundle/gems/railties-5.2.8.1/lib/rails/command.rb:48:in `invoke'
/usr/local/bundle/gems/railties-5.2.8.1/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.8.1/lib/active_support/dependencies.rb:291:in `block in require'
/usr/local/bundle/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/usr/local/bundle/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => assets:precompile => yarn:install
(See full trace by running task with --trace)

Cela ressemble aux erreurs de démarrage : "Error: EACCES: permission denied, open '/.yarnrc'"

aukfood avatar Aug 02 '22 13:08 aukfood

@sylvainbx If i do that in contener :

bundle exec rails s puma -p 3000 -b 0.0.0.0 &

It's works, but I have to do that always I restart contener

aukfood avatar Aug 02 '22 14:08 aukfood

@sylvainbx do you need more informations ?

aukfood avatar Aug 16 '22 09:08 aukfood

Hi Guillaume. Sorry for the delay I was on hollidays for the last weeks. Seems like your problem is related to docker user permissions issue we have worked on during the last releases. Have you correctly ran https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/set-docker-user.sh during the v5.4.5 upgrade? Can you check if you docker-compose.yml file contains something like services.fabmanager.user: XX:YY ?

sylvainbx avatar Aug 22 '22 08:08 sylvainbx

yes I have it

  fabmanager:
    image: sleede/fab-manager
    environment:
      RAILS_ENV: production
      RACK_ENV: production
    env_file:
      - ./config/env
    volumes:
      - ./public/packs:/usr/src/app/public/packs
      - ./public/uploads:/usr/src/app/public/uploads
      - ./invoices:/usr/src/app/invoices
      - ./exports:/usr/src/app/exports
      - ./log:/var/log/supervisor
      - ./plugins:/usr/src/app/plugins
      - ./accounting:/usr/src/app/accounting
      - ./imports:/usr/src/app/imports
      - ./proof_of_identity_files:/usr/src/app/proof_of_identity_files
    depends_on:
      - postgres
      - redis
      - elasticsearch
    restart: always
    networks:
      - fabmanager
    user: 1000:1000

aukfood avatar Aug 22 '22 12:08 aukfood

Nice! Now can you check that all subfolders in the fab-manager directory have read/write permissions for your UID 1000/GID 1000 ?

sylvainbx avatar Aug 24 '22 08:08 sylvainbx

yesssss it's works chown -R 1000:1000 * Thanks

aukfood avatar Aug 25 '22 08:08 aukfood