Skip to main content

Running Cognite DB Extractor 3.0.0 as a Windows Service. Note that previous versions of this extractor have worked fine although some changes have been made to the config.yml since upgrading.

 

Symptoms - According to the log, Upon starting the service, It seems the extractor will run and successfully query and upload (30 rows in this case) and then the service will STOP running immediately as indicated in the Windows Services app.

There is an error in the log file about database/table already existing which does not make sense to me b/c usually errors will prevent the service from starting at all. 

 

https://www.yamllint.com/ indicates the config.yml is valid.

 

The only entry in Windows Application log is an “Informational” note that states:

The description for Event ID 4098 from source DBExtractor cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

DBExtractor

The message resource is present but the message was not found in the message table

 

Thanks for any help.

With Murad’s help the solution is to add a line for “mode” to be “continuous” in the config file as seen here.

 

extractor:
  state-store:
    raw:
      database: PlantPAx_FTAE
      table: AllEvent
      upload-interval: 3600
  mode: continuous 


implementing the schedule format above successfully started the service.

However the service still runs once and then the service stops. 

There is an error in the log file about database/table already existing, does this matter?

 

All feedback in attached zip

 

Thanks

 


The format changed a little bit on v3 of the extactor:

 

    # Required when running the extractor on continous mode     # There are two schedule types supported:     # - `cron`: Regular cron expression. Check cronguru](https://crontab.guru/) for further info     # - `interval`: Interval-based schedule. For example: `1h` will repeate the query hour or `5m` will repeate the query every 5 minutes.     # schedule:     #   type: interval     #   expression: 5m

 

 

You could try

schedule:

   type: cron

   expression: "0 * * * *"


Thanks Murad, I’m thinking this is a once per hour scheduled chron job. Perhaps I’m wrong.

schedule: "0 * * * *"

when trying this, the service will not start. 

 


In the attached config file you have commented out the schedule section

#schedule: "* * * * *"
 
Without a schedule the extractor will only run once and exit.

Reply