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

时间:2016-06-29 07:57:57

标签: 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>'

感谢您的帮助。

更新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>'

1 个答案:

答案 0 :(得分:0)

我通过降低厨师版本来解决它。 并通过更新ruby gems&#34; gems update&#34;

希望它可以帮助找到此错误的人