Solved

Cognite DB Extractor 3.0.0 Stops After Execution

  • 16 November 2023
  • 5 replies
  • 80 views

Userlevel 3
Badge

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.

icon

Best answer by Chris Selph 29 November 2023, 14:07

View original

5 replies

Userlevel 3
Badge

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 

Userlevel 2

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

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

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. 

 

Userlevel 2

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 * * * *"

Userlevel 3
Badge

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

 

Reply