Problem Note 69205: Scheduling occasionally fails to trigger jobs and returns an HTTP 401 error in SAS® Viya® 3.5
SAS Viya scheduled jobs occasionally receive an HTTP 401 error when attempting to read the /jobExecution/jobRequests/ endpoint, which causes the job not to run.
When you review the scheduling log (default location: /opt/sas/viya/config/var/log/scheduler/default), an entry similar to the following appears at the time when the job is expected to trigger:
INFO 6544 — [ SASSched-1] org.quartz.core.JobRunShell : service [5e861f5a6bb5b03b] Job /jobExecution/jobRequests/jobrequestid threw a JobExecutionException:
org.quartz.JobExecutionException: Scheduling Service job execution resulted in unhandled exception [...]
Caused by: org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 : [
{"errorCode":0,"message":"Couldn't retrieve remote JWK set: Read timed out","details":["traceId: e46f80caa11227aa","path: /jobExecution/jobRequests/jobrequestid/jobs","traceId: be56ee75aa882c8d","path: /compute/commons/settings"],"links":[],"version":2,"httpStatusCode":401}
This issue occurs due to the way in which services obtain the signing key that is used to validate tokens. The request to obtain the key has a short time-out and can fail on the first attempt and succeed on the second. Services cache the signing key, so this issue usually occurs only when a service receives a request for the first time after starting or after a long period of inactivity. If jobs are scheduled at these points, they might fail.
To work around the issue for critical jobs, schedule a non-essential job to break this period of inactivity.
This issue is fixed in SAS Viya 3.5 22w34 and later.
Operating System and Release Information
| SAS System | SAS Viya 3.x | Linux for x64 | 3.5 | | Viya 3.5 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Problem Note |
| Priority: | medium |
| Date Modified: | 2022-05-24 07:34:49 |
| Date Created: | 2022-05-19 10:11:11 |