Bug 1003888 - 'yum makecache' via Proxy times out
'yum makecache' via Proxy times out
Status: CLOSED DUPLICATE of bug 947639
Product: Red Hat Satellite Proxy 5
Classification: Red Hat
Component: Server (Show other bugs)
560
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Gennadii Altukhov
Red Hat Satellite QA List
:
Depends On:
Blocks: 1335589 sat5-errata
  Show dependency treegraph
 
Reported: 2013-09-03 08:48 EDT by Lukas Pramuk
Modified: 2016-09-13 11:35 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-13 05:12:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2620871 None None None 2016-09-13 11:35 EDT

  None (edit)
Description Lukas Pramuk 2013-09-03 08:48:11 EDT
Description of problem:
Proxy is more pron to timeouts, yum makecache performed at client registered through proxy times out.

Version-Release number of selected component (if applicable):
RHN-Proxy-5.6.0-RHEL5/6-re20130830.0


How reproducible:
seen multiple times (both rhel5 and rhel6)

Steps to Reproduce:
1. Setup:  client (us or cz) -> proxy (cz) -> sat (us) 

2. [@client]# yum clean all

3a. [@client]# yum makecache
Error: failed to retrieve repodata/other.xml.gz from rhel-x86_64-server-5
error was [Errno 12] Timeout: <urlopen error timed out>

3b. [@proxy]# tail -100f /var/log/httpd/error_log 
[Tue Sep 03 07:55:38 2013] [error] Exception reported from <PROXYFQDN>
[Tue Sep 03 07:55:38 2013] [error] Time: Tue Sep  3 07:55:38 2013
[Tue Sep 03 07:55:38 2013] [error] Exception type <class 'socket.timeout'>
[Tue Sep 03 07:55:38 2013] [error] Exception while handling function SharedHandler._serverCommo
[Tue Sep 03 07:55:38 2013] [error] Request object information:
[Tue Sep 03 07:55:38 2013] [error] URI: /XMLRPC/GET-REQ/rhel-x86_64-server-5/repodata/other.xml.gz
[Tue Sep 03 07:55:38 2013] [error] Remote Host: <CLIENTFQDN>
[Tue Sep 03 07:55:38 2013] [error] Server Name: <PROXYFQDN>:443
[Tue Sep 03 07:55:38 2013] [error] Headers passed in:
[Tue Sep 03 07:55:38 2013] [error] \tAccept-Encoding: identity
[Tue Sep 03 07:55:38 2013] [error] \tConnection: close
[Tue Sep 03 07:55:38 2013] [error] \tDOCUMENT_ROOT: /var/www/html
[Tue Sep 03 07:55:38 2013] [error] \tGATEWAY_INTERFACE: CGI/1.1
[Tue Sep 03 07:55:38 2013] [error] \tHTTPS: 1
[Tue Sep 03 07:55:38 2013] [error] \tHTTP_ACCEPT_ENCODING: identity
[Tue Sep 03 07:55:38 2013] [error] \tHTTP_CONNECTION: close
[Tue Sep 03 07:55:38 2013] [error] \tHTTP_HOST: <PROXYFQDN>
[Tue Sep 03 07:55:38 2013] [error] \tHTTP_PRAGMA: no-cache
[Tue Sep 03 07:55:38 2013] [error] \tHTTP_USER_AGENT: rhn.rpclib.py/$Revision$
[Tue Sep 03 07:55:38 2013] [error] \tHTTP_X_RHN_AUTH: w++aGKTOo9t4dC3GTsk/Zw==
[Tue Sep 03 07:55:38 2013] [error] \tHTTP_X_RHN_AUTH_EXPIRE_OFFSET: 3600.0
[Tue Sep 03 07:55:38 2013] [error] \tHTTP_X_RHN_AUTH_SERVER_TIME: 1378209045.99
[Tue Sep 03 07:55:38 2013] [error] \tHTTP_X_RHN_AUTH_USER_ID: 
[Tue Sep 03 07:55:38 2013] [error] \tHTTP_X_RHN_SERVER_ID: 1000010038
[Tue Sep 03 07:55:38 2013] [error] \tHTTP_X_RHN_TRANSPORT_CAPABILITY: follow-redirects=3
[Tue Sep 03 07:55:38 2013] [error] \tHost: <PROXYFQDN>
[Tue Sep 03 07:55:38 2013] [error] \tPATH_INFO: /GET-REQ/rhel-x86_64-server-5/repodata/other.xml.gz
[Tue Sep 03 07:55:38 2013] [error] \tPATH_TRANSLATED: /var/www/html/GET-REQ/rhel-x86_64-server-5/repodata/other.xml.gz
[Tue Sep 03 07:55:38 2013] [error] \tPragma: no-cache
[Tue Sep 03 07:55:38 2013] [error] \tQUERY_STRING: 
[Tue Sep 03 07:55:38 2013] [error] \tREMOTE_ADDR: <CLIENT_IP>
[Tue Sep 03 07:55:38 2013] [error] \tREMOTE_PORT: 55373
[Tue Sep 03 07:55:38 2013] [error] \tREQUEST_METHOD: GET
[Tue Sep 03 07:55:38 2013] [error] \tREQUEST_URI: /XMLRPC/GET-REQ/rhel-x86_64-server-5/repodata/other.xml.gz
[Tue Sep 03 07:55:38 2013] [error] \tSCRIPT_FILENAME: /usr/share/rhn/wsgi/xmlrpc.py
[Tue Sep 03 07:55:38 2013] [error] \tSCRIPT_NAME: /XMLRPC
[Tue Sep 03 07:55:38 2013] [error] \tSCRIPT_URI: https://<PROXYFQDN>/XMLRPC/GET-REQ/rhel-x86_64-server-5/repodata/other.xml.gz
[Tue Sep 03 07:55:38 2013] [error] \tSCRIPT_URL: /XMLRPC/GET-REQ/rhel-x86_64-server-5/repodata/other.xml.gz
[Tue Sep 03 07:55:38 2013] [error] \tSERVER_ADDR: <PROXY_IP>
[Tue Sep 03 07:55:38 2013] [error] \tSERVER_ADMIN: root@localhost
[Tue Sep 03 07:55:38 2013] [error] \tSERVER_NAME: <PROXYFQDN>
[Tue Sep 03 07:55:38 2013] [error] \tSERVER_PORT: 443
[Tue Sep 03 07:55:38 2013] [error] \tSERVER_PROTOCOL: HTTP/1.1
[Tue Sep 03 07:55:38 2013] [error] \tSERVER_SIGNATURE: <address>Apache/2.2.15 (Red Hat) Server at <PROXYFQDN> Port 443</address>
[Tue Sep 03 07:55:38 2013] [error] 
[Tue Sep 03 07:55:38 2013] [error] \tSERVER_SOFTWARE: Apache/2.2.15 (Red Hat)
[Tue Sep 03 07:55:38 2013] [error] \tUser-Agent: rhn.rpclib.py/$Revision$
[Tue Sep 03 07:55:38 2013] [error] \tX-RHN-Auth: w++aGKTOo9t4dC3GTsk/Zw==
[Tue Sep 03 07:55:38 2013] [error] \tX-RHN-Auth-Expire-Offset: 3600.0
[Tue Sep 03 07:55:38 2013] [error] \tX-RHN-Auth-Server-Time: 1378209045.99
[Tue Sep 03 07:55:38 2013] [error] \tX-RHN-Auth-User-Id: 
[Tue Sep 03 07:55:38 2013] [error] \tX-RHN-Server-Id: 1000010038
[Tue Sep 03 07:55:38 2013] [error] \tX-RHN-Transport-Capability: follow-redirects=3
[Tue Sep 03 07:55:38 2013] [error] \tmod_ssl.is_https: <built-in method ssl_is_https of mod_wsgi.Adapter object at 0x7f2467053468>
[Tue Sep 03 07:55:38 2013] [error] \tmod_ssl.var_lookup: <built-in method ssl_var_lookup of mod_wsgi.Adapter object at 0x7f2467053468>
[Tue Sep 03 07:55:38 2013] [error] \tmod_wsgi.application_group: <PROXYFQDN>|/xmlrpc
[Tue Sep 03 07:55:38 2013] [error] \tmod_wsgi.callable_object: application
[Tue Sep 03 07:55:38 2013] [error] \tmod_wsgi.handler_script: 
[Tue Sep 03 07:55:38 2013] [error] \tmod_wsgi.input_chunked: 0
[Tue Sep 03 07:55:38 2013] [error] \tmod_wsgi.listener_host: 
[Tue Sep 03 07:55:38 2013] [error] \tmod_wsgi.listener_port: 443
[Tue Sep 03 07:55:38 2013] [error] \tmod_wsgi.process_group: 
[Tue Sep 03 07:55:38 2013] [error] \tmod_wsgi.request_handler: wsgi-script
[Tue Sep 03 07:55:38 2013] [error] \tmod_wsgi.script_reloading: 1
[Tue Sep 03 07:55:38 2013] [error] \tmod_wsgi.version: (3, 2)
[Tue Sep 03 07:55:38 2013] [error] \twsgi.errors: <mod_wsgi.Log object at 0x7f24671013b0>
[Tue Sep 03 07:55:38 2013] [error] \twsgi.file_wrapper: <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f2467053468>
[Tue Sep 03 07:55:38 2013] [error] \twsgi.input: <mod_wsgi.Input object at 0x7f24674b9130>
[Tue Sep 03 07:55:38 2013] [error] \twsgi.multiprocess: True
[Tue Sep 03 07:55:38 2013] [error] \twsgi.multithread: False
[Tue Sep 03 07:55:38 2013] [error] \twsgi.run_once: False
[Tue Sep 03 07:55:38 2013] [error] \twsgi.url_scheme: https
[Tue Sep 03 07:55:38 2013] [error] \twsgi.version: (1, 1)
[Tue Sep 03 07:55:38 2013] [error] 
[Tue Sep 03 07:55:38 2013] [error] Exception Handler Information
[Tue Sep 03 07:55:38 2013] [error] Traceback (most recent call last):
[Tue Sep 03 07:55:38 2013] [error]   File "/usr/share/rhn/proxy/rhnShared.py", line 201, in _serverCommo
[Tue Sep 03 07:55:38 2013] [error]     status, headers, bodyFd = self._proxy2server()
[Tue Sep 03 07:55:38 2013] [error]   File "/usr/share/rhn/proxy/rhnShared.py", line 375, in _proxy2server
[Tue Sep 03 07:55:38 2013] [error]     response = http_connection.getresponse()
[Tue Sep 03 07:55:38 2013] [error]   File "/usr/lib/python2.6/site-packages/rhn/connections.py", line 130, in getresponse
[Tue Sep 03 07:55:38 2013] [error]     response.begin()
[Tue Sep 03 07:55:38 2013] [error]   File "/usr/lib64/python2.6/httplib.py", line 391, in begin
[Tue Sep 03 07:55:38 2013] [error]     version, status, reason = self._read_status()
[Tue Sep 03 07:55:38 2013] [error]   File "/usr/lib64/python2.6/httplib.py", line 349, in _read_status
[Tue Sep 03 07:55:38 2013] [error]     line = self.fp.readline()
[Tue Sep 03 07:55:38 2013] [error]   File "/usr/lib64/python2.6/socket.py", line 433, in readline
[Tue Sep 03 07:55:38 2013] [error]     data = recv(1)
[Tue Sep 03 07:55:38 2013] [error] timeout: timed out
[Tue Sep 03 07:55:38 2013] [error] 


Actual results:
yum makecache via proxy times out 

Expected results:
yum makecache via proxy operates smoothly

Additional info:
- Regression againts RHN-Proxy-5.6.0-RHEL6/5-re20130617.0
- rhnreg_ks, rhn_check, yum repolist, yum install pkg - all these are performed without timeouts
Comment 2 Stephen Herr 2013-09-06 14:52:11 EDT
Lukas, didn't you find out that this was because the default yum timout (if one is not explicitly set in yum.conf) is 30s, which may not be long enough for the proxy to get the repodata from hosted / satellite?

So the only "fix" is to improve the documentation around yum timeouts when they're using it in conjunction with a proxy?
Comment 6 Gennadii Altukhov 2016-09-07 08:40:29 EDT
Starting work on this BZ ...
Comment 7 Gennadii Altukhov 2016-09-13 05:12:51 EDT
I'm able to reproduce this *case*. This is not a bug, just wrong configuration. 
We added a possibility to set "proxy.timeout = seconds" in /etc/rhn/rhn.conf, or just 
timeout = <seconds> (default is 120) option in /usr/share/rhn/config-defaults/rhn_proxy.conf

see bug 947639 for details. 
Added KB article https://access.redhat.com/solutions/2620871

*** This bug has been marked as a duplicate of bug 947639 ***
Comment 8 Xixi 2016-09-13 11:35:13 EDT
(In reply to Gennadii Altukhov from comment #7)
> I'm able to reproduce this *case*. This is not a bug, just wrong
> configuration. 
> We added a possibility to set "proxy.timeout = seconds" in
> /etc/rhn/rhn.conf, or just 
> timeout = <seconds> (default is 120) option in
> /usr/share/rhn/config-defaults/rhn_proxy.conf
> 
> see bug 947639 for details. 
> Added KB article https://access.redhat.com/solutions/2620871
> 
KBase Solution published, thank you!

> *** This bug has been marked as a duplicate of bug 947639 ***

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