Foreman cannot delete host

Problem: Foreman error Message, if i delete a host

Foreman and Proxy versions: 2.4.0

Foreman and Proxy plugin versions:

Distribution and version:

Other relevant data:
Failed to deactivate node kyle-lydecker.workshop.lan.lab in PuppetDB: Failed to open TCP connection to localhost:8081 (Connection refused - connect(2) for “localhost” port 8081) and Failed to perform rollback on Remove SSH known hosts for kyle-lydecker.example.com - Dont know how to rollback drop_from_known_hosts

For installing i executed
foreman-installer --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-ssh --enable-foreman-cli-remote-execution --enable-foreman-cli-discovery --enable-foreman-plugin-discovery --enable-foreman-cli-tasks --enable-foreman-cli-templates --enable-foreman-plugin-host-extra-validator --enable-foreman-plugin-leapp --enable-foreman-compute-ec2 --enable-foreman-compute-gce --enable-foreman-compute-openstack --enable-foreman-plugin-remote-execution-cockpit --enable-foreman-plugin-tasks --enable-foreman-plugin-puppetdb --enable-foreman-plugin-snapshot-management --enable-foreman-plugin-statistics --enable-foreman-plugin-azure --enable-foreman-compute-vmware --enable-foreman-plugin-expire-hosts --enable-foreman-plugin-hooks --enable-foreman-plugin-chef --enable-foreman-proxy-plugin-dynflow --enable-foreman-cli-openscap --enable-foreman-plugin-openscap --enable-foreman-proxy-plugin-openscap --enable-foreman-plugin-salt --enable-foreman-plugin-dhcp-browser --enable-foreman-proxy-plugin-dhcp-remote-isc --enable-foreman-plugin-dhcp-browser --enable-foreman-proxy-plugin-dhcp-remote-isc --enable-foreman-plugin-dhcp-browser --enable-foreman-proxy-plugin-discovery --enable-foreman-proxy-plugin-dns-powerdns --enable-foreman-plugin-bootdisk --enable-foreman-cli-kubevirt --enable-foreman-cli-azure --enable-foreman-compute-ovirt --enable-foreman-plugin-kubevirt --enable-foreman-plugin-ovirt-provision --enable-foreman-compute-libvirt --enable-foreman-plugin-templates --enable-foreman-plugin-setup --enable-foreman-plugin-omaha --enable-foreman-proxy-plugin-omaha --foreman-proxy-plugin-discovery-install-images=true

and

foreman-installer --enable-foreman-proxy --foreman-proxy-tftp=true --foreman-proxy-tftp-servername=192.168.160.10 --foreman-proxy-dns=true --foreman-proxy-dns-interface=ens192 --foreman-proxy-dns-zone=workshop.lan.lab --foreman-proxy-dns-reverse=160.168.192.in-addr.arpa --foreman-proxy-dns-forwarders=192.168.160.1 --foreman-proxy-foreman-base-url=https://foreman01.workshop.lan.lab --foreman-proxy-oauth-consumer-key=ZdPkrC9xwokhNp77NgfvKxg2suRTmnvk --foreman-proxy-oauth-consumer-secret=BLnFxr8oTEMyasUpya4DbXWAqqBWmgR6

I disabled PuppetDB in the Foreman Webinterface, so now i can delete the host. Please tell me the official workaround for this case

Is your puppetdb up? Judging from the error foreman seems to be reaching out to it on host deletion, but the connection is not getting through.

I think no. Nothing is listening on Port 8081 in lsof. How can i check my PuppetDB?

To be honest I don’t know, I never used puppetdb myself. The puppetdb plugin expects you to have a puppetdb up and running. Since you explicitly enabled the puppetdb plugin using the installer, I’d expect you to already have puppetdb set up.