Submit a ticketCall us

AnnouncementsAre You “Flying Blind?”

When it comes to your complex IT infrastructure, you want to ensure you have a good grasp of what’s going on to avoid any fire drills that result from guesswork. Read our white paper to learn how proactively monitoring your IT environment can help your organization while giving you peace of mind.

Get your free white paper.

Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > Python bug causes Real-Time Process Explorer to Linux component monitors into Unknown state in SAM

Python bug causes Real-Time Process Explorer to Linux component monitors into Unknown state in SAM

Updated March 19, 2019

Overview

This article describes how to resolve a SAM issue that occurs when a bug in Python causes the Real-Time Process Explorer (RTPE) to place any SAM Linux Process Monitor components into an unknown state and return the following error message:

Process Explorer Error - Empty job result received.

Environment

  • SAM 

Cause

If the user identifier (UID) of any Linux process consists only of numbers, the Python script /opt/SolarWinds/Agent/bin/Plugins/APM/process_helper.py fails with the error message:

getpwuid(): uid not found:33

Specifically, the bug affects the following section of Python code:

def get_user_name(cache, uid):
    if uid in cache.keys():
        return cache[uid]
   user = pwd.getpwuid(uid)[0]
   cache[uid] = user
   return user

The line user = pwd.getpwuid(uid)[0] is what is causing the Python script to fail when using a numerical UID.

Resolution

  • Upgrade to SAM 6.8, which fixed this issue.
  • Alternatively, modify the Python code so if a numerical UID is not found, the Python command defaults the UID to the root user ID
    def get_user_name(cache, uid):
        try:
            user = pwd.getpwuid(uid)[0]
        except KeyError as name:
            user = 'root'
        return user
Last modified

Tags

Classifications

Public