BookmarkSubscribeRSS Feed
AllanBowe
Barite | Level 11

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.

 

AllanBowe_0-1624654506205.png

 

Opening up the console, the following request is submitted:

AllanBowe_1-1624654606786.png

 

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 Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
2 REPLIES 2
jcFranklin
SAS Employee

The error you are getting is coming from the postgres database. 

 

Have you tried deleting the compute context using EV yet? 

 

AllanBowe
Barite | Level 11
Hi @jcFranklin - yes indeed, there appears to be a constraint issue in Postgres. The screenshots above are taken from SAS Environment Manager in Viya 3.5.

Are there any alternative mechanisms for removing compute contexts?
/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 Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1208 views
  • 0 likes
  • 2 in conversation