【问题标题】:Error while installing puppet-agent on SLES 11在 SLES 11 上安装 puppet-agent 时出错
【发布时间】:2016-02-10 03:28:54
【问题描述】:

我正在评估 Puppet Enterprise 2015.2,在我尝试在 SLES 11 机器上安装代理之前没有任何问题。

我已按照上述程序进行:

1 - 在 PE 控制台上的 PE Master 组中添加了类 pe_repo::platform::sles_11_x86_64

2 - 从客户端执行 curl:

curl -k https://myserver:8140/packages/current/install.bash | sudo bash

命令日志:

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14657  100 14657    0     0   117k      0 --:--:-- --:--:-- --:--:-- 4771k
Removing repository 'puppet-enterprise' [done]
Repository 'puppet-enterprise' has been removed.
Adding repository 'puppet-enterprise' [done]
Repository 'puppet-enterprise' successfully added
Enabled: Yes
Autorefresh: No
URI: https://myserver:8140/packages/2015.2.1/sles-11-x86_64?ssl_verify=no

Retrieving repository 'puppet-enterprise' metadata [done]
Building repository 'puppet-enterprise' cache [done]
Specified repositories have been refreshed.
**Unknown option '--from'**
Loading repository data...
Reading installed packages...
**'puppet-agent' not found.**
/tmp/tmp.SVlCxPXa7e: line 91: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
[main]
/tmp/tmp.SVlCxPXa7e: line 100: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 113: /opt/puppetlabs/puppet/bin/facter: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 113: /opt/puppetlabs/puppet/bin/ruby: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 113: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 122: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 123: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 127: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 62: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 62: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 62: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
/tmp/tmp.SVlCxPXa7e: line 62: /opt/puppetlabs/puppet/bin/puppet: No such file or directory
Error running install script /tmp/tmp.SVlCxPXa7e

脚本第 217 行的第一个注释:

zypper --non-interactive dist-upgrade --from puppet-enterprise

--from 未被接受为有效参数。也许正确的是'-r'?

第二点:脚本没有安装 puppet-agent,所以我尝试安装它,将文件 puppet-agent-1.2.5-1.sles11.x86_64.rpm 推送到客户端,然后运行 ​​zypper在傀儡代理中

通过这个解决方法,我能够安装代理,然后我再次运行脚本并遇到了 libfacter 问题:

curl -k https://myserver:8140/packages/current/install.bash | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14657  100 14657    0     0   153k      0 --:--:-- --:--:-- --:--:-- 13.9M
Removing repository 'puppet-enterprise' [done]
Repository 'puppet-enterprise' has been removed.
Adding repository 'puppet-enterprise' [done]
Repository 'puppet-enterprise' successfully added
Enabled: Yes
Autorefresh: No
URI: https://myserver:8140/packages/2015.2.1/sles-11-x86_64?ssl_verify=no

Retrieving repository 'puppet-enterprise' metadata [done]
Building repository 'puppet-enterprise' cache [done]
Specified repositories have been refreshed.
**Unknown option '--from'**
Loading repository data...
Reading installed packages...
**'puppet-agent' is already installed.**
Resolving package dependencies...
Nothing to do.
**libfacter was not found. Please make sure it was installed to the expected location.
libfacter was not found. Please make sure it was installed to the expected location.
libfacter was not found. Please make sure it was installed to the expected location.
libfacter was not found. Please make sure it was installed to the expected location.**
Error running install script /tmp/tmp.GDlmNNh07V

EDIT 1:它似乎只发生在 SLES 11 SP1 上。我已经在 SLES 11 SP3 上进行了测试,并且可以正常工作。

【问题讨论】:

    标签: puppet suse puppet-enterprise sles


    【解决方案1】:

    很遗憾,libfacter was not found. Please make sure it was installed to the expected location. 错误消息是虚假的。对我来说,真正的问题是我将我的 LC_NAME 环境变量设置为在 puppet 机器上不可用的语言环境。运行unset LC_NAME puppet 后开始工作。 (我知道这很奇怪,但我可以可靠地重现它。)

    所以首先尝试unset LC_NAME,如果这对运行strace -e file -f puppet 没有帮助,那就是帮助我解决问题的原因。

    【讨论】:

    • 能否提交一份关于此问题的错误报告?
    • 不幸的是,这对我不起作用!感谢您的帮助 Tobias!
    猜你喜欢
    • 2017-05-18
    • 2012-06-12
    • 2011-04-18
    • 1970-01-01
    • 2011-04-18
    • 2016-12-09
    • 2014-02-12
    • 1970-01-01
    • 2016-05-13
    相关资源
    最近更新 更多