Puppet/FAQ: различия между версиями

Материал из ALT Linux Wiki
Нет описания правки
Строка 29: Строка 29:


----
----
'''В''': При запуске puppet с ключём apply и манифестом site вылезает ошибка о невозможности соединиться с сервером foreman:
# puppet apply /etc/puppet/environments/production/manifests/site.pp
/usr/lib/ruby/gems/2.7.0/gems/facter-2.5.7.1/lib/facter/ec2/rest.rb:28: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
Warning: Facter: Error loading fact /usr/lib/puppet-modules/theforeman-foreman/lib/facter/sssd.rb: cannot load such file -- facter/util/sssd
/usr/lib/ruby/gems/2.7.0/gems/facter-2.5.7.1/lib/facter/ec2/rest.rb:28: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
/usr/lib/ruby/gems/2.7.0/gems/facter-2.5.7.1/lib/facter/ec2/rest.rb:28: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
Notice: Compiled catalog for dno.office.basealt.ru in environment production in 0.03 seconds
Notice: /Stage[main]/Main/File[/etc/passwd]/group: group changed 'root' to 'bin'
Notice: Applied catalog in 0.06 seconds
Error: Report processor failed: Could not send report to Foreman at http://dno.office.basealt.ru:2345/api/config_reports: Failed to open TCP connection to dno.office.basealt.ru:2345 (Connection refused -  connect(2) for "dno.office.basealt.ru" port 2345)
["/usr/lib/ruby/net/http.rb:960:in `initialize'", "/usr/lib/ruby/net/http.rb:960:in `open'", "/usr/lib/ruby/net/http.rb:960:in `block in connect'", "/usr/lib/ruby/timeout.rb:95:in `block in timeout'", "/usr/lib/ruby/timeout.rb:105:in `timeout'", "/usr/lib/ruby/net/http.rb:958:in `connect'", "/usr/lib/ruby/net/http.rb:943:in `do_start'", "/usr/lib/ruby/net/http.rb:932:in `start'", "/usr/lib/ruby/net/http.rb:1483:in `request'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/reports/foreman.rb:69:in `process'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/report/processor.rb:37:in `block in process'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/report/processor.rb:54:in `block in processors'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/report/processor.rb:51:in `each'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/report/processor.rb:51:in `processors'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/report/processor.rb:30:in `process'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/report/processor.rb:14:in `save'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/indirection.rb:316:in `save'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/configurer.rb:476:in `send_report'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/configurer.rb:452:in `run_internal'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/configurer.rb:246:in `run'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/application/apply.rb:342:in `apply_catalog'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/application/apply.rb:254:in `block in main'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/context.rb:62:in `override'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet.rb:306:in `override'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/application/apply.rb:208:in `main'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/application/apply.rb:178:in `run_command'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/application.rb:421:in `block in run'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/util.rb:735:in `exit_on_fail'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/application.rb:421:in `run'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/util/command_line.rb:143:in `run'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/util/command_line.rb:77:in `execute'", "/usr/bin/puppet:5:in `<main>'"]
'''О''': Настроить [[foreman]] и запустить его службу.


[[Category: puppetserver]]
[[Category: puppetserver]]
[[Категория:Управление автоматизацией]]
[[Категория:Управление автоматизацией]]
{{Category navigation|title=Управление автоматизацией|category=Управление автоматизацией|sortkey={{SUBPAGENAME}}}}
{{Category navigation|title=Управление автоматизацией|category=Управление автоматизацией|sortkey={{SUBPAGENAME}}}}

Версия от 16:39, 28 января 2021

Stub.png
Данная страница находится в разработке.
Эта страница ещё не закончена. Информация, представленная здесь, может оказаться неполной или неверной.


ЧаВО по теме Puppet

В: Почему при запуске службы Puppet у меня вылезают ошибки при получении статуса службы (**systemctl status puppet**):

Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed when searching for node dno.office.basealt.ru: Exception while executing '/usr/lib/puppet-modules/theforeman-foreman/files/external_node_v2.rb': Cannot run program "/usr/lib/puppet-modules/theforeman-foreman/files/external_node_v2.rb" (in directory "."): error=2, No such file or directory
Could not retrieve catalog; skipping run

О: Отстствует модуль puppet-а называемый theforeman-foreman, установие его так:

# apt-get install puppet-theforeman-foreman

В: Почему при запуске службы Puppet у меня вылезают предупреждения при получении статуса службы (**systemctl status puppet**):

Unable to fetch my node definition, but the agent run will continue:
Error 500 on SERVER: Server Error: Failed to find dno.office.basealt.ru via exec: Execution of '/usr/lib/puppet-modules/theforeman-foreman/files/external_node_v2.rb dno.office.basealt.ru' returned 1:
Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed when searching for node dno.office.basealt.ru: Failed to find dno.office.basealt.ru via exec: Execution of '/usr/lib/puppet-modules/theforeman-foreman/files/external_node_v2.rb dno.office.basealt.ru' returned 1:
Could not retrieve catalog; skipping run

О: Ваш foreman не настроен для работы с текущей конфигурацией puppet, вам нужно отключить службу внешних узлов в Шаблон:Path:/etc/puppet/puppet.conf так:

 # external_nodes = /usr/lib/puppet-modules/theforeman-foreman/files/external_node_v2.rb
 # node_terminus = exec

и перезапустить puppet после перезапуска puppetserver. После чего при необходимости установите facter настройте Foreman и Smart-proxy


В: При запуске puppet с ключём apply и манифестом site вылезает ошибка о невозможности соединиться с сервером foreman:

# puppet apply /etc/puppet/environments/production/manifests/site.pp
/usr/lib/ruby/gems/2.7.0/gems/facter-2.5.7.1/lib/facter/ec2/rest.rb:28: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
Warning: Facter: Error loading fact /usr/lib/puppet-modules/theforeman-foreman/lib/facter/sssd.rb: cannot load such file -- facter/util/sssd
/usr/lib/ruby/gems/2.7.0/gems/facter-2.5.7.1/lib/facter/ec2/rest.rb:28: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
/usr/lib/ruby/gems/2.7.0/gems/facter-2.5.7.1/lib/facter/ec2/rest.rb:28: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
Notice: Compiled catalog for dno.office.basealt.ru in environment production in 0.03 seconds
Notice: /Stage[main]/Main/File[/etc/passwd]/group: group changed 'root' to 'bin'
Notice: Applied catalog in 0.06 seconds
Error: Report processor failed: Could not send report to Foreman at http://dno.office.basealt.ru:2345/api/config_reports: Failed to open TCP connection to dno.office.basealt.ru:2345 (Connection refused -  connect(2) for "dno.office.basealt.ru" port 2345)
["/usr/lib/ruby/net/http.rb:960:in `initialize'", "/usr/lib/ruby/net/http.rb:960:in `open'", "/usr/lib/ruby/net/http.rb:960:in `block in connect'", "/usr/lib/ruby/timeout.rb:95:in `block in timeout'", "/usr/lib/ruby/timeout.rb:105:in `timeout'", "/usr/lib/ruby/net/http.rb:958:in `connect'", "/usr/lib/ruby/net/http.rb:943:in `do_start'", "/usr/lib/ruby/net/http.rb:932:in `start'", "/usr/lib/ruby/net/http.rb:1483:in `request'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/reports/foreman.rb:69:in `process'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/report/processor.rb:37:in `block in process'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/report/processor.rb:54:in `block in processors'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/report/processor.rb:51:in `each'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/report/processor.rb:51:in `processors'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/report/processor.rb:30:in `process'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/report/processor.rb:14:in `save'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/indirector/indirection.rb:316:in `save'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/configurer.rb:476:in `send_report'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/configurer.rb:452:in `run_internal'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/configurer.rb:246:in `run'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/application/apply.rb:342:in `apply_catalog'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/application/apply.rb:254:in `block in main'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/context.rb:62:in `override'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet.rb:306:in `override'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/application/apply.rb:208:in `main'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/application/apply.rb:178:in `run_command'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/application.rb:421:in `block in run'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/util.rb:735:in `exit_on_fail'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/application.rb:421:in `run'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/util/command_line.rb:143:in `run'", "/usr/lib/ruby/gems/2.7.0/gems/puppet-7.3.0/lib/puppet/util/command_line.rb:77:in `execute'", "/usr/bin/puppet:5:in `<main>'"]

О: Настроить foreman и запустить его службу.