Bug 102362 - rup: stooge: RPC: Timed out
Summary: rup: stooge: RPC: Timed out
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rusers
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-08-14 15:11 UTC by George Rich
Modified: 2015-03-05 01:12 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-07-02 12:47:28 UTC
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.