Sen2Cor not working in Sen4CAP 3.1

Hello Sen4CAP team,

Because of the issues with the new S2 format and Maja, I wanted to use ESA’s sen2cor instead. I am running latest image available on CreoDIAS (named 3.1). Based on instructions from the webinar I changed the L2A processor in configurations to Sen2Cor and changed local root path to /eodata/Sentinel-2/MSI/L2A/ in data sources.

Unfortunately, I was not able to get it working and all S2 products in downloader_history table have status processing failed. The first issue had this failed_reason

Invalid processing context sen2cor_gipp: /mnt/archive/gipp/sen2cor

I fixed it by creating the specified folder. However, the processing still fails, now with empty failed_reason. Next issue seems to be caused by paths/product names in downloader_history. Despite required changes to the settings, discovered products added to downloader_history have L1C in their names, and their full_path attributes point to non-existent locations such as


I tried manually replacing the L1C in the product names and paths in the database with L2A. This didn’t help either, the demmaccs understandably failed:

2022.05.11-12:46:08 - ERROR - Invalid L1C input file name S2B_MSIL2A_20211205T094259_N0301_R036_T34UCV_20211205T104046.SAFE.
2022.05.11-12:46:08 - ERROR - INVALID input.
2022.05.11-12:46:08 - ERROR - End Sen2Cor script with errors.

Is there some setting I forgot to change? I would expect that sen2cor processor doesn’t even need to run and preprocessed L2A products are used directly (from CreoDIAS).

Thanks a lot in advance for any advice.


P.S.: each time processing failed I deleted the entries from l1_tile_history and downloader_history (or modified them) and let the system try again. Is this ok?


In order to use directly the L2A in /eodata repository, you must use the local root /eodata/Sentinel-2/MSI/L2A/ in the Creodias datasource and additionally set the flag downloader.use.esa.l2a = true in the config table.
After that, remove the corresponding entries in the l1_tile_history and downloader_history and restart sen2agri-services. The L2As will be imported and can be used directly from the Creodias /eodata repository without any other pre-processing needed.

Best regards,

Thank you Cosmin, the downloader.use.esa.l2a flag fixed it. From the webinar instructions I thought you need to either set the flag or change local root, not both.