410 error when subscribing 1st time

Problem:
error: has been deleted (HTTP error code 410: Gone) when trying to subscribe. As soon as we try again (seconds later) it works.

Any idea what would be causing this?

Command we run is:

subscription-manager register --org=“new” --activationkey=“el9” --force

Have you deleted your consumer certs? This looks like Bug #36674: Can not re-register with --force after deleting consumer certs against satellite614 - Katello - Foreman

It should be resolved in Katello 4.10 and above.

Also, if it’s the first time why use --force ?

no, haven’t touched the certs. This example is a brand new host that we connected and it failed straight away. Then less than a minute later it accepts it, using the same command. But same thing happens with existing tests hosts if we remove from Foreman and re-connect.

Also tested cleaning the client side certs and re-trying, but same result. i.e subscription-manager clear and remove --all.

it’s not a big deal, I can run the command twice (we are scripting via ansible) Im just curious why. Oh and sorry, Ive always run --force due to having an error in the past and forcing helped it

Force unregisters the host and re-registers it. It’s not meant to be used when registering the first time. If you sub-man clean and then register without --force, it should work.

1 Like

thanks just tried cleaning this host again and re-running sub manager without --force but same 410 failure. The 2nd attempt worked fine (with or without --force)
Doesn’t prove anything, just thought Id mention it

What Katello version are you on? If it’s earlier than 4.10 it may be that bug I mentioned.