thanks for your answer @evgeni , none of them are installed satellite, satellite-capsule and satellite-installer.
I get for stopping services and starting service an error, should I white list them: --whitelist=“service-stop” I dont know if that have an side effect!
# foreman-maintain backup offline /tmp/backup/
Starting backup: 2023-03-15 09:41:14 +0100
Running preparation steps required to run the next scenarios
================================================================================
Make sure Foreman DB is up:
/ Checking connection to the Foreman DB [OK]
--------------------------------------------------------------------------------
Running Backup
================================================================================
Confirm turning off services is allowed:
WARNING: This script will stop your services.
Do you want to proceed?, [y(yes), q(quit)] y
[OK]
--------------------------------------------------------------------------------
Prepare backup Directory:
Creating backup folder /tmp/backup/foreman-backup-2023-03-15-09-41-14 [OK]
--------------------------------------------------------------------------------
Check if the directory exists and is writable: [OK]
--------------------------------------------------------------------------------
Generate metadata:
- Saving metadata to metadata.yml [OK]
--------------------------------------------------------------------------------
Detect features available in the local proxy: [OK]
--------------------------------------------------------------------------------
Add maintenance_mode tables/chain to nftables/iptables: [OK]
--------------------------------------------------------------------------------
Stop applicable services:
Stopping the following service(s): [FAIL]
No services found matching your parameters
--------------------------------------------------------------------------------
Scenario [Backup] failed.
The following steps ended up in failing state:
[service-stop]
Resolve the failed steps and rerun the command.
In case the failures are false positives, use
--whitelist="service-stop"
Running Failed backup cleanup
================================================================================
Start applicable services:
Starting the following service(s): [FAIL]
No services found matching your parameters
--------------------------------------------------------------------------------
Remove maintenance mode table/chain from nftables/iptables: [OK]
--------------------------------------------------------------------------------
Clean up backup directory: [OK]
--------------------------------------------------------------------------------
Scenario [Failed backup cleanup] failed.
The following steps ended up in failing state:
[service-start]
Resolve the failed steps and rerun the command.
In case the failures are false positives, use
--whitelist="service-start"
Done with backup: 2023-03-15 09:41:24 +0100
Backup didn't finish. Incomplete backup was removed.
can you try running foreman-maintain advanced procedure run foreman-proxy-features and paste me the output (that’s a totally unrelated thing, but I want to see if the feature detection works)
# foreman-maintain advanced procedure run foreman-proxy-features
Running ForemanMaintain::Scenario
================================================================================
Detect features available in the local proxy:
[OK]
--------------------------------------------------------------------------------
but when I run foreman-maintain health check maybe this is helpful
# foreman-maintain health check
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check number of fact names in database: [OK]
--------------------------------------------------------------------------------
Check to verify no empty CA cert requests exist: [OK]
--------------------------------------------------------------------------------
Check whether all services are running: [OK]
--------------------------------------------------------------------------------
Check whether all services are running using the ping call: [FAIL]
Couldn't connect to the server: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unspecified certificate verification error)
--------------------------------------------------------------------------------
Continue with step [Restart applicable services]?, [y(yes), n(no)]
Can you please create the file /usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/definitions/procedures/foreman_maintain_features.rb with the following content:
class Procedures::ForemanMaintainFeatures < ForemanMaintain::Procedure
metadata do
description 'List detected Foreman Maintain features'
end
def run
features = ForemanMaintain.available_features
puts features.map(&:inspect).join("\n")
end
end
And then run foreman-maintain advanced procedure run foreman-maintain-features and paste the output?
Create a /usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/definitions/procedures/foreman_maintain_services.rb with the following content
class Procedures::ForemanMaintainServices < ForemanMaintain::Procedure
metadata do
description 'List detected Foreman Maintain services'
end
def run
feature = feature(:service)
puts "Existing services"
puts feature.existing_services.join(", ")
puts "Filtered services"
puts feature.filtered_services({ :only => nil, :exclude => nil, :include => nil }).to_s
end
end
And then run it. (The below is the output on my Debian box, yours very well might be different)
Are you running systemd as init? You’ve used systemctl above, so I’d assume the answer is yes, but the output above indicates there is no /usr/bin/systemctl on your system? What does which systemctl output?
Yeah… Can you edit that line in /usr/share/rubygems-integration/all/gems/foreman_maintain-1.2.4/lib/foreman_maintain/concerns/system_helpers.rb to read: