Red Hat Insights - system(s) not checking in

Latest response

Red Hat Insights is a very useful tool, it gave me two suggestions to improve RHEL system performance. Unfortunately there was one issue, it only worked on the day on which I registered the system. On the next days I received the message that the system is not checking in. I had to unregister and re-register the system every time when I wanted to get updated information ... I asked the Red Hat Insights team for assistance and they immediately responded with instructions and suggestions how to solve the problem. Thanks to everybody being involved, especially to Chris Henderson, who figured out the root cause and presented the final solution. I think it might be a good idea to share the relevant information, for those who experience a similar problem with Insights.

It turned out that everything was related to the /etc/redhat-access-insights/redhat-access-insights.cron file, which didn't have any content at all. redhat-access-insights which came pre-installed with the system installation was the culprit. After uninstalling and re-installing this package, Red Hat Insights just works as expected, now the operating system gets checked for issues and information is updated regularly every day by the running cron job. yum remove ​redhat-access-insights removed abrt, anaconda and initial-setup packages as dependencies, so abrt had to be re-installed too.

Responses

Thanks for the post Christian. From my testing, the "initial-setup" rpm has a lot of dependencies, and it was dependent upon a package that was dependent on the redhat-access-insights rpm. So removing the redhat-access-insights rpm ended up removing everything in that dependency chain. Luckily none of those packages is generally essential, so no harm done. Most customers don't have the "initial-setup" package installed so I don't expect this to be a common scenario.

I'm not sure why the cron script was empty. That one is the bigger puzzle. Speculation would be that it was that way in the OS image that came preinstalled on the machine. Reinstalling the Insights package installed the Insights cron script as it should.

Hi Chris ! :)

I want to inform you that it is solved in RHEL 7.3 and that everything works out-of-the-box. I upgraded the server and also created a new KVM virtual machine on which I installed the final version. The cron file has the expected entries and redhat-access-insights is running properly and reliable on both installations (cl-rs-1 = physical system | cl-rs-2 = virtual system) :

[root@cl-rs-1 cl]# ls -l /var/log/redhat-access-insights
total 388
-rw-r--r--. 1 root root 56 9. Nov 08:25 redhat-access-insights.log
-rw-r--r--. 1 root root 129373 9. Nov 08:25 redhat-access-insights.log.1
-rw-r--r--. 1 root root 129374 8. Nov 09:56 redhat-access-insights.log.2
-rw-r--r--. 1 root root 129373 7. Nov 09:40 redhat-access-insights.log.3

[root@cl-rs-2 cl]# ls -l /var/log/redhat-access-insights
total 376
-rw-r--r--. 1 root root 56 9. Nov 09:28 redhat-access-insights.log
-rw-r--r--. 1 root root 126759 9. Nov 09:28 redhat-access-insights.log.1
-rw-r--r--. 1 root root 126760 8. Nov 09:44 redhat-access-insights.log.2
-rw-r--r--. 1 root root 126759 7. Nov 10:28 redhat-access-insights.log.3

Regards,
Christian

I'm having occasional problems with /etc/redhat-access-insights/redhat-access-insights.cron but can run redhat-access-insights --register to check in without issue.

Hi Marty,

You can try out the successor of redhat-access-insights :
sudo yum remove redhat-access-insights
sudo yum install insights-client

Regards,
Christian

I was looking at a RHEL7 server but did notice that my RHEL6 boxes only have redhat-access-insights available. RHEL7> yum list | grep insights insights-client.noarch 3.0.3-9.el7_5 @rhel-7-server-rpms redhat-access-insights.noarch 1.0.13-2.el7 rhel-7-server-rpms

REPOS: !rhel-7-server-extras-rpms/x86_64 !rhel-7-server-optional-rpms/x86_64 !rhel-7-server-rpms/x86_64 !rhel-7-server-satellite-tools-6.3-rpms/x86_64 !rhel-7-server-supplementary-rpms/x86_64

RHEL6> yum list | grep insights redhat-access-insights.noarch 1.0.13-2.el6 @rhel-6-server-rpms

REPOS: rhel-6-server-extras-rpms rhel-6-server-optional-rpms rhel-6-server-rpms rhel-6-server-satellite-tools-6.3-rpms rhel-6-server-supplementary-rpms

Hello,

I have registered 70(different versions) systems into insights. Everyday,some or the other systems are unchecked by insights.

When I did,

ls /etc/redhat-access-insights

machine-id redhat-access-insights.conf redhat-access-insights.cron Note: cron file font is in red color

I also tried looking the cron file,

cat /etc/redhat-access-insights/redhat-access-insights.cron

cat: redhat-access-insights.cron: No such file or directory

Almost every(RHEL 7.5) system has same problem.

I tried this article

Removing, installing and registering.

but could not notice any change.

  • Thanking you in advance.

Hi Venesh,

I can confirm that on my RHEL 7.5 systems the cron file is missing in insights-client as well.
I'm going to contact the insights team and will post the results here after I received a reply.

Regards,
Christian

Hi Venesh,

I've received a quick response : "In 7.5 the client is scheduled out of systemd rather than cron." Now I'm waiting
on the feedback whether I have to enable insights-client.service in order to be active on system boot, because :

systemctl status insights-client.service
● insights-client.service - Insights Client
   Loaded: loaded (/usr/lib/systemd/system/insights-client.service; static; vendor preset: disabled)
   Active: inactive (dead)  

$ systemctl status insights-client.timer
● insights-client.timer - Insights Client Timer Task
   Loaded: loaded (/usr/lib/systemd/system/insights-client.timer; enabled; vendor preset: disabled)
   Active: active (waiting)

Regards,
Christian

Hi Venesh,

Chris Henderson from the insights team responded fast once again, he said : "The timer will do it automatically."
Additionally he pointed me to this Knowledgebase article : Understanding Red Hat Insights - insights-client 3.x

Regards,
Christian

Hey thanks for the replies. So, now I have to just upgrade the systems from redhat-access-insights to insights-client.

yum upgrade redhat-access-insights

The above command is enough to do all the magic. Am I right?

Hi Venesh,

To avoid possible conflicts - better do it this way :
sudo yum remove redhat-access-insights
sudo yum install insights-client

Regards,
Christian

I have installed insights-client for 7.5, but how about other versions 7.4 and lower , Even 6.x? I think 6.4 does not have insights-client in repo. But 7.4 has the insights-client. Do you want me to go ahead and do the same for 7.4 also?

Hi Venesh,

You can only install packages which are available in the repository of the specific RHEL edition, so when you (for whatever reason) want to stick with older RHEL editions, you have to use the older version (redhat-access-insights) in those editions of course. :)

Regards,
Christian

In 7.4, as there is insights-client package. I removed the redhat-access-insights and installed the insights-client. you know which commands shows both redhat-access-insights and insights-client. when I remove the redhat-access-insights keeping the insights-client, both are gone then. I am unable to understand this scenario.

Hi Venesh,

The command that shows what's available and installed would be sudo yum list *insights*. Sorry, but I don't know what exactly is going on at your side. I'm always running the latest stable edition, which currently is RHEL 7.5. I remember that we had to enable a separate insights "beta" repository in earlier editions (don't recall if it started in 7.3 or 7.4) to make use of insights-client.

Regards,
Christian.

Thanks for the reply,

This is the cron file in the 7.4. Is there anything wrong with this?

[root@vlmgwbp002 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.4 (Maipo)

[root@vlmgwbp002 ~]# cat /etc/redhat-access-insights/redhat-access-insights.cron

!/bin/sh

name=redhat-access-insights path=/usr/bin/${name}

Make sure this runs as root

if [[ $(/usr/bin/id -u) -ne 0 ]]; then echo -e "Please run as root!"; exit 1; else /bin/chmod +x ${path} if [[ $(/sbin/service cgconfig status 2>/dev/null) == Running ]]; then /bin/cgcreate -g memory:redhataccessinsights /bin/cgset -r memory.limit_in_bytes=536870912 redhataccessinsights exec /bin/cgexec -g memory:redhataccessinsights ${name} --retry 3 --quiet /bin/cgdelete memory:redhataccessinsights else exec ${name} --quiet fi fi Thanking you, Venesh.

Hi Venesh,

I've checked my archive and fortunately I found the content of the cron file, dated from the period when I was using redhat-access-insights - so it's from the time before I switched to insights-client.

# cat /etc/redhat-access-insights/redhat-access-insights.cron  

#!/bin/sh
name=redhat-access-insights
path=/usr/bin/${name}

# Make sure this runs as root
if [[ $(/usr/bin/id -u) -ne 0 ]];
then
    echo -e "Please run as root!";
    exit 1;
else
    /bin/chmod +x ${path}
    if [[ $(/sbin/service cgconfig status) == *Running* ]];
    then
        /bin/cgcreate -g memory:redhataccessinsights
        /bin/cgset -r memory.limit_in_bytes=536870912 redhataccessinsights
        exec /bin/cgexec -g memory:redhataccessinsights ${name} --retry 3 --quiet
        /bin/cgdelete memory:redhataccessinsights
    else
        exec ${name}
    fi
fi  

Regards,
Christian

I found two differences comparing both scripts. 1) if [[ $(/sbin/service cgconfig status 2>/dev/null) == Running ]]; ===>> if [[ $(/sbin/service cgconfig status) == Running ]];

2) exec ${name} --quiet ===>> exec ${name}

I am going to replace the old script with one you mentioned.

Thanking you, Venesh.

You're welcome, Venesh ! :)

Regards,
Christian

I have insights-client installed on RHEL6 and RHEL7 but continue to get the below messages during the cron run.

2018-06-14 03:35:07,130 DEBUG insights.client.connection Upload status: 500 Internal Server Error {"internal_error":{"reference":"62163670-6fa5-11e8-b11b-b99237dc5f1d"}} 2018-06-14 03:35:07,131 ERROR insights.client.connection Upload archive failed with status code 500 2018-06-14 03:35:07,131 ERROR insights.client.client Upload attempt 1 of 1 failed! Status Code: 500 2018-06-14 03:35:07,131 ERROR insights.client.client All attempts to upload have failed! 2018-06-14 03:35:07,131 ERROR insights.client.client Please see /var/log/insights-client/insights-client.log for additional information

I can run insights-client --register without issue.

Hi Marty,

Sometimes I am experiencing the same issue - I assume it's just a problem with the Red Hat servers.
Check again one or two days later, mostly it works flawlessly when I run sudo insights-client.

Regards,
Christian

I have written a script. If you have RHEL 7.5 and want to remove the redhat-access-insights and install the insights-client then register it to the redhat insights. You can get the script at this link.... https://raw.githubusercontent.com/venesh0709/bashscripts/master/insights-client.sh

!/bin/bash

echo "$(tput setaf 2)Installation of Insights-Client!! :-) $(tput sgr 0)"

v=$(cat /etc/redhat-release)

echo $v

if [[ $v = "Red Hat Enterprise Linux Server release 7.5 (Maipo)" ]]; then echo "$(tput setaf 1)Removing the redhat-access-insights :-( $(tput sgr 0)" yum remove redhat-access-insights echo "$(tput setaf 2)Now, Installing the Insights-client.... :-) $(tput sgr 0)" yum install insights-client echo "$(tput setaf 2)Registering this machine to Redhat Insights!! $(tput sgr 0)" insights-client --register else echo "$(tput setaf 1)$(tput setab 7)This is not the RHEL 7.5 Maipo$(tput sgr 0)" fi

echo "$(tput setaf 1)Removing the insights-client.sh file in /root directory$(tput sgr 0)" rm -f /root/insights-client.sh

: ' (tput setaf 1)

1 = red 2 = green 3 = parrot green 4 = blue 5 = purple 6 = skyblue 7 = white 8 = black '

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.