Foreman is new to me so please bare with me. We are setting this up as a proof of concept for content management and provisioning for our Linux based systems.
Problem:
Subscription manager issue when trying to register new host foreman-katello
I am trying to register a new content host to Foreman using these steps:
After running the subscription manager command I receive the following error:
Unable to find Subscription Manager module.
Error: No module named M2Crypto
Foreman and Proxy versions:
Version 1.20.1
**Katello plugin version
katello 3.10.0
Other relevant data:
Trying to run this on CentOS Linux release 7.0.1406 (Core)
OS version of the host is latest: CentOS Linux release 7.6.1810 (Core)
Well, I am following the directions within my Foreman host for registering a new content host. The version installed, subscription-manager-1.21.10-3.el7.centos.x86_64.
So I am doing this first: curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://myserver/pub/katello-ca-consumer-latest.noarch.rpmyum localinstall katello-ca-consumer-latest.noarch.rpm
Next I am doing this: subscription-manager register --org=“Default_Organization” --activationkey="" … and that is when I get the error in regards to the subscription manager.
We have 100s of Linux server that have been neglected, not patched, etc. Which is one of the reasons we want to use Foreman to patch our servers. Does Foreman have an issue registering older host versions of CentOS, like 6 & 7? I sure hope not.
When I run the command again this is the output:
[root@someserver ~]# subscription-manager register --org=“Default_Organization” --activationkey=“CentOS7” Unable to find Subscription Manager module. Error: No module named M2Crypto
@lbetson, one thing you can check on the client system: which python
I think the version you want is 2.6. Does it reveal that it’s an alias to 2.7 or some other version? Feel free to share output here. If it is an alias you can rectify the problem like so:
I’ve read about this somewhere on RedHat Access, but I highly doubt this for EL7 distros.
RHEL7 and CentOS7 come with python2.7 as default. Taking a quick look on our RHEL7 Systems, I could not even find a packaged version of python 2.6. Also we have been using subscritption-manager with the default Python 2.7 for some years now without problems.
I can do a registration via activation keys just fine using these versions on RHEL7:
# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.9.1-Unknown
subscription management rules: 5.30.1
subscription-manager: 1.21.10-3.el7_6
# python --version
Python 2.7.5
# /usr/bin/python --version
Python 2.7.5
hello everyone I have a problem when making a maager subscription against my katello foreman server
[root@fhi0250chkmk0a rhsm]# subscription-manager register --org=“IBD-COHI” --activationkey=“IBD-COHI-RH7-PROD”
Error de servidor remoto. Por favor revise los detalles de conexión o consulte /var/log/rhsm/rhsm.log para obtener más información.
2021-05-25 16:20:01,796 [INFO] subscription-manager:242339:MainThread @connection.py:909 - Connection built: http_prox y:8085=proxybi.corp.iberdrola.comhost=fhi0250rhsat01.cohi.iberdrola.com port=443 handler=/rhsm auth=none
2021-05-25 16:20:02,056 [ERROR] subscription-manager:242339:MainThread @connection.py:647 - Response: 404
2021-05-25 16:20:02,057 [ERROR] subscription-manager:242339:MainThread @connection.py:648 - JSON parsing error: No JSO
N object could be decoded
2021-05-25 16:20:02,057 [ERROR] subscription-manager:242339:MainThread @managercli.py:217 - Error durante el registro:
Server error attempting a POST to /rhsm/consumers?owner=IBD-COHI&activation_keys=IBD-COHI-RH7-PROD returned status 40
4
2021-05-25 16:20:02,057 [ERROR] subscription-manager:242339:MainThread @managercli.py:218 - Server error attempting a
POST to /rhsm/consumers?owner=IBD-COHI&activation_keys=IBD-COHI-RH7-PROD returned status 404
can help me to locate where the problem may be
Thnks in advance
Ricardo