CNES / MAJA

Level-2A processor used for atmospheric correction and cloud-detection. The active repository is the one below, this one is kept to leave access to the older issues.
https://gitlab.orfeo-toolbox.org/maja/maja
Apache License 2.0
137 stars 25 forks source link

libMajaChain.so.3.2 #3

Closed smfcrts closed 5 years ago

smfcrts commented 5 years ago

I had problem while running MAJA 3.2.2, it gave the following error in the log file S2A_MSIL1C_20190211T111201_N0207_R137_T30STB_20190211T114747.SAFE.log

/opt/MAJA/bin/maja-processing-3.2.2: error while loading shared libraries: libMajaChain.so.3.2: cannot open shared object file: No such file or directory We tried to resolve the problem by setting the environment variable LD_LIBRARY_PATH to /opt/MAJA/lib where the library libMajaChain.so.3.2 is stored.

olivierhagolle commented 5 years ago

Hi, sorry for the issue. Did "setting the environment variable LD_LIBRARY_PATH to /opt/MAJA/lib where the library libMajaChain.so.3.2 is stored" worked ? If not, please send the log, and describe the Linux flavour and version you are using. Best regards Olivier

smfcrts commented 5 years ago

When we set the environment variable, it show the path to the concerned library. The output of the execution of "python start_maja.py -f folders.txt -c GIPP_MAJA_3.1.2_TM_CAMS -t 30STB -s morocco_centre -d 20190211 -e 20190222 -i** "is as follow: 2019-03-11 14:32:34,574 - Start-Maja - INFO - processing /mnt/archive/dwn_def/s2/default/morocco_centre/S2A_MSIL1C_20190218T110111_N0207_R094_T30STB_20190218T130332.SAFE in Init Mode 2019-03-11 14:32:34,574 - Start-Maja - INFO - Init mode goes with suboptimal performances 2019-03-11 14:32:34,575 - Start-Maja - INFO - MAJA logfile: /home/smiej/MAJA/L2Aproduct/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS//S2A_MSIL1C_20190218T110111_N0207_R094_T30STB_20190218T130332.SAFE.log 2019-03-11 14:32:34,575 - Start-Maja - INFO - ################################# 2019-03-11 14:32:34,590 - Start-Maja - INFO - => processing date 20190221 2019-03-11 14:32:34,593 - Start-Maja - INFO - Processing in init mode 2019-03-11 14:32:34,598 - Start-Maja - INFO - Linking /home/smiej/MAJA/CAMS/S2TEST_EXO_CAMS_20190221T030000_20190308T143018.DBL.DIR in /home/smiej/MAJA/work/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS//in//S2TEST_EXO_CAMS_20190221T030000_20190308T143018.DBL.DIR 2019-03-11 14:32:34,598 - Start-Maja - INFO - Linking /home/smiej/MAJA/CAMS/S2TEST_EXO_CAMS_20190221T150000_20190308T165712.DBL.DIR in /home/smiej/MAJA/work/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS//in//S2TEST_EXO_CAMS_20190221T150000_20190308T165712.DBL.DIR 2019-03-11 14:32:34,598 - Start-Maja - INFO - Linking /home/smiej/MAJA/CAMS/S2TEST_EXO_CAMS_20190222T030000_20190308T171557.DBL.DIR in /home/smiej/MAJA/work/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS//in//S2TEST_EXO_CAMS_20190222T030000_20190308T171557.DBL.DIR 2019-03-11 14:32:34,599 - Start-Maja - INFO - Linking /home/smiej/MAJA/CAMS/S2TEST_EXO_CAMS_20190222T150000_20190308T171938.DBL.DIR in /home/smiej/MAJA/work/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS//in//S2TEST_EXO_CAMS_20190222T150000_20190308T171938.DBL.DIR 2019-03-11 14:32:34,599 - Start-Maja - INFO - Linking /home/smiej/MAJA/CAMS/S2TEST_EXO_CAMS_20190221T030000_20190308T143018.HDR in /home/smiej/MAJA/work/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS//in//S2TEST_EXO_CAMS_20190221T030000_20190308T143018.HDR 2019-03-11 14:32:34,599 - Start-Maja - INFO - Linking /home/smiej/MAJA/CAMS/S2TEST_EXO_CAMS_20190221T150000_20190308T165712.HDR in /home/smiej/MAJA/work/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS//in//S2TEST_EXO_CAMS_20190221T150000_20190308T165712.HDR 2019-03-11 14:32:34,599 - Start-Maja - INFO - Linking /home/smiej/MAJA/CAMS/S2TEST_EXO_CAMS_20190222T030000_20190308T171557.HDR in /home/smiej/MAJA/work/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS//in//S2TEST_EXO_CAMS_20190222T030000_20190308T171557.HDR 2019-03-11 14:32:34,599 - Start-Maja - INFO - Linking /home/smiej/MAJA/CAMS/S2TEST_EXO_CAMS_20190222T150000_20190308T171938.HDR in /home/smiej/MAJA/work/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS//in//S2TEST_EXO_CAMS_20190222T150000_20190308T171938.HDR 2019-03-11 14:32:34,599 - Start-Maja - INFO - ################################# 2019-03-11 14:32:34,599 - Start-Maja - INFO - ################################# 2019-03-11 14:32:34,599 - Start-Maja - INFO - processing /mnt/archive/dwn_def/s2/default/morocco_centre/S2A_MSIL1C_20190221T111101_N0207_R137_T30STB_20190221T113849.SAFE in Init Mode 2019-03-11 14:32:34,599 - Start-Maja - INFO - Init mode goes with suboptimal performances 2019-03-11 14:32:34,599 - Start-Maja - INFO - MAJA logfile: /home/smiej/MAJA/L2Aproduct/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS//S2A_MSIL1C_20190221T111101_N0207R137 The log file still contain the same error, only one line: /opt/MAJA/bin/maja-processing-3.2.2: error while loading shared libraries: libMajaChain.so.3.2: cannot open shared object file: No such file or directory Concerning Linux information : NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

Virtual machine with CPU - 12 Core and 16GB RAM

olivierhagolle commented 5 years ago

Thanks, so the installation of MAJA is still unsuccessful in your case. We did not test MAJA on a virtual machine.

I passed the info to the colleague in charge, @petket-5 , who should get in touch. Olivier

smfcrts commented 5 years ago

we resolved the problem of libMajaChain.so.3.2 by creating a file in etc/ld.so-conf.d, that contain the path to the library (/opt/MAJA/lib), but we still have another problem reported on the following log file : 2019-03-11T15:09:26.633704 localhost.localdomain maja-processing-3.2.2 3.2 [000000022421] [I] MAJA Software Version : 3.2.2 2019-03-11T15:09:26.634598 localhost.localdomain maja-processing-3.2.2 3.2 [000000022421] [E] vns::Data::ERROR: : Error while copying the filename <OUT_DIR/share/config/Templates/PMC_LxREPT.EEF> to </home/smiej/MAJA/L2Aproduct/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS//PMC_LxREPT.EEF> ! [vnsSystem.cxx:CopyFile:406] 2019-03-11T15:09:26.634923 localhost.localdomain maja-processing-3.2.2 3.2 [000000022421] [E] ** [vnsMajaMainProcessor.cxx:main:73] 2019-03-11T15:09:26.634974 localhost.localdomain maja-processing-3.2.2 3.2 [000000022421] [E] Application handler initialization: vns::Data::ERROR: : Error while copying the filename <OUT_DIR/share/config/Templates/PMC_LxREPT.EEF> to </home/smiej/MAJA/L2Aproduct/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS//PMC_LxREPT.EEF> ! [vnsSystem.cxx:406] [MAJA Data Exception] [vnsMajaMainProcessor.cxx:main:73] 2019-03-11T15:09:26.634999 localhost.localdomain maja-processing-3.2.2 3.2 [000000022421] [E] [vnsMajaMainProcessor.cxx:main:73] 2019-03-11T15:09:26.635012 localhost.localdomain maja-processing-3.2.2 3.2 [000000022421] [E] ** [vnsMajaMainProcessor.cxx:main:73]

petket-5 commented 5 years ago

Hi,

Good news that you resolved the first error. What is OUT_DIR in the log you provided? What are the contents of your folders.txt?

Kind regards, Peter

smfcrts commented 5 years ago

The contents of folders.txt is as follow: repCode=/home/sm/Start-MAJA-master repWork=/home/sm/MAJA/work repL1 =/mnt/archive/dwn_def/s2/default repL2 =/home/sm/MAJA/L2Aproduct repMaja=/opt/MAJA/bin/maja repCAMS=/home/sm/MAJA/CAMS

smfcrts commented 5 years ago

Sorry i didn't mention that the OUT_DIR is not provided in the log file

petket-5 commented 5 years ago

Hi,

I was able to reproduce the error on a CentOS VM. It seems that you didn't chmod the folder correctly: You probably installed maja as root (cause /opt/ is not in the default user-accessible space), but then forgot to give access rights to all users: To solve it, please execute sudo chmod -R 777 /opt/MAJA/ and then try to run maja again.

Kind regards, Peter

smfcrts commented 5 years ago

Thank you for your response. I executed the command to give right access to all users, and i ran start_maja as root, but i still have the same error on the log file.

smfcrts commented 5 years ago

Hi, We finally overcome the error, we shouldn't install maja on opt folder. So i still have an error, provided on the log: S2A_MSIL1C_20190211T111201_N0207_R137_T30STB_20190211T114747.SAFE.log

olivierhagolle commented 5 years ago

Hi, thanks for the news and feedback.

Several preliminary remarks : 1- we found a bug in MAJA 3.2 with CAMS option activated. As a result (as mentioned recently in the readme file) we do not recommend to activate the CAMS option with the current version, even if the bug only has consequences in some particular cases.

2 - tile 30STB in Morocco is already processed by Theia (without the CAMS option which was maybe the reason why you wanted to use MAJA). Data avalable from https://theia.cnes.fr

Now back to your issue. MAJA fails with the following command : tar -xf /home/smiej/MAJA_folder/work/morocco_centre/30STB/GIPP_MAJA_3.1.2_TM_CAMS/in/S2A_TEST_GIP_L2TOCR_L_BLACKCAR_50001_00000000_99999999.DBL

Could you please check the presence of S2A_TEST_GIP_L2TOCR_L_BLACKCAR_50001_00000000_99999999.DBLfile in the GIPP folder you provided as input ?

best regards Olivier

smfcrts commented 5 years ago

yes you're right, i checked the file in the considered folder, it doesn't exist, so i downloaded the necessary file, and I ran maja again. I'll let you know about the news.

smfcrts commented 5 years ago

The L2AVALD are generated, but i still have one problem, as mentioned S2A_MSIL1C_20190221T111101_N0207_R137_T30STB_20190221T113849.SAFE.log on the log file

olivierhagolle commented 5 years ago

Oups, I know how to correct this one. Could you download again the GIPP repository from http://tully.ups-tlse.fr/olivier/gipp_maja/tree/master/GIPP_MAJA_3.1.2_TM_CAMS (I guess it is the one you used).

Sorry for the difficulties, three of you are trying this version of Start-Maja and MAJA 3.2.2, in parallel, and you seem to be the first ones (or the first to have issues)

Have a nice week-end Olivier

smfcrts commented 5 years ago

Hi, I downloaded the updated GIPP, and it finally works fine for the tile 30STB. the L2VALD and QCK are generated. However when i tried with another tile 29 SNR, it gives the following error : File "start_maja.py", line 621, in start_maja(folder_file, context, site, tile, orbit, nb_backward, options, debug_mode) File "start_maja.py", line 424, in start_maja add_parameter_files(repGipp, repWork + "/in/", tile, repCams) File "start_maja.py", line 160, in add_parameter_files os.symlink(fic, repWorkIn + '/' + base) OSError: [Errno 2] No such file or directory

olivierhagolle commented 5 years ago

All right, so this issue was solved, and process worked for one tile, but you get another issue. which is the same as https://github.com/CNES/Start-MAJA/issues/2

This issue has not been fully solved, but I have updated start_maja to catch this exception. Could you please update and tell me if it works better ?

Thanks, Olivier

smfcrts commented 5 years ago

Thank you for your response, i suppose that the error mentionned in the other issue is different from what i am getting. In my case it can't create in directory .

olivierhagolle commented 5 years ago

OK, you are right, i did not pay enough attention.

Could you still update so that I have the line numbers right, and also could you run the same command with -v option (verbose mode), and send me the 20 last lines before it fails ?

smfcrts commented 5 years ago

hi, I was able to overcome the problem, maja works even with another tile, i tested both 30STB and 29SNR. I have one more question, does maja work on landsat8 products.

olivierhagolle commented 5 years ago

Hi Good news ! Could you share the resolution, for other users facing the same issue one day ? Could you open another issue with your new question, for the same reason ? I will answer, I swear ;) Olivier

smfcrts commented 5 years ago

i updated start_maja as you suggested, and it works for the other tile. ok I will open a new issue right away