nicolas-r / katello-centos-errata-import

Imports CentOS (from http://cefs.steve-meier.de/) errata into Katello
28 stars 11 forks source link

Error when running centos-errata-redis-loader.py #14

Open abayani opened 3 years ago

abayani commented 3 years ago

Hi this is probably not an issue but more of a missing steps. I am getting this message when I run: python centos-errata-redis-loader.py

Message: "Please install the redis module."

Could someone please guide me on how to solve this?

florianfa commented 3 years ago

Hi abayani,

If you are using a python venv you can easily execute via pip:

pip install redis

RPM would be:

Python 3: yum install python3-redis.noarch

Python 2: yum install python2-redis.noarch

Regards, Florian

abayani commented 3 years ago

Hi Florian,

Thanks for your reply. I was able to install python3. Now it's giving me this message when I run: python3 centos-errata-redis-loader.py

"Please install the lxml module."

I appreciate any help.

Thanks Art

abayani commented 3 years ago

Hi Florian,

I am good with pip installation now and loader script worked.

I am running the import.py now and I am getting this error.

FileNotFoundError: [Errno 2] No such file or directory: 'pulp-admin': 'pulp-admin'

Any ideas on the error?

Thanks in advance. Art

thefretrunner commented 3 years ago

You need to read the instructions one more time. It clearly says:

To run this script on CentOS you need:

pulp-admin-client pulp-rpm-admin-extensions redis server Some python modules lxml PyYAML pyaml redis requests

Just install them like this:

yum install pulp-admin-client pulp-rpm-admin-extensions redis pip3 install lxml pip3 install PyYAML pip3 install pyaml pip3 install redis pip3 install requests

abayani commented 3 years ago

Thank you for your help. I think I got them all installed successfully.

I got further now but I am getting this error.

There was an internal server error while trying to access the Pulp application. One possible cause is that the database needs to be migrated to the latest version. If this is the case, run pulp-manage-db and restart the services. More information may be found in Apache's log.

Traceback (most recent call last): File "centos-errata-katello-importer.py", line 236, in logger.info("Task id: %s, started at: %s, state: %s" % (res['id'], res['started_at'], res['state'])) KeyError: 'id'

when I run pulp-manage-db I get this message: "This must not be run as root, but as the same user apache runs as."

thefretrunner commented 3 years ago

After Katello 3.14 Pulp version 3 is used. This script does not support Pulp version 3.

I suggest you install 3.14.

abayani commented 3 years ago

Is that mean install pulp-admin-client 3.14?

thefretrunner commented 3 years ago

When I installed 3.14 of Katello I did this:

yum -y localinstall https://yum.theforeman.org/releases/1.24/el7/x86_64/foreman-release.rpm yum -y localinstall https://fedorapeople.org/groups/katello/releases/yum/3.14/katello/el7/x86_64/katello-repos-latest.rpm yum -y localinstall https://yum.puppet.com/puppet6-release-el-7.noarch.rpm yum -y localinstall https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum -y install foreman-release-scl yum update reboot

Then to configure it:

foreman-installer --scenario katello --foreman-initial-admin-username admin --foreman-initial-admin-password [SECRET PASSWORD] --foreman-initial-organization [NAME OF YOUR ORG] --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-ssh

abayani commented 3 years ago

hello,

after installing 3.14 of katello I cannot access my Products in GUI anymore. I am getting this error:

"Oops, we're sorry but something went wrong Katello::Resources::Candlepin::Owner: 404 Not Found (GET /candlepin/owners/Hanlon)"

also when I run "hammer ping katello" I get this:

candlepin: Status: FAIL Server Response: Message: 404 Not Found candlepin_auth: Status: FAIL Server Response: Message: Katello::Resources::Candlepin::CandlepinPing: 404 Not Found (GET /candlepin/status) pulp: Status: FAIL Server Response: Message: 500 Internal Server Error pulp_auth: Status: FAIL Server Response: Message: Skipped pulp_auth check after failed pulp check foreman_tasks: Status: ok Server Response: Duration: 4ms