Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2026875

Summary: Date parse error around SCA cert fetching when system locale is en_AU or en_CA
Product: [Community] Candlepin (Migrated to Jira) Reporter: Nikos Moumoulidis <nmoumoul>
Component: candlepinAssignee: Nikos Moumoulidis <nmoumoul>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.0CC: bcourt, dsynk, redakkan
Target Milestone: ---   
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: candlepin-4.0.14-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2026873 Environment:
Last Closed: 2022-01-18 12:23:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2026873    

Description Nikos Moumoulidis 2021-11-26 10:03:52 UTC
+++ This bug was initially created as a clone of Bug #2026873 +++

Description of problem:
When the system's default locale is set to en_AU or en_CA (and possibly other locales), SCA cert generation on the /accessible_content candlepin API always fails with 400 status code and this error:

Runtime Error RESTEASY003870: Unable to extract parameter from http request: javax.ws.rs.HeaderParam("If-Modified-Since") value is 'Thu, 01 Jan 1970 00:00:00 GMT' for public javax.ws.rs.core.Response org.candlepin.resource.ConsumerResource.getContentAccessBody(java.lang.String,java.util.Date) at org.candlepin.resteasy.DateFormatter.fromString:75
(see attachment for full stacktrace)

This is only happening on Java 11 (new for Sat 6.10) with root cause being https://bugs.openjdk.java.net/browse/JDK-8208487


Version-Release number of selected component (if applicable):
candlepin-4.0.9-1.el7sat.noarch.rpm

How reproducible:
100%

Steps to Reproduce:
1. Set system locale with "sudo localectl set-locale LANG=en_AU.UTF-8"
2. Restart the tomcat service.
3. Register a host to an organization with SCA mode enabled (the registration and SCA cert generation should still be successful).
4. Check /var/log/candlepin.log on the server, and /var/lib/rhsm/cache/content_access.json on the host.

Actual results:
There is a stack trace and 400 response status on the candlepin.log on the server.
There is no /var/lib/rhsm/cache/content_access.json cache file on the client.

Expected results:
There should be no stack trace or error on the candlepin.log.
The file cache file /var/lib/rhsm/cache/content_access.json should exist on the client.

Additional info:

The effect is minimal, since the SCA cert generation still works (through other API calls subscription-manager/rhsmcertd makes), but the client-side cache loses it's effect, since now the server is re-sending the same SCA certificate on every check in (instead of a 304 response).