Bug 102362

Summary: rup: stooge: RPC: Timed out
Product: [Retired] Red Hat Linux Reporter: George Rich <george_rich>
Component: rusersAssignee: Phil Knirsch <pknirsch>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: byrnes, mattdm, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-07-02 12:47:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description George Rich 2003-08-14 15:11:26 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2.1) Gecko/20030711

Description of problem:
When using the "rup stooge" command to find the status of a remote
machine, the response from the command is "rup: stooge: RPC: Timed 
out".

$ rup stooge
rup: stooge: RPC: Timed out

While using the same command without any options, shows the same
remote machine, and all others on the same network segment.

Using "rup -h stooge" returns the correct data:

$ rup -h stooge
collecting responses...
stooge                   up           21:56,    load average: 0.12 0.15 0.16

The program fails against other RedHat 9 Linux systems, Solaris, and HP-UX
systems, but works in older releases of RedHat Linux. 

Version-Release number of selected component (if applicable):
rusers-0.17-25

How reproducible:
Always

Steps to Reproduce:
1. rup <remote_machine_name>
2.
3.
    

Actual Results:  rup stooge
rup: stooge: RPC: Timed out


Expected Results:  rup -h stooge
stooge                   up           21:56,    load average: 0.12 

Additional info:

Note that the /etc/nsswitch.conf files uses "files nis" for 
the following entries:

hosts:      files dns

services:   files nis
networks:   files nis
protocols:  files nis
rpc:        files nis
ethers:     files nis
netmasks:   files nis
bootparams: files nis

netgroup:   nis

publickey:  nis

automount:  nis files
aliases:    files

Comment 1 Need Real Name 2003-10-28 20:37:21 UTC
The problem is that the timeval struct isn't initialized for the
clnt_call to RSTATPROC_STATS.  Here's a patch to fix it:

--- rup.c.orig  2003-10-28 12:30:39.000000000 -0500
+++ rup.c       2003-10-28 15:07:28.000000000 -0500
@@ -245,29 +245,30 @@ onehost(const char *host)
 {
        CLIENT *rstat_clnt;
        statstime host_stat;
        struct timeval foo;

        rstat_clnt = clnt_create(host, RSTATPROG, RSTATVERS_TIME, "udp");
        if (rstat_clnt == NULL) {
                warnx("%s", clnt_spcreateerror(host));
                return;
        }

        memset(&host_stat, 0, sizeof(host_stat));
+       foo.tv_sec = 2;
+       foo.tv_usec = 0;
        if (clnt_call(rstat_clnt, RSTATPROC_STATS,
                      (xdrproc_t) xdr_void, NULL,
                      (xdrproc_t) xdr_statstime,
                      (caddr_t) &host_stat,
-
                      foo) != RPC_SUCCESS)
        {
                warnx("%s",  clnt_sperror(rstat_clnt, host));
                return;
        }

        if (sort_type != SORT_NONE) {
                remember_rup_data(host, &host_stat);
        } else {
                print_rup_data(host, &host_stat);
        }
        clnt_destroy(rstat_clnt);


Comment 2 Phil Knirsch 2004-07-02 12:47:28 UTC
Fixed since rusers-0.17-27 and later.

Read ya, Phil