Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

subscription-manager 또는 yum 명령어 실행시에 'exceptions.ValueError' object has no attribute 'msg' 에러가 발생

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6
  • subscription-manager [RHSM]

Issue

  • 등록시 "subscription-manager" 를 사용하면 다음과 같은 에러 메세지가 발생합니다 :
# subscription-manager register --user=<username> --auto-attach
'exceptions.ValueError' object has no attribute 'msg'
  • yum 명령어를 실행하면 다음과 같은 에러 메시지가 발생하지만, 패키지는 정상적으로 다운로드되고 설치됩니다 :
# yum install <package_name>
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
'exceptions.ValueError' object has no attribute 'msg'
$ yum check-update
Loaded plugins: product-id, refresh-packagekit, security
Repo rhel-6-server-rpms forced skip_if_unavailable=True due to: /etc/rhsm/ca/redhat-uep.pem
Repo rhel-6-server-rpms forced skip_if_unavailable=True due to: /etc/pki/entitlement/1203202423242924761-key.pem
  • rhsm.log 에서 다음과 같은 에러 메시지가 발생합니다 :
2014-01-28 08:25:17,125 [WARNING]  @certmgr.py:107 - Exception caught while running <subscription_manager.cache.PackageProfileLib object at 0x297bf10> update
2014-01-28 08:25:17,125 [ERROR]  @certmgr.py:108 - 'exceptions.ValueError' object has no attribute 'msg'
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 100, in update
    updates += lib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 68, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/cache.py", line 56, in _do_update
    return profile_mgr.update_check(self.uep, consumer_uuid)
  File "/usr/share/rhsm/subscription_manager/cache.py", line 345, in update_check
    if not uep.supports_resource(PACKAGES_RESOURCE):
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 683, in supports_resource
    self._load_supported_resources()
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 670, in _load_supported_resources
    resources_list = self.conn.request_get("/")
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 541, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 469, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 490, in validateResponse
    log.error("JSON parsing error: %s" % e.msg)                                                            
AttributeError: 'exceptions.ValueError' object has no attribute 'msg'

Resolution

해당 문제는 bugzilla - 1096734 - AttributeError: 'exceptions.ValueError' object has no attribute'msg' 로 엔지니어링 팀에 보고되었습니다.

관련 수정 패키지는 RHEL 6.5 - python-rhsm bug fix update 에서 이용할 수 있으며 RHEL 6.6 에 포함되었습니다.

만일 시스템 상에 서드파티 CA 인증서가 설정된 프록시 서버가 네트워크 상에 존재하지 않고 지속적으로 해당 문제가 발생한다면 대안으로서 다음과 같은 방법을 사용하실 수 있습니다 :

# subscription-manager unregister
# subscription-manager clean
# subscription-manager register 
# subscription-manager list --available
# subscription-manager subscribe --pool=pool-id

또는 위에서 언급된 시스템을 등록하신 후, Customer Portal 로부터 서브스크립션을 등록시켜 주십시요.

Root Cause

  • 클라이언트 시스템과 Red Hat Network 사이의 프록시 서버가 서드파티 SSL CA 증명서를 사용하고 있습니다.
  • 이는 다음 커멘드의 결과인 SSL 서버 증명서를 통해 확인할 수 있습니다. 정상적인 Red Hat Network certificate 의 subject 와 issuer 는 다음과 같습니다 :
# openssl s_client -connect subscription.rhn.redhat.com:443
[...]
subject=/C=US/ST=North Carolina/O=Red Hat, Inc./OU=Red Hat Network/CN=subscription.rhn.redhat.com/emailAddress=ca-support@redhat.com
issuer=/C=US/ST=North Carolina/O=Red Hat, Inc./OU=Red Hat Network/CN=Red Hat Entitlement Operations Authority/emailAddress=ca-support@redhat.com

Diagnostic Steps

  • /var/log/rhsm/rhsm.log 파일:
 2014-01-28 08:25:17,083 [DEBUG]  @connection.py:426 - Using proxy: <proxy information>
2014-01-28 08:25:17,083 [DEBUG]  @connection.py:441 - Making request: GET https://subscription.rhn.redhat.com:443/subscription/
2014-01-28 08:25:17,123 [DEBUG]  @connection.py:460 - Response status: 403
2014-01-28 08:25:17,124 [ERROR]  @connection.py:489 - Response: 403
2014-01-28 08:25:17,125 [WARNING]  @certmgr.py:107 - Exception caught while running <subscription_manager.cache.PackageProfileLib object at 0x297bf10> update
2014-01-28 08:25:17,125 [ERROR]  @certmgr.py:108 - 'exceptions.ValueError' object has no attribute 'msg'
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 100, in update
    updates += lib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 68, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/cache.py", line 56, in _do_update
    return profile_mgr.update_check(self.uep, consumer_uuid)
  File "/usr/share/rhsm/subscription_manager/cache.py", line 345, in update_check
    if not uep.supports_resource(PACKAGES_RESOURCE):
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 683, in supports_resource
    self._load_supported_resources()
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 670, in _load_supported_resources
    resources_list = self.conn.request_get("/")
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 541, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 469, in _request
    self.validateResponse(result, request_type, handler)

  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 490, in validateResponse
    log.error("JSON parsing error: %s" % e.msg)                                                            <------ 
AttributeError: 'exceptions.ValueError' object has no attribute 'msg'

2014-01-28 08:25:17,129 [INFO]  @cache.py:168 - Checking current system info against cache: /var/lib/rhsm/cache/installed_products.json
2014-01-28 08:25:17,130 [INFO]  @cache.py:185 - No changes.

응답 상태: 403

   " A web server may return a 403 Forbidden HTTP status code in response to a        request from a client for a web page or resource to indicate that the server can be reached and understood the request, but refuses to take any further action. Status code 403 responses are the result of the web server being configured to deny access, for some reason, to the requested resource by the client ".

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.