[Spacewalk-list] rhn-clone-errata.py and proxy authenticaition
Walid
walid.shaari at gmail.com
Wed Aug 10 12:05:12 UTC 2011
Hi,
I am using 0.4 version of the script "/repo/rhn-clone-errata.py" and still
not lucky yet in getting any erratas.
first case ) by using http_proxy
export http_proxy="http://user@proxy.company.com:8085"
and did set the RHNUSER and RHNPASS inside the script itself
[root at tlca064 source-sw]# /repo/rhn-clone-errata.py -s localhost -l RHNUSER
-p RHNPASS -c 'rhel-x86_64-server-5' --verbose
I get connection time out as below
Traceback (most recent call last):
File "/repo/rhn-clone-errata.py", line 644, in ?
main()
File "/repo/rhn-clone-errata.py", line 564, in main
myRHN =
RHNServer(svrRHN,userRHN,passRHN,options.proxyhost,options.proxyport)
File "/repo/rhn-clone-errata.py", line 94, in __init__
self.rhnSession = self.rhnLogin(self.login,self.password,0)
File "/repo/rhn-clone-errata.py", line 98, in rhnLogin
rhnSession=self.server.auth.login(login,password)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/usr/lib64/python2.4/xmlrpclib.py", line 1129, in request
self.send_content(h, request_body)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1243, in send_content
connection.endheaders()
File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders
self._send_output()
File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output
self.send(msg)
File "/usr/lib64/python2.4/httplib.py", line 652, in send
self.connect()
File "/usr/lib64/python2.4/httplib.py", line 1078, in connect
sock.connect((self.host, self.port))
File "<string>", line 1, in connect
socket.error: (110, 'Connection timed out')
Second case) unset the http_proxy and try to use the proxy options
/repo/rhn-clone-errata.py -s localhost -l RHNUSER -p RHNPASS -c
'rhel-x86_64-server-5' --verbose --proxy-host='user:pass at proxy.comapny.com'
--proxy-port=80
gives Name or service not known as below
http://user:pass@proxy.company.com.sa/rhn.redhat.com/rpc/api <?xml
version='1.0'?>
<methodCall>
<methodName>auth.login</methodName>
<params>
<param>
<value><string>RHNUSER</string></value>
</param>
<param>
<value><string>RHNPASS</string></value>
</param>
</params>
</methodCall>
0
Traceback (most recent call last):
File "/repo/rhn-clone-errata.py", line 644, in ?
main()
File "/repo/rhn-clone-errata.py", line 564, in main
myRHN =
RHNServer(svrRHN,userRHN,passRHN,options.proxyhost,options.proxyport)
File "/repo/rhn-clone-errata.py", line 94, in __init__
self.rhnSession = self.rhnLogin(self.login,self.password,0)
File "/repo/rhn-clone-errata.py", line 98, in rhnLogin
rhnSession=self.server.auth.login(login,password)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/repo/rhn-clone-errata.py", line 75, in request
return Transport.request(self, host, "http://"+host+handler,
request_body, verbose)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1129, in request
self.send_content(h, request_body)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1243, in send_content
connection.endheaders()
File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders
self._send_output()
File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output
self.send(msg)
File "/usr/lib64/python2.4/httplib.py", line 652, in send
self.connect()
File "/usr/lib64/python2.4/httplib.py", line 620, in connect
socket.SOCK_STREAM):
socket.gaierror: (-2, 'Name or service not known')
if i remove the proxy user, and password
/repo/rhn-clone-errata.py -s localhost -l RHNUSER -p RHNPASS -c
'rhel-x86_64-server-5' --verbose --proxy-host='proxy.company.com'
--proxy-port=80
I get the error "407 Proxy Authentication Required"
</param>
</params>
</methodCall>
0
ProtocolError: 407 - Proxy Authentication Required
Traceback (most recent call last):
File "/repo/rhn-clone-errata.py", line 644, in ?
main()
File "/repo/rhn-clone-errata.py", line 564, in main
myRHN =
RHNServer(svrRHN,userRHN,passRHN,options.proxyhost,options.proxyport)
File "/repo/rhn-clone-errata.py", line 94, in __init__
self.rhnSession = self.rhnLogin(self.login,self.password,0)
File "/repo/rhn-clone-errata.py", line 113, in rhnLogin
return self.rhnLogin(login,password, (retry + 1))
File "/repo/rhn-clone-errata.py", line 113, in rhnLogin
return self.rhnLogin(login,password, (retry + 1))
File "/repo/rhn-clone-errata.py", line 113, in rhnLogin
return self.rhnLogin(login,password, (retry + 1))
File "/repo/rhn-clone-errata.py", line 113, in rhnLogin
return self.rhnLogin(login,password, (retry + 1))
File "/repo/rhn-clone-errata.py", line 98, in rhnLogin
rhnSession=self.server.auth.login(login,password)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/repo/rhn-clone-errata.py", line 75, in request
return Transport.request(self, host, "http://"+host+handler,
request_body, verbose)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1137, in request
headers
xmlrpclib.ProtocolError: <ProtocolError for rhn.redhat.comhttp://
rhn.redhat.com/rpc/api: 407 Proxy Authentication Required>
so it seems the problem is how to pass the user:pass for the proxy
authentication for rhn, does any one know how i can get through this, i will
delve into the code later, but if you have a solution or an updated version
of the script, it will be much appreciated
kind regards
Walid Shaari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20110810/23cb38f2/attachment.htm>
More information about the Spacewalk-list
mailing list