Subscription-manager and katello-package-upload started to throw errors

Hello,

Recently I started to see that subscription-manager and
katello-package-upload don't work anymore.

Maybe somebody knows about those errors and can help.

Logs from client:

2015-10-09 01:32:16,157 [DEBUG] subscription-manager:19602
@connection.py:475 - Loaded CA certificates from
/var/lib/puppet/ssl/certs/: ca.pem, v-is-puppet-01.company.net.pem
2015-10-09 01:32:16,161 [DEBUG] subscription-manager:19602
@connection.py:523 - Making request: PUT
/rhsm/consumers/7b16514c-0d4c-4e51-a3a9-0ad3c178d383/packages
2015-10-09 01:32:18,906 [DEBUG] subscription-manager:19602
@connection.py:555 - Response: status=401
2015-10-09 01:32:18,907 [ERROR] subscription-manager:19602
@connection.py:584 - Response: 401
2015-10-09 01:32:18,908 [ERROR] subscription-manager:19602
@connection.py:585 - JSON parsing error: Expecting ':' delimiter: line 1
column 9 (char 8)
2015-10-09 01:32:18,908 [ERROR] subscription-manager:19602 @cache.py:150 -
Error updating system data on the server
2015-10-09 01:32:18,908 [ERROR] subscription-manager:19602 @cache.py:151 -
Server error attempting a PUT to
/rhsm/consumers/7b16514c-0d4c-4e51-a3a9-0ad3c178d383/packages returned
status 401
Unauthorized: Invalid credentials for request.

I think those are the relevant logs from foreman:

2015-10-08 18:20:06 [app] [I] Processing by DashboardController#index as
HTML
2015-10-08 18:20:06 [app] [I] Filter chain halted as
:authorize_client_or_user rendered or redirected
2015-10-08 18:20:06 [app] [I] Completed 401 Unauthorized in 1120ms (Views:
1062.9ms | ActiveRecord: 11.1ms)
2015-10-08 18:20:06 [app] [I] Redirected to
https://puppet.company.net/users/login
2015-10-08 18:20:06 [app] [I] Filter chain halted as :require_login
rendered or redirected

> Started GET "/rhsm/consumers/51035811-bed7-4b89-a14f-e7ee3863be5a" for
10.100.3.117 at 2015-10-08 18:24:24 -0400
2015-10-08 18:24:24 [app] [I] Processing by
Katello::Api::Rhsm::CandlepinProxiesController#consumer_show as JSON
2015-10-08 18:24:24 [app] [I] Parameters:
{"id"=>"51035811-bed7-4b89-a14f-e7ee3863be5a"}
2015-10-08 18:24:24 [app] [I] Rendered
api/v2/errors/unauthorized.json.rabl within api/v2/layouts/error_layout
(1.6ms)
2015-10-08 18:24:24 [app] [I] Filter chain halted as
:authorize_client_or_user rendered or redirected
2015-10-08 18:24:24 [app] [I] Completed 401 Unauthorized in 12ms (Views:
3.7ms | ActiveRecord: 0.7ms)

2015-10-08 18:24:59 [app] [I] Processing by
Katello::Api::Rhsm::CandlepinProxiesController#upload_package_profile as
JSON
2015-10-08 18:24:59 [app] [I] Rendered
api/v2/errors/unauthorized.json.rabl within api/v2/layouts/error_layout
(2.6ms)
2015-10-08 18:24:59 [app] [I] Filter chain halted as
:authorize_client_or_user rendered or redirected
2015-10-08 18:24:59 [app] [I] Completed 401 Unauthorized in 64ms (Views:
12.6ms | ActiveRecord: 10.4ms)

Best regards,
Cristian Falcas

So, the problem was that the katello redirect for /rhsm/ was deleted from
apache.

Fixed now

··· On Fri, Oct 9, 2015 at 1:34 AM, Cristian Falcas wrote:

Hello,

Recently I started to see that subscription-manager and
katello-package-upload don’t work anymore.

Maybe somebody knows about those errors and can help.

Logs from client:

2015-10-09 01:32:16,157 [DEBUG] subscription-manager:19602
@connection.py:475 - Loaded CA certificates from
/var/lib/puppet/ssl/certs/: ca.pem, v-is-puppet-01.company.net.pem
2015-10-09 01:32:16,161 [DEBUG] subscription-manager:19602
@connection.py:523 - Making request: PUT
/rhsm/consumers/7b16514c-0d4c-4e51-a3a9-0ad3c178d383/packages
2015-10-09 01:32:18,906 [DEBUG] subscription-manager:19602
@connection.py:555 - Response: status=401
2015-10-09 01:32:18,907 [ERROR] subscription-manager:19602
@connection.py:584 - Response: 401
2015-10-09 01:32:18,908 [ERROR] subscription-manager:19602
@connection.py:585 - JSON parsing error: Expecting ‘:’ delimiter: line 1
column 9 (char 8)
2015-10-09 01:32:18,908 [ERROR] subscription-manager:19602 @cache.py:150 -
Error updating system data on the server
2015-10-09 01:32:18,908 [ERROR] subscription-manager:19602 @cache.py:151 -
Server error attempting a PUT to
/rhsm/consumers/7b16514c-0d4c-4e51-a3a9-0ad3c178d383/packages returned
status 401
Unauthorized: Invalid credentials for request.

I think those are the relevant logs from foreman:

2015-10-08 18:20:06 [app] [I] Processing by DashboardController#index as
HTML
2015-10-08 18:20:06 [app] [I] Filter chain halted as
:authorize_client_or_user rendered or redirected
2015-10-08 18:20:06 [app] [I] Completed 401 Unauthorized in 1120ms (Views:
1062.9ms | ActiveRecord: 11.1ms)
2015-10-08 18:20:06 [app] [I] Redirected to
https://puppet.company.net/users/login
2015-10-08 18:20:06 [app] [I] Filter chain halted as :require_login
rendered or redirected

Started GET “/rhsm/consumers/51035811-bed7-4b89-a14f-e7ee3863be5a” for
10.100.3.117 at 2015-10-08 18:24:24 -0400
2015-10-08 18:24:24 [app] [I] Processing by
Katello::Api::Rhsm::CandlepinProxiesController#consumer_show as JSON
2015-10-08 18:24:24 [app] [I] Parameters:
{“id”=>“51035811-bed7-4b89-a14f-e7ee3863be5a”}
2015-10-08 18:24:24 [app] [I] Rendered
api/v2/errors/unauthorized.json.rabl within api/v2/layouts/error_layout
(1.6ms)
2015-10-08 18:24:24 [app] [I] Filter chain halted as
:authorize_client_or_user rendered or redirected
2015-10-08 18:24:24 [app] [I] Completed 401 Unauthorized in 12ms (Views:
3.7ms | ActiveRecord: 0.7ms)

2015-10-08 18:24:59 [app] [I] Processing by
Katello::Api::Rhsm::CandlepinProxiesController#upload_package_profile as
JSON
2015-10-08 18:24:59 [app] [I] Rendered
api/v2/errors/unauthorized.json.rabl within api/v2/layouts/error_layout
(2.6ms)
2015-10-08 18:24:59 [app] [I] Filter chain halted as
:authorize_client_or_user rendered or redirected
2015-10-08 18:24:59 [app] [I] Completed 401 Unauthorized in 64ms (Views:
12.6ms | ActiveRecord: 10.4ms)

Best regards,
Cristian Falcas