使用cf_nise_installer安装CloudFoundry出现not monitored问题

丌官开宇
2023-12-01

使用github.com/yudai/cf_nise_installer安装cf v2的版本,安装过程一切正常,但是启动的时候,出现:

warden not monitored

dea_next not monitored

查看日志:/var/vcap/data/sys/log/

{"timestamp":1398210883.1947148,"message":"Configuration","log_level":"info","source":"Warden::Server","data":{"server":{"unix_domain_path":"/var/vcap/data/warden/warden.sock","unix_domain_permissions":511,"container_klass":"Warden::Container::Linux","container_grace_time":300,"job_output_limit":10485760,"quota":{"disk_quota_enabled":true},"allow_nested_warden":false,"container_rootfs_path":"/var/vcap/packages/rootfs_lucid64","container_depot_path":"/var/vcap/data/warden/depot","pidfile":"/var/vcap/sys/run/warden/warden.pid"},"logging":{"level":"debug","file":"/var/vcap/sys/log/warden/warden.log"},"network":{"pool_network":"10.254.0.0/22","deny_networks":[],"allow_networks":[],"mtu":1500},"port":{"pool_start_port":61001,"pool_size":4000},"user":{"pool_start_uid":20000,"pool_size":256}},"thread_id":10985600,"fiber_id":14890600,"process_id":5745,"file":"/var/vcap/data/packages/warden/42/warden/lib/warden/server.rb","lineno":271,"method":"run!"}
{"timestamp":1398210883.2596564,"message":"Exited with status 1 (0.063s): [[\"/var/vcap/data/packages/warden/42/warden/src/closefds/closefds\", \"/var/vcap/data/packages/warden/42/warden/src/closefds/closefds\"], \"/var/vcap/data/packages/warden/42/warden/root/linux/setup.sh\"]","log_level":"warn","source":"Warden::Container::Linux","data":{"stdout":"Usage: /etc/init.d/apparmor {start|stop|restart|reload|force-reload|status|recache}\n","stderr":""},"thread_id":10985600,"fiber_id":14890600,"process_id":5745,"file":"/var/vcap/data/packages/warden/42/warden/lib/warden/container/spawn.rb","lineno":135,"method":"set_deferred_success"}

——没看出啥来

等启动完毕后,用命令行:/var/vcap/bosh/bin/monit start warden单独启动,结果出现日志:

{"timestamp":1398255657.4987667,"message":"Configuration","log_level":"info","source":"Warden::Server","data":{"server":{"unix_domain_path":"/var/vcap/data/warden/warden.sock","unix_domain_permissions":511,"container_klass":"Warden::Container::Linux","container_grace_time":300,"job_output_limit":10485760,"quota":{"disk_quota_enabled":true},"allow_nested_warden":false,"container_rootfs_path":"/var/vcap/packages/rootfs_lucid64","container_depot_path":"/var/vcap/data/warden/depot","pidfile":"/var/vcap/sys/run/warden/warden.pid"},"logging":{"level":"debug","file":"/var/vcap/sys/log/warden/warden.log"},"network":{"pool_network":"10.254.0.0/22","deny_networks":[],"allow_networks":[],"mtu":1500},"port":{"pool_start_port":61001,"pool_size":4000},"user":{"pool_start_uid":20000,"pool_size":256}},"thread_id":6488200,"fiber_id":10393520,"process_id":5271,"file":"/var/vcap/data/packages/warden/42/warden/lib/warden/server.rb","lineno":271,"method":"run!"}
{"timestamp":1398255657.5916147,"message":"Exited with status 2 (0.091s): [[\"/var/vcap/data/packages/warden/42/warden/src/closefds/closefds\", \"/var/vcap/data/packages/warden/42/warden/src/closefds/closefds\"], \"/var/vcap/data/packages/warden/42/warden/root/linux/setup.sh\"]","log_level":"warn","source":"Warden::Container::Linux","data":{"stdout":" * Unloading AppArmor profiles\n   ...done.\n","stderr":"quotacheck: lstat Cannot stat `//home/mattxia/.gvfs': Permission denied\nGuess you'd better run fsck first !\nexiting...\nquotaon: Cannot find quota file on / [/dev/sda1] to turn quotas on/off.\nquotaon: Cannot find quota file on / [/dev/sda1] to turn quotason/off.\n"},"thread_id":6488200,"fiber_id":10393520,"process_id":5271,"file":"/var/vcap/data/packages/warden/42/warden/lib/warden/container/spawn.rb","lineno":135,"method":"set_deferred_success"}

在这个issure种看到一样的问题

https://github.com/yudai/cf_nise_installer/issues/51


Then i run three commands:
$umount /home/yourname/.gvfs
$find . -inum 554009 -exec rm{} \;
$rm -rf .gvfs


同样删除掉.gvfs,再看下日志,已经启动了(monit隔一段时间拉起一次,看来类似watchdog的功能)

dea不能启动,应该是因为dea依赖于warden(需要warden来做隔离)

再用/var/vcap/bosh/bin/monit summary查看下,一切正常

CF变化太快,跟去年看的时候已经变化太多了...


后来在其他机器上重装了一下,还出现这个问题,但是安装了10.04所有的补丁后,一切OK了,所以解决这个问题首先要安装10.04的所有补丁,记住!


转载于:https://my.oschina.net/u/150275/blog/225677

 类似资料: