Chef infra 无法在chef中创建用户(ruby错误)

Chef infra 无法在chef中创建用户(ruby错误),chef-infra,Chef Infra,我正在学习chef,我在为chef创建用户时面临一个问题 要执行的命令: chef-server-ctl user-create USER_NAME FIRST_NAME [MIDDLE_NAME] LAST_NAME EMAIL 'PASSWORD' --filepath /path/to/username.pem 错误: /opt/opscode/embedded/service/omnibus-ctl/wrap-knife-opc.rb:43:in `block (2 levels) i

我正在学习chef,我在为chef创建用户时面临一个问题

要执行的命令:

chef-server-ctl user-create USER_NAME FIRST_NAME [MIDDLE_NAME] LAST_NAME EMAIL 'PASSWORD' --filepath /path/to/username.pem
错误:

/opt/opscode/embedded/service/omnibus-ctl/wrap-knife-opc.rb:43:in `block (2 levels) in load_file': undefined method `exitstatus' for nil:NilClass (NoMethodError)
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:199:in `call'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:199:in `block in add_command_under_category'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:736:in `run'
        from /opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl:237:in `<main>'
/opt/opscode/embedded/service/omnibus ctl/wrap knife opc.rb:43:in'block(2个级别)in load_文件:未定义的方法'exitstatus'用于nil:NilClass(NoMethodError)
from/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:199:in'call'
从/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:199:“在添加命令的块中,在类别下”
从/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:736:在“运行”中
从/opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl:237:in`'
谢谢你的帮助

更新1:

我也无法启动厨师服务器

详情请参阅:

[root@ip-172-31-56-142 chefdk]# chef-server-ctl start
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:361:in `run_sv_command_for_service': undefined method `exitstatus' for nil:NilClass (NoMethodError)
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:351:in `block in run_sv_command'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:350:in `each'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:350:in `run_sv_command'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:162:in `block (2 levels) in <class:Ctl>'
        from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:736:in `run'
        from /opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl:237:in `<main>'
[root@ip-172-31-56-142 chefdk]#主厨服务器控制启动
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:361:in'run_sv_command_for_service':nil:NilClass(NoMethodError)的未定义方法'exitstatus'
从/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:351:“运行中的块”命令中
from/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:350:在'each'中
从/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:350:in“run_sv_命令”
从/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:162:in `块(2层)in'
从/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:736:在“运行”中
从/opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl:237:in`'

我通过降级chef版本解决了这个问题。 也可以通过更新ruby gems“gems update”


希望它能帮助查找此错误的人

什么版本的Chef Server?您可以通过运行chef server ctl--version来检查,我想是的。我想它也没有启动。。请检查,因为我已经在上面更新了这是rpm:chef-server-core-12.7.0-1.el7.x86_64.rpm,我正在rhel 7上执行此操作您降级到哪个版本?