Already answered on other threads but just to have the answer also on this one
Although the account is OK and you can download from the website, for using the download API you need to have activated at USGS the right for downloading the products. To do this, you need to perform a request to USGS in order to activate the downloads for your account:
“Scenes required” – In your case you can fill 2 monthly or 24 yearly (depends on your site dimension). You can also put more if you consider you will have additional sites to monitor
o
“Scripting Capabilities”: python, java
o
For the other fields, you will have to fill the requested information
After that, you should receive after several hours an email from USGS confirming the activation. Once this is done, the L8 should start also being downloaded.
I have followed your steps to request a Machine to Machine access from USGS and they have accepted it yesterday but even with that it seems to not work and download of L1 doesn’t start.
Also for Sentinel2 it seems that the download is blocked also (no more logs after the last line, and no current download in interface) :
oct. 10 12:01:04 Sen2Agri-VM start.sh[92275]: 2019-Oct-10 12:01:04.394 INFO [DefaultQuartzScheduler_Worker-1] o.e.s.scheduling.RetryJob - Job 'Retry.france2-Sentinel2' started
oct. 10 12:01:04 Sen2Agri-VM start.sh[92275]: 2019-Oct-10 12:01:04.409 INFO [DefaultQuartzScheduler_Worker-2] o.e.s.scheduling.LookupJob - Job 'Lookup.france2-Sentinel2' started
oct. 10 12:01:04 Sen2Agri-VM start.sh[92275]: 2019-Oct-10 12:01:04.422 INFO [Amazon Web Services-S2-1] o.e.s.scheduling.RetryJob - [site 'france2',sensor 'Sentinel2'] No products to retry
oct. 10 12:01:04 Sen2Agri-VM start.sh[92275]: 2019-Oct-10 12:01:04.427 INFO [Amazon Web Services-S2-1] o.e.s.scheduling.RetryJob - [site 'france2',sensor 'Sentinel2'] No products to retry
oct. 10 12:01:04 Sen2Agri-VM start.sh[92275]: 2019-Oct-10 12:01:04.437 WARN [DefaultQuartzScheduler_Worker-2] o.s.o.j.v.HibernateJpaDialect - JDBC Connection to reset not identical to originally prepared Connection - please make sure to use connection release mode ON_CLOSE (the default) and to run against Hibernate 4.2+ (or switch HibernateJpaDialect's prepareConnection flag to false
oct. 10 12:01:04 Sen2Agri-VM start.sh[92275]: 2019-Oct-10 12:01:04.522 INFO [Scientific Data Hub-S2-1] - Loading Sentinel-2 tiles extents
Hello,
It seems that the USGS changed (again) the API for accessing the products (you might have received a mail about that 2 weeks ago).
We will come with an update soon to adapt to the new changes.
For the S2 part, I see that you have configured the AWS as datasource for downloading the products. Unless you are not running on an AWS machine, you should disable the datasources for AWS and keep only SciHub as Enabled. Also, ensure that the Scihub Datasource is configured to have:
Scope as Query and Download
Fetch Mode - Overwrite
Also, a restart of the services using sudo systemctl restart sen2agri-services will not harm
Thank you for you response and your efforts @cudroiu
Could you give us the script that is responsable of downloading landsat images from usgs api, because we want to use the platform for a national case, and we need landsat images for processing, as soon as possible.
For L8 and even an issue for S2 you can find a solution here : Paging in sentinel product downloads is not correct.
Nevertheless, please note that this is a temporary version of the services that was not fully tested.
@cudroiu i tested the updated version of sen2agri-service, and when i run status of sen2agri-services, it gives:
Caused by: ro.cs.tao.datasource.QueryException: java.lang.NullPointerException
nov. 14 15:02:28 localhost.localdomain start.sh[20883]: at ro.cs.tao.datasource.usgs.Landsat8Query.setupRemoteFields(Landsat8Query.java:196)
nov. 14 15:02:28 localhost.localdomain start.sh[20883]: at ro.cs.tao.datasource.usgs.Landsat8Query.authenticate(Landsat8Query.java:162)
nov. 14 15:02:28 localhost.localdomain start.sh[20883]: … 12 more
nov. 14 15:02:28 localhost.localdomain start.sh[20883]: Caused by: java.lang.NullPointerException
nov. 14 15:02:28 localhost.localdomain start.sh[20883]: at ro.cs.tao.datasource.remote.result.json.JsonResponseParser.parse(JsonResponseParser.java:85)
nov. 14 15:02:28 localhost.localdomain start.sh[20883]: at ro.cs.tao.datasource.usgs.Landsat8Query.setupRemoteFields(Landsat8Query.java:184)
nov. 14 15:02:28 localhost.localdomain start.sh[20883]: … 13 more
nov. 14 15:02:28 localhost.localdomain start.sh[20883]: 2019-Nov-14 15:02:28.966 INFO [DefaultQuartzScheduler_Worker-5] o.e.s.scheduling.LookupJob - Job ‘Lookup.morocco-Landsat8’ completed
nov. 14 15:12:19 localhost.localdomain start.sh[20883]: 2019-Nov-14 15:12:19.351 INFO [pool-4-thread-1] o.e.s.services.ScheduleManager - Running scheduled jobs: 0
Please let me know what mean’s these line.
when i updated the system , the sen2agri-services are inactive.
sen2agri-services.service - Services for Sen2Agri
Loaded: loaded (/usr/lib/systemd/system/sen2agri-services.service; enabled; vendor preset: disabled)
Active: inactive (dead) since lun. 2019-12-02 12:34:01 WET; 1min 5s ago
Process: 6349 ExecStart=/usr/share/sen2agri/sen2agri-services/bin/start.sh (code=exited, status=0/SUCCESS)
Main PID: 6349 (code=exited, status=0/SUCCESS)
déc. 02 12:34:01 localhost.localdomain start.sh[6349]: 2019-Dec-02 12:34:01.384 INFO [main ] o.s.b.a.l.ConditionEvaluationReportLoggingListener -
déc. 02 12:34:01 localhost.localdomain start.sh[6349]: Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
déc. 02 12:34:01 localhost.localdomain start.sh[6349]: 2019-Dec-02 12:34:01.385 ERROR [main ] o.s.b.d.LoggingFailureAnalysisReporter -
déc. 02 12:34:01 localhost.localdomain start.sh[6349]: ***************************
déc. 02 12:34:01 localhost.localdomain start.sh[6349]: APPLICATION FAILED TO START
déc. 02 12:34:01 localhost.localdomain start.sh[6349]: ***************************
déc. 02 12:34:01 localhost.localdomain start.sh[6349]: Description:
déc. 02 12:34:01 localhost.localdomain start.sh[6349]: The bean ‘org.springframework.transaction.config.internalTransactionalEventListenerFactory’, defined in null, could not be registered. A bean with that name has already been defined in class path resource [org/springframework/transaction/annotation/ProxyTransactionManagementConfiguration.class] and overriding is disabled.
déc. 02 12:34:01 localhost.localdomain start.sh[6349]: Action:
déc. 02 12:34:01 localhost.localdomain start.sh[6349]: Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
Did you renamed/deleted the /usr/share/sen2agri/sen2agri-services/lib and /usr/share/sen2agri/sen2agri-services/modules directories before copying the new lib and modules in /usr/share/sen2agri/sen2agri-services ?
Could you please copy also the application.properties into /usr/share/sen2agri/sen2agri-services/config?
Optionally, you can change the INFO values into TRACE for the following 2 keys:
Seems that sen2agri-services archive/patch helped to fix the issue of downloading both Landsat and Sentinel. Unfortunately, link to download the archive is already expired. Could you share the link?
it’s working after I upgraded to latest version(2.0.2). it’s able to download Landsat data but then my custom job is not running. Wonder if there’s known issue. Thanks