通过Puppet部署SSHconfiguration:执行'/etc/init.d/ssh start'返回1:

我正在通过Puppet部署一个ssh-default-config到我的服务器。 这在大多数情况下工作正常。

但是现在我试图将它部署到刚从Debian 7升级到8的OpenVZ系统。

现在我试图部署我的清单:

Error: Could not start Service[ssh]: Execution of '/etc/init.d/ssh start' returned 1: Error: /Stage[main]/Ssh::Server::Service/Service[ssh]/ensure: change from stopped to running failed: Could not start Service[ssh]: Execution of '/etc/init.d/ssh start' returned 1: Notice: /Stage[main]/Ssh::Server/Anchor[ssh::server::end]: Dependency Service[ssh] has failures: true Warning: /Stage[main]/Ssh::Server/Anchor[ssh::server::end]: Skipping because of failed dependencies Notice: /Stage[main]/Ssh::Client/Anchor[ssh::client::end]: Dependency Service[ssh] has failures: true Warning: /Stage[main]/Ssh::Client/Anchor[ssh::client::end]: Skipping because of failed dependencies 

我能在这里做什么?

你需要更多的信息,木偶正在将它从你身上抽象出来。 login并尝试在shell中启动该服务,以查看是否从stderr获得任何有用的信息。 或者,查看日志。 最后,回滚到已知的良好configuration。 (SSHconfiguration可能有问题,阻止它启动。)

除了Aaron Copley的回答:运行puppet agent --test --debug在失败的机器上testing失败会给你一些错误的信息。

解决了这个问题:dist-upgrade没有切换到systemd。 所以service XYZ statussystemctl status XYZ没有返回正确的值。

我安装了systemd,问题解决了。