We are seeing the following message when trying to delete a custom context using SAS Environment Manager in Viya 3.5:
A data error occurred that prevented the successful completion of the operation.
Opening up the console, the following request is submitted:
With the following response:
{
"errorCode":1008,
"message":"A data error occurred that prevented the successful completion of the operation.",
"details":["traceId: 1e951e833e7ebb4b","path: /compute/contexts/7e258745-c716-42fd-b8ac-375f2f2b7065"],
"links":[],"version":2,"httpStatusCode":500
}
Looking in the compute logs (/var/log/sas/viya/compute/default) for this event, the following is revealed:
2021-06-25 10:08:39.047 WARN 10609 --- [-auto-1-exec-49] o.h.engine.jdbc.spi.SqlExceptionHelper : allbow(7e30b736) [e40f73af84b0c415] SQL Error: 0, SQLState: 23503
2021-06-25 10:08:39.048 ERROR 10609 --- [-auto-1-exec-49] o.h.engine.jdbc.spi.SqlExceptionHelper : allbow(7e30b736) [e40f73af84b0c415] ERROR: update or delete on table "compute_server_context" violates foreign key constraint "compute_server_fk01" on table "compute_server"
Detail: Key (compute_server_context_id)=(7e258745-c716-42fd-b8ac-375f2f2b7065) is still referenced from table "compute_server".
2021-06-25 10:08:39.053 INFO 10609 --- [-auto-1-exec-49] o.h.e.j.b.internal.AbstractBatchImpl : allbow(7e30b736) [e40f73af84b0c415] HHH000010: On release of batch it still contained JDBC statements
2021-06-25 10:08:39.053 ERROR 10609 --- [-auto-1-exec-49] o.h.i.ExceptionMapperStandardImpl : allbow(7e30b736) [e40f73af84b0c415] HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute statement]
2021-06-25 10:08:39.061 ERROR 10609 --- [-auto-1-exec-49] com.sas.commons.rest.ExceptionLog : allbow(7e30b736) [e40f73af84b0c415] org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [compute_server_fk01]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
2021-06-25 10:08:39.061 ERROR 10609 --- [-auto-1-exec-49] com.sas.commons.rest.ExceptionLog : allbow(7e30b736) [e40f73af84b0c415] caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement
2021-06-25 10:08:39.061 ERROR 10609 --- [-auto-1-exec-49] com.sas.commons.rest.ExceptionLog : allbow(7e30b736) [e40f73af84b0c415] caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "compute_server_context" violates foreign key constraint "compute_server_fk01" on table "compute_server"
Detail: Key (compute_server_context_id)=(7e258745-c716-42fd-b8ac-375f2f2b7065) is still referenced from table "compute_server".
I am able to modify all attributes for this context EXCEPT the name (I can't rename or delete it).
This issue also appears to be severely affecting ALL other compute contexts by making them run very slowly, or not at all (due to timeouts), but ONLY when `reuseServerProcesses` is true. If reuseServerProcesses is false or not set, the jobs run fine (albeit under end user credentials).
How to rectify, or further troubleshoot?
/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya -
Data ControllerDevOps and AppDev on SAS 9 / Viya / Base SAS -
SASjs