On Tue, Nov 10, 2015 at 07:23:08PM +0100, P.A.M. van Dam (Pascal) wrote:

Good evening all,

Ok. Found the issue and fixed it.

There was an issue in the xmlrpc.py script.

[httpd/errorlog]

[Mon Nov 09 07:51:12.776403 2015] [:error] [pid 24563] [client 
10.8.63.163:34242] mod_wsgi (pid=24563): Exception occurred processing WSGI 
script '/usr/share/rhn/wsgi/xmlrpc.py'.
[Mon Nov 09 07:51:12.776481 2015] [:error] [pid 24563] [client 
10.8.63.163:34242] Traceback (most recent call last):
[Mon Nov 09 07:51:12.776504 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File "/usr/share/rhn/wsgi/xmlrpc.py", line 22, in 
application
[Mon Nov 09 07:51:12.776584 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     return wsgiHandler.handle(environ, start_response, 
"xmlrpc", "server.xmlrpc")
[Mon Nov 09 07:51:12.776601 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File "/usr/share/rhn/wsgi/wsgiHandler.py", line 36, in 
handle
[Mon Nov 09 07:51:12.776724 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     ret = parseServ(req)
[Mon Nov 09 07:51:12.776743 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File 
"/usr/lib/python2.7/site-packages/spacewalk/server/apacheHandler.py", line 80, 
in headerParserHandler
[Mon Nov 09 07:51:12.777504 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     ret = apacheSession.headerParserHandler(self, req)
[Mon Nov 09 07:51:12.777526 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File 
"/usr/lib/python2.7/site-packages/spacewalk/common/rhnApache.py", line 78, in 
headerParserHandler
[Mon Nov 09 07:51:12.777964 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     ret = self._init_request_processor(req)
[Mon Nov 09 07:51:12.777983 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File 
"/usr/lib/python2.7/site-packages/spacewalk/server/apacheHandler.py", line 116, 
in _init_request_processor
[Mon Nov 09 07:51:12.778006 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     self._req_processor = apachePOST(self.clientVersion, req)
[Mon Nov 09 07:51:12.778016 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File 
"/usr/lib/python2.7/site-packages/spacewalk/server/apacheRequest.py", line 85, 
in __init__
[Mon Nov 09 07:51:12.778560 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     self._setup_servers()
[Mon Nov 09 07:51:12.778581 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File 
"/usr/lib/python2.7/site-packages/spacewalk/server/apacheRequest.py", line 89, 
in _setup_servers
[Mon Nov 09 07:51:12.778604 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     interface_signature='rpcClasses')
[Mon Nov 09 07:51:12.778614 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File 
"/usr/lib/python2.7/site-packages/spacewalk/server/rhnImport.py", line 97, in 
load
[Mon Nov 09 07:51:12.778961 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     return l.load(dir, 
interface_signature=interface_signature)
[Mon Nov 09 07:51:12.778981 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File 
"/usr/lib/python2.7/site-packages/spacewalk/server/rhnImport.py", line 71, in 
load
[Mon Nov 09 07:51:12.779003 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     m = __import__(fromclause, {}, {}, [module])
[Mon Nov 09 07:51:12.779013 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File "/usr/share/rhn/server/handlers/app/__init__.py", 
line 20, in <module>
[Mon Nov 09 07:51:12.779080 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     import packages
[Mon Nov 09 07:51:12.779094 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File "/usr/share/rhn/server/handlers/app/packages.py", 
line 31, in <module>
[Mon Nov 09 07:51:12.779596 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     from spacewalk.server import rhnSQL, rhnPackageUpload, 
rhnUser, rhnSession
[Mon Nov 09 07:51:12.779617 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File 
"/usr/lib/python2.7/site-packages/spacewalk/server/rhnPackageUpload.py", line 
20, in <module>
[Mon Nov 09 07:51:12.780235 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     from spacewalk.common import rhn_mpm, rhn_deb, rhn_pkg
[Mon Nov 09 07:51:12.780255 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File 
"/usr/lib/python2.7/site-packages/spacewalk/common/rhn_deb.py", line 23, in 
<module>
[Mon Nov 09 07:51:12.780560 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     from debian import debfile
[Mon Nov 09 07:51:12.780579 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File "/usr/lib/python2.7/site-packages/debian/debfile.py", 
line 27, in <module>
[Mon Nov 09 07:51:12.780924 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     from debian.deb822 import Deb822
[Mon Nov 09 07:51:12.780945 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]   File "/usr/lib/python2.7/site-packages/debian/deb822.py", 
line 1481, in <module>
[Mon Nov 09 07:51:12.781787 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]     @six.add_metaclass(_ClassInitMeta)
[Mon Nov 09 07:51:12.781822 2015] [:error] [pid 24563] [client 
10.8.63.163:34242] AttributeError: 'module' object has no attribute 
'add_metaclass'


As I found out from an earlier posting in the user maillinglist this is an 
issue with an outdates python-six package.

I've fixed by installing the following rpm from the cloud Centos7 distro:

yum install 
http://cbs.centos.org/kojifiles/packages/python-six/1.9.0/1.el7/noarch/python-six-1.9.0-1.el7.noarch.rpm


Thanks for all that helped. Hope this will be usefull for others.

Kind regards,

   Pascal van Dam



> 
> Good evening all,
> 
> Did some checking in the logs residing in /var/log/rhn
> 
> [rhn_server_xmlrpc.log]
> 
> 2015/11/10 19:17:38 +02:00 12514 10.8.63.158: 
> server/apacheHandler.headerParserHandler('POST /XMLRPC HTTP/1.1',)
> 2015/11/10 19:17:38 +02:00 12514 10.8.63.158: 
> common/rhnApache.headerParserHandler
> 2015/11/10 19:17:38 +02:00 12514 10.8.63.158: 
> common/rhnApache.headerParserHandler('POST', '', {'mod_wsgi.listener_port': 
> '80', 'X-RHN-Client-Capability': 
> 'osad.ping(1)=1,scap.xccdf_eval(1)=1,packages.verify(1)=1,packages.extended_profile(2)=1,osad.rhn_check(1)=1,configfiles.base64_enc(1)=1,reboot.reboot(1)=1,configfiles.deploy(1)=1,caneatCheese(1)=1,packages.rollBack(1)=1,configfiles.mtime_upload(1)=1,configfiles.diff(1)=1,packages.update(2)=2,script.run(1)=1,configfiles.upload(1)=1,packages.runTransaction(1)=1,osad.ping(1)=1,scap.xccdf_eval(1)=1,packages.verify(1)=1,packages.extended_profile(2)=1,osad.rhn_check(1)=1,configfiles.base64_enc(1)=1,reboot.reboot(1)=1,configfiles.deploy(1)=1,caneatCheese(1)=1,packages.rollBack(1)=1,configfiles.mtime_upload(1)=1,configfiles.diff(1)=1,packages.update(2)=2,script.run(1)=1,configfiles.upload(1)=1,packages.runTransaction(1)=1',
>  'CONTEXT_DOCUMENT_ROOT': '/var/www/html', 'SERVER_SOFTWARE': 'Apache', 
> 'SCRIPT_NAME': '/XMLRPC', 'HTTP_X_!
 TR!
>  ANSPORT_INFO': 'Extended Capabilities Transport (C) Red Hat, Inc (version 
> 2.5.77-1.el7)', 'mod_wsgi.handler_script': '', 'SERVER_SIGNATURE': '', 
> 'REQUEST_METHOD': 'POST', 'PATH_INFO': '', 'SERVER_PROTOCOL': 'HTTP/1.1', 
> 'QUERY_STRING': '', 'X-Info': 'RPC Processor (C) Red Hat, Inc (version 
> 2.5.77-1.el7)', 'User-Agent': 'rhn.rpclib.py/2.5.77-1.el7', 'CONTENT_LENGTH': 
> '2724', 'HTTP_USER_AGENT': 'rhn.rpclib.py/2.5.77-1.el7', 
> 'HTTP_X_UP2DATE_VERSION': '2.5.1-1.el7', 'SERVER_NAME': 'ipacln04', 
> 'REMOTE_ADDR': '10.8.63.158', 'mod_wsgi.queue_start': '1447179458608353', 
> 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.version': (3, 4), 
> 'wsgi.url_scheme': 'http', 'Host': 'ipacln04', 'X-RHN-Transport-Capability': 
> 'follow-redirects=3', 'mod_wsgi.callable_object': 'application', 
> 'SERVER_PORT': '80', 'wsgi.multiprocess': True, 'mod_wsgi.input_chunked': 
> '0', 'SERVER_ADDR': '10.8.63.130', 'DOCUMENT_ROOT': '/var/www/html', 
> 'mod_wsgi.process_group': '', 'Accept-Encoding': 'identity', 'H!
 TT!
>  P_X_RHN_CLIENT_CAPABILITY': 'osad.ping(1)=1,scap.xccdf_eval(1)=1,packa
> ges.verify(1)=1,packages.extended_profile(2)=1,osad.rhn_check(1)=1,configfiles.base64_enc(1)=1,reboot.reboot(1)=1,configfiles.deploy(1)=1,caneatCheese(1)=1,packages.rollBack(1)=1,configfiles.mtime_upload(1)=1,configfiles.diff(1)=1,packages.update(2)=2,script.run(1)=1,configfiles.upload(1)=1,packages.runTransaction(1)=1,osad.ping(1)=1,scap.xccdf_eval(1)=1,packages.verify(1)=1,packages.extended_profile(2)=1,osad.rhn_check(1)=1,configfiles.base64_enc(1)=1,reboot.reboot(1)=1,configfiles.deploy(1)=1,caneatCheese(1)=1,packages.rollBack(1)=1,configfiles.mtime_upload(1)=1,configfiles.diff(1)=1,packages.update(2)=2,script.run(1)=1,configfiles.upload(1)=1,packages.runTransaction(1)=1',
>  'SCRIPT_FILENAME': '/usr/share/rhn/wsgi/xmlrpc.py', 'SERVER_ADMIN': 
> 'root@localhost', 'X-Up2Date-Version': '2.5.1-1.el7', 'X-Transport-Info': 
> 'Extended Capabilities Transport (C) Red Hat, Inc (version 2.5.77-1.el7)', 
> 'SCRIPT_URI': 'http://ipacln04/XMLRPC', 'HTTP_X_CLIENT_VERSION': '1', 
> 'wsgi.input': <!
 mo!
>  d_wsgi.Input object at 0x7f47580b3ab0>, 'HTTP_HOST': 'ipacln04', 
> 'SCRIPT_URL': '/XMLRPC', 'wsgi.multithread': False, 
> 'mod_wsgi.enable_sendfile': '0', 'REQUEST_URI': '/XMLRPC', 
> 'X-Client-Version': '1', 'wsgi.version': (1, 0), 'GATEWAY_INTERFACE': 
> 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.errors': <mod_wsgi.Log object at 
> 0x7f47580b33f0>, 'REMOTE_PORT': '39158', 'mod_wsgi.listener_host': '', 
> 'REQUEST_SCHEME': 'http', 'CONTEXT_PREFIX': '', 
> 'HTTP_X_RHN_TRANSPORT_CAPABILITY': 'follow-redirects=3', 'CONTENT_TYPE': 
> 'text/xml', 'mod_wsgi.application_group': 
> 'ipacln04.kleefdraakjes.nest|/xmlrpc', 'mod_wsgi.script_reloading': '1', 
> 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object 
> at 0x7f476aefbc60>, 'HTTP_ACCEPT_ENCODING': 'identity', 'UNIQUE_ID': 
> 'VkI0wn55SmyhKGIi4YeCDQAAAAE', 'HTTP_X_INFO': 'RPC Processor (C) Red Hat, Inc 
> (version 2.5.77-1.el7)'})
> 2015/11/10 19:17:38 +02:00 12514 10.8.63.158: 
> server/apacheHandler._init_request_processor
> 2015/11/10 19:17:38 +02:00 12514 10.8.63.158: 
> server/rhnImport.load('Attempting to load module xmlrpc from server.handlers 
> /usr/share/rhn/server/handlers',)
> 2015/11/10 19:17:38 +02:00 12514 10.8.63.158: server/rhnImport.load('Module 
> xmlrpc loaded',)
> 2015/11/10 19:17:38 +02:00 12514 10.8.63.158: 
> server/rhnImport.load('Attempting to load module app from server.handlers 
> /usr/share/rhn/server/handlers',)
> 
> After the last rhnImport.load apparently the unauthorized reaction is posted.
> 
> Where can I find why the request is classified as unauthorized?
> 
> Kind regards,
> 
>       Pascal
> 
> 
> On Tue, Nov 10, 2015 at 09:17:28AM +0100, P.A.M. van Dam (Pascal) wrote:
> > On Mon, Nov 09, 2015 at 02:37:50PM -0500, Tomas Lestach wrote:
> > > Generally rhnreg_ks logs to /var/log/up2date file.
> > > According to the error message, I'd recommend to check
> > > serverURL in /etc/sysconfig/rhn/up2date
> > > Is it in the serverURL=https://<server>/XMLRPC format?
> > > 
> > > Regards,
> > > --
> > > Tomas Lestach
> > > Red Hat Satellite Engineering, Red Hat
> > 
> > Good day Tomas,
> > 
> > Thanks for your quick reaction.
> > 
> > > Generally rhnreg_ks logs to /var/log/up2date file.
> > > According to the error message, I'd recommend to check
> > > serverURL in /etc/sysconfig/rhn/up2date
> > > Is it in the serverURL=https://<server>/XMLRPC format?
> > > 
> > 
> > It is indeed in this format:
> > 
> > [up2date]
> > ..
> > serverURL[comment]=Remote server URL (use FQDN)
> > serverURL=https://ipacln04.kleefdraakjes.nest/XMLRPC
> > ..
> > 
> > Can I add more debugging somewhere? As it affects all Spacewalk clients, I 
> > think it's definately
> > in the spacewalk server part. Any clue on where I could start my 
> > investigation?
> > 
> > Thanks in advance!
> > 
> > Kind regards,
> > 
> >     Pascal van Dam
> > 
> > 
> > 
> > > 
> > > 
> > > ----- Original Message -----
> > > > From: "P.A.M. van Dam (Pascal)" <pas...@jarmine01.kleefdraakjes.nest>
> > > > To: spacewalk-devel@redhat.com
> > > > Sent: Monday, November 9, 2015 8:18:49 AM
> > > > Subject: [Spacewalk-devel] rhn_check: XMLRPC ProtocolError: 401 
> > > > Unauthorized
> > > > 
> > > > Good day all,
> > > > 
> > > > Currently testing Spacewalk 2.5.x from the Nightlies repo on Centos
> > > > 7.1. Installation went ok and has run for several weeks (including
> > > > updates from the repo).
> > > > 
> > > > Today I am encountering different issues with Spacewalk client tools
> > > > like rhn_regks, rhn_check etc.
> > > > 
> > > > E.g. rhn_check gives:
> > > > 
> > > > >> root@jarmine04:1 bukkit]# rhn_check --verbose
> > > > >> XMLRPC ProtocolError: <ProtocolError for ipacln04
> > > > >> /rhn/Login.do?url_bounce=/rhn/errors/500.jsp&request_method=POST:
> > > > >> 401 Unauthorized>
> > > > 
> > > > Any clues? Where should I look to find where this authoization issue
> > > > has it's origin? Currently all spacewalk clients have the issue. The
> > > > WEBGUI is accessible and
> > > > from the logs in /var/log/rhn/* themselves I cannot find a clue.
> > > > 
> > > > Thanks in advance!
> > > > 
> > > > Kind regards,
> > > > 
> > > >         Pascal van Dam
> > > > 
> > > > 
> > > > _______________________________________________
> > > > Spacewalk-devel mailing list
> > > > Spacewalk-devel@redhat.com
> > > > https://www.redhat.com/mailman/listinfo/spacewalk-devel
> > > > 
> > > 
> > > _______________________________________________
> > > Spacewalk-devel mailing list
> > > Spacewalk-devel@redhat.com
> > > https://www.redhat.com/mailman/listinfo/spacewalk-devel
> > 
> > _______________________________________________
> > Spacewalk-devel mailing list
> > Spacewalk-devel@redhat.com
> > https://www.redhat.com/mailman/listinfo/spacewalk-devel
> 
> _______________________________________________
> Spacewalk-devel mailing list
> Spacewalk-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-devel

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to