Hi,
I am still having a hard time getting SEN4CAP to work as intended.
In the meantime I got to the point where I successfully ran the L4B processor. When trying to start the L4C processors as well for the season, the system kept falling into a continuous loop of the S4C Marker Database PR1, writing the entire HDD full of copies of the same database.
Now I would like to clean up again to start a new attempt. I would like to cleanly eliminate the entire site, but keep the pre-processed S1 & S2 data.
When I try to do it via the GUI, I only get the “ERROR” feedback (see screenshot).
Using sudo systemctl status -l sen2agri-services.service I get the following error message among others:
Mär 14 18:49:18 sen4rlp.codede.internal start.sh[13714]: 2022-Mar-14 18:49:18.465 ERROR [http-nio-8080-exec-1] o.e.s.s.AuthenticationFilter - Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: StatementCallback; SQL [delete from site_tiles where (site_id = 1); delete from config where (site_id = 1); delete from step where task_id in (select id from task where job_id in (select id from job where site_id = 1)); delete from step_resource_log where task_id in (select id from task where job_id in (select id from job where site_id = 1)); delete from task where job_id in (select id from job where site_id = 1); delete from config_job where job_id in (select id from job where site_id = 1); delete from job where (site_id = 1); delete from scheduled_task_status where task_id in (select id from scheduled_task where site_id = 1); delete from scheduled_task where (site_id = 1); delete from l1_tile_history where downloader_history_id in (select id from downloader_history where site_id = 1); delete from downloader_history where (site_id = 1); delete from downloader_count where (site_id = 1); delete from product where (site_id = 1); delete from season where (site_id = 1); delete from config where (site_id = 1); delete from site where (id = 1)]; ERROR: update or delete on table "product" violates foreign key constraint "fk_product" on table "product_stats"
Mär 14 18:49:18 sen4rlp.codede.internal start.sh[13714]: Detail: Key (id)=(438) is still referenced from table "product_stats".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "product" violates foreign key constraint "fk_product" on table "product_stats"
Mär 14 18:49:18 sen4rlp.codede.internal start.sh[13714]: Detail: Key (id)=(438) is still referenced from table "product_stats".
Seems like the database constraints prevent the deletion? Can I safely empty the product_stats table manually without breaking the system elsewhere? What exactly is the purpose of the table?
Can anyone here help me further on what the specific background of the error is and how best to work around it without crashing the whole system? I would be very pleased and will be happy to provide further information quickly if needed!
With best thanks and many greetings,
jab_lp