Re: [Spacewalk-devel] rhn_check: XMLRPC ProtocolError: 401 Unauthorized

2015-11-10 Thread P.A.M. van Dam (Pascal)

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', 'HTT!
 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': , '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': 
, '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': , 'HTTP_ACCEPT_ENCODING': 'identity', 'UNIQUE_ID': 
'VkI0wn55SmyhKGIi4YeCDQE', '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 

Re: [Spacewalk-devel] rhn_check: XMLRPC ProtocolError: 401 Unauthorized

2015-11-10 Thread P.A.M. van Dam (Pascal)
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 
[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 
[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 
[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 

[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 
[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 
[Mon Nov 09 07:51:12.781787 2015] [:error] [pid 24563] [client 
10.8.63.163:34242]