ronivay/xen-orchestra-docker

Container does not start

estefanogoncalves opened this issue · 3 comments

I'm trying to start container but I get an error.

Docker command:
docker run -itd --stop-timeout 60 --restart unless-stopped --cap-add sys_admin --security-opt apparmor:unconfined -p 60080:80 -v /docker-disks/xoa/xo-server:/var/lib/xo-server -v /docker-disks/xoa/redis:/var/lib/redis ronivay/xen-orchestra

Container log:

New Monit id: 9f3a501735583ce69af91ec19663fcc0
 Stored in '/var/lib/monit/id'
[2022-04-23T10:44:15+0000] info     :  New Monit id: 9f3a501735583ce69af91ec19663fcc0
 Stored in '/var/lib/monit/id'
Starting Monit 5.27.1 daemon with http interface at [localhost]:2812
[2022-04-23T10:44:15+0000] info     : Starting Monit 5.27.1 daemon with http interface at [localhost]:2812
[2022-04-23T10:44:15+0000] info     : '81ead8ceb795' Monit 5.27.1 started
[2022-04-23T10:44:15+0000] error    : 'redis' process is not running
[2022-04-23T10:44:15+0000] info     : 'redis' trying to restart
[2022-04-23T10:44:15+0000] info     : 'redis' start: '/usr/bin/redis-server /etc/redis/redis.conf --bind 127.0.0.1 --pidfile /var/run/redis.pid'
[2022-04-23T10:44:15+0000] info     : 'xo-server' start on user request
[2022-04-23T10:44:15+0000] info     : '81ead8ceb795' start on user request
[2022-04-23T10:44:15+0000] info     : 'rpcbind' start on user request
[2022-04-23T10:44:15+0000] info     : 'redis' start on user request
[2022-04-23T10:44:15+0000] info     : Monit daemon with PID 13 awakened
15:C 23 Apr 2022 10:44:15.289 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
15:C 23 Apr 2022 10:44:15.289 # Redis version=5.0.14, bits=64, commit=00000000, modified=0, pid=15, just started
15:C 23 Apr 2022 10:44:15.289 # Configuration loaded
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 5.0.14 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 18
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

18:M 23 Apr 2022 10:44:15.290 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
18:M 23 Apr 2022 10:44:15.290 # Server initialized
18:M 23 Apr 2022 10:44:15.290 # 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.
18:M 23 Apr 2022 10:44:15.290 # 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.
18:M 23 Apr 2022 10:44:15.290 * Ready to accept connections
[2022-04-23T10:44:15+0000] info     : 'redis' process is running with pid 18
[2022-04-23T10:44:15+0000] info     : 'xo-server' start: '/usr/local/bin/forever start -a --pidFile /var/run/xo-server.pid --sourceDir /etc/xen-orchestra/packages/xo-server -l /var/log/xo-server.log dist/cli.mjs'
(node:33) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
internal/modules/cjs/loader.js:902
  const err = new Error(message);
              ^

Error: Cannot find module 'assert/strict'
Require stack:
- /etc/xen-orchestra/@vates/cached-dns.lookup/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/etc/xen-orchestra/@vates/cached-dns.lookup/index.js:3:16)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
    at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
    at async Loader.import (internal/modules/esm/loader.js:178:24)
    at async Object.loadESM (internal/process/esm_loader.js:68:5)
    at async handleMainPromise (internal/modules/run_main.js:59:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/etc/xen-orchestra/@vates/cached-dns.lookup/index.js' ]
}
{"level":"error","message":"Forever detected script exited with code: 1"}

I did something wrong?

Hi,

No you didn't do anything wrong. Looks like latest changes in XO repository require node.js version 16.x, which i should've done to the container already a while ago. Did this change now and should work again once new version of container is pushed to dockerhub.

Just do docker pull ronivay/xen-orchestra and run again once this action has completed: https://github.com/ronivay/xen-orchestra-docker/actions/runs/2212138118

hmh arm64 is having some weirdness with python during the build. pushed amd64 arch one to dockerhub by hand now while i deal with it. the above pull/re-run should work for you now.

Hi!

Thank you. It’s working! 👏