Delete host Foreman

Problem:
When try delete host from Foreman, returns in production.log the error:
Failed to deactivate node intra-slavedb2.trf4.jus.br in PuppetDB: Failed to open TCP 2019-02-19T14:59:51 [I|aud|d7cbb] Nic::Managed (93) destroy event on name teste-katello7.jfrs.jus.br
2019-02-19T14:59:52 [I|aud|d7cbb] LookupValue (439) destroy event on match fqdn=teste-katello7.jfrs.jus.br
2019-02-19T14:59:52 [I|aud|d7cbb] Host::Base (92) destroy event on name teste-katello7.jfrs.jus.br
2019-02-19T14:59:52 [I|aud|d7cbb] Host::Base (92) destroy event on certname teste-katello7.jfrs.jus.br
2019-02-19T14:59:52 [I|app|d7cbb] Deactivating node in PuppetDB: teste-katello7.jfrs.jus.br
2019-02-19T14:59:52 [W|app|d7cbb] Failed to deactivate node teste-katello7.jfrs.jus.br in PuppetDB: Failed to open TCP connection to poarspuppetdb.jfrs.jus.br:443 (Connection refused - connect(2) for “poarspuppetdb.jfrs.jus.br” port 443)
2019-02-19T14:59:52 [W|app|d7cbb] Rolling back due to a problem: [#<Orchestration::Task:0x00007f08a0be9f60 @name=“Deactivating node teste-katello7.jfrs.jus.br in PuppetDB”, @id=“Deactivating node teste-katello7.jfrs.jus.br in PuppetDB”, @status=“failed”, @priority=60, @action=[#<Host::Managed id: 92, name: “teste-katello7.jfrs.jus.br”, last_compile: “2019-01-16 15:42:03”, last_report: “2019-02-19 17:41:15”, updated_at: “2019-02-19 17:41:53”, created_at: “2018-09-27 19:53:58”, root_pass: nil, architecture_id: 1, operatingsystem_id: 9, environment_id: 7, ptable_id: nil, medium_id: nil, build: false, comment: “”, disk: nil, installed_at: nil, model_id: 1, hostgroup_id: 24, owner_id: 6, owner_type: “User”, enabled: true, puppet_ca_proxy_id: 1, managed: false, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: 1, certname: “teste-katello7.jfrs.jus.br”, image_id: nil, organization_id: 1, location_id: 2, type: “Host::Managed”, otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: “”, global_status: 2, lookup_value_matcher: “fqdn=teste-katello7.jfrs.jus.br”, pxe_loader: nil, discovery_rule_id: nil, initiated_at: nil, build_errors: nil>, :delPuppetdb], @created=1550599192.9428058, @timestamp=2019-02-19 17:59:52 UTC>]
2019-02-19T14:59:52 [E|app|d7cbb] Task ‘Deactivating node teste-katello7.jfrs.jus.br in PuppetDB’ failed

Expected outcome:

Foreman and Proxy versions:
foreman-proxy-1.20.
foreman-1.20

Foreman and Proxy plugin versions:

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)

logs

It looks like you have the foreman-puppetdb plugin installed. Is that correct?
Can your Foreman server reach the PuppetDB application? Is PuppetDB up and running?
I am not familiar with that plugin, but the log looks like a simple connectivity issue between Foreman and PuppetDB.

I have PuppetDB in another server. The problem has been solved, the communication ports with PuppetDB in Foreman have been fixed in the “puppetdb_address” to 8081 and “puppetdb_dashboard_address” 8080.
Thanks.