大网数据广告活动
服务器运维问答

Puppetserver unable to locate gems

· 52CE 我爱测

I'm trying to use a module which adds an AWS Secrets Manager hiera backend: https://forge.puppet.com/accenture/hiera_aws_sm This module requires the aws-sdk-secretsmanager gem, which I installed via puppetserver: $ sudo puppetser…

问题原文

原帖链接 · Taz · CC BY-SA 4.0

I'm trying to use a module which adds an AWS Secrets Manager hiera backend:

https://forge.puppet.com/accenture/hiera_aws_sm

This module requires the aws-sdk-secretsmanager gem, which I installed via puppetserver:

$ sudo puppetserver gem install aws-sdk-secretsmanager

I can also see this gem listed in puppetserver:

$ sudo puppetserver gem list

*** LOCAL GEMS ***

<trimmed>
aws-sdk-schemas (1.6.0)
aws-sdk-secretsmanager (1.40.0, 1.39.0)
aws-sdk-securityhub (1.29.0)
<trimmed>

The module itself contains the following line to import the gem:

require 'aws-sdk-secretsmanager'

When I try to run an agent test...

$ sudo puppet agent --test

... when this module tries to run I get the following error (after commenting out some error handling obfuscation the module added):

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Internal Server Error: org.jruby.exceptions.LoadError: (LoadError) no such file to load -- aws-sdk-secretsmanager

I can't work out why the puppetserver jruby instance can't load the gem since it appears in list and have hit a bit of a wall in debugging it.

已采纳解答

原帖链接 · Taz · CC BY-SA 4.0

Turns out this issue was because multiple versions of aws-sdk-secretsmanager were installed somehow:

$ sudo puppetserver gem list

*** LOCAL GEMS ***

<trimmed>
aws-sdk-secretsmanager (1.40.0, 1.39.0)
<trimmed>

Running...

$ sudo puppetserver gem uninstall aws-sdk-secretsmanager

... accepting the prompt to uninstall all installed versions and then running...

$ sudo puppetserver gem install aws-sdk-secretsmanager

... solved the issue.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-07-13)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。