Bug 68347 - rhn_check is broken [AttributeError: 'module' object has no attribute 'getServer']
rhn_check is broken [AttributeError: 'module' object has no attribute 'getSer...
Status: CLOSED RAWHIDE
Product: Red Hat Public Beta
Classification: Retired
Component: up2date (Show other bugs)
limbo
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
Jay Turner
:
: 68301 (view as bug list)
Depends On:
Blocks: 67217
  Show dependency treegraph
 
Reported: 2002-07-09 09:40 EDT by Markku Kolkka
Modified: 2015-01-07 18:57 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-08-19 14:58:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Markku Kolkka 2002-07-09 09:40:05 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020625

Description of problem:
I managed to register my Limbo system to Red Hat Network, but the system status
page showed that the system isn't checking in. Rhnsd is running, so I tried
rhn_check manually and got the error:
# rhn_check -v
/usr/sbin/rhn_check:0: SyntaxWarning: name 'ACTION_VERSION' is assigned to
before global declaration
/usr/sbin/rhn_check:0: SyntaxWarning: name 'Status' is assigned to before global
declaration
Traceback (most recent call last):
  File "/usr/sbin/rhn_check", line 229, in ?
    server = up2date.getServer()
AttributeError: 'module' object has no attribute 'getServer'


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


How reproducible:
Always

Steps to Reproduce:
1.run rhn_check
2.
3.
	

Actual Results:  Program fails immediately, doesn't check in with server.

Additional info:
Comment 1 Aleksey Nogin 2002-07-18 19:06:14 EDT
*** Bug 68301 has been marked as a duplicate of this bug. ***
Comment 2 Adrian Likins 2002-07-18 19:09:12 EDT
fixed in cvs
Comment 3 Markku Kolkka 2002-07-23 05:22:27 EDT
I upgraded to up2date-2.9.17-7.x.9 from ftp://people.redhat.com/misa/fixes, and
rhn_check is still broken, but with different error messages:

# rhn_check -v
/usr/sbin/rhn_check:0: SyntaxWarning: name 'ACTION_VERSION' is assigned to
before global declaration
/usr/sbin/rhn_check:0: SyntaxWarning: name 'Status' is assigned to before global
declaration
Adding cert <X509Name object '/C=US/ST=North Carolina/L=Research Triangle
Park/O=Red Hat, Inc./OU=Red Hat Network Services/CN=RHNS Certificate
Authority/Email=rhns@redhat.com'>
Adding cert <X509Name object '/C=US/ST=North Carolina/L=Research Triangle
Park/O=Red Hat, Inc./OU=Red Hat Network Services/CN=RHNS Certificate
Authority/Email=rhns@redhat.com'>
Traceback (most recent call last):
  File "/usr/sbin/rhn_check", line 262, in ?
    action = server.queue.get(up2dateAuth.getSystemId(), ACTION_VERSION, Status)
  File "/usr/lib/python2.2/xmlrpclib.py", line 821, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.2/site-packages/rhn/rpclib.py", line 122, in _request
    verbose=self._verbose
  File "/usr/lib/python2.2/site-packages/rhn/transports.py", line 117, in request
    headers, fd = req.send_http(host, handler)
  File "/usr/lib/python2.2/site-packages/rhn/transports.py", line 563, in send_http
    self._connection.connect()
  File "/usr/lib/python2.2/site-packages/rhn/connections.py", line 172, in connect
    self.sock.init_ssl()
  File "/usr/lib/python2.2/site-packages/rhn/SSL.py", line 90, in init_ssl
    store.add_cert(cert)
crypto.Error: [('x509 certificate routines', 'X509_STORE_add_cert', 'cert
already in hash table')]
Comment 4 Michael Young 2002-07-23 07:12:17 EDT
Check what version of rhnlib you are using. I think I have seen an rhnlib bug
elsewhere on bugzilla/limbo mailling list somewhat similar to that.
Comment 5 Markku Kolkka 2002-07-23 07:30:47 EDT
rhnlib-0.8-8
Comment 6 Nigel Smith 2002-07-23 17:02:22 EDT
Just tried rhn_check -v 
with up2date-2.9.20 and rhnlib-0.8.10
from ftp://people.redhat.com/misa/fixes/
and it is still broken as per markku.kolkka's comment.
(But up2date -p seems fixed ok)
Comment 7 Adrian Likins 2002-07-24 04:10:26 EDT
just tracked this down, apparently adding the same cert to
a server twice breaks things. 

Just fixed this in rhn_check, though I might consider
this a bug against rhnlib. But closing this one out,
since it's getting away from $SUMMARY

should be fixed in 2.9.26 or higher
Comment 8 Nigel Smith 2002-07-25 16:25:44 EDT
I have now installed up2date-2.9.28 and rhnlib-0.8.11 
If I try: 
#rhn_check -v
I now just get:

/usr/sbin/rhn_check:0: SyntaxWarning: name 'ACTION_VERSION' is assigned to 
before global declaration
/usr/sbin/rhn_check:0: SyntaxWarning: name 'Status' is assigned to before 
global declaration

with no Python traceback.
Comment 9 Aleksey Nogin 2002-07-30 16:03:00 EDT
Yes, it does work (although it still prints the warnings). With rhnlib-0.8-11
and up2date-2.9.30-7.x.9, I get (after scheduling a package refresh):

# rhn_check -v
/usr/sbin/rhn_check:0: SyntaxWarning: name 'ACTION_VERSION' is assigned to
before global declaration
/usr/sbin/rhn_check:0: SyntaxWarning: name 'Status' is assigned to before global
declaration
Adding cert <X509Name object '/C=US/ST=North Carolina/L=Research Triangle
Park/O=Red Hat, Inc./OU=Red Hat Network Services/CN=RHNS Certificate
Authority/Email=rhns@redhat.com'>
Adding cert <X509Name object '/C=US/ST=North Carolina/L=Research Triangle
Park/O=Red Hat, Inc./OU=Red Hat Network Services/CN=RHNS Certificate
Authority/Email=rhns@redhat.com'>
handle_action actionid = 5245508, version = 2
Adding cert <X509Name object '/C=US/ST=North Carolina/L=Research Triangle
Park/O=Red Hat, Inc./OU=Red Hat Network Services/CN=RHNS Certificate
Authority/Email=rhns@redhat.com'>
Sending back response: (0, 'rpmlist refreshed', {})
Adding cert <X509Name object '/C=US/ST=North Carolina/L=Research Triangle
Park/O=Red Hat, Inc./OU=Red Hat Network Services/CN=RHNS Certificate
Authority/Email=rhns@redhat.com'>
Adding cert <X509Name object '/C=US/ST=North Carolina/L=Research Triangle
Park/O=Red Hat, Inc./OU=Red Hat Network Services/CN=RHNS Certificate
Authority/Email=rhns@redhat.com'>
Comment 10 Jay Turner 2002-08-19 14:58:21 EDT
Reopening as I'm getting the following when running 'rhn_check -v' with
up2date-2.9.46-1:

[haring (root):~]# rhn_check -v
/usr/sbin/rhn_check:0: SyntaxWarning: name 'ACTION_VERSION' is assigned to
before global declaration
/usr/sbin/rhn_check:0: SyntaxWarning: name 'Status' is assigned to before global
declaration
Comment 11 Adrian Likins 2002-08-21 19:22:07 EDT
fixed in 2.9.52 or so

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