cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

How to check whether persistence provider is connected to ThingWorx

VVarshney
4-Participant

How to check whether persistence provider is connected to ThingWorx

My use case is to display how many persistence providers are connected to ThingWorx.

In my Application, using PostgreSQL and Influx DB persistent providers. 

I tried using IsConnected and GetConnectivity services of persistent providers however it is returning true only.

 

It would be really helpful if anyone suggest some other option to check persistent provider connectivity.

ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:VVarshney)

In your case, there is unfortunately no real solution, influx must be started before ThingWorx.

View solution in original post

6 REPLIES 6
PaiChung
22-Sapphire I
(To:VVarshney)

You could create a DataTable or Stream supported by that persistence provider and do a data retrieval?

VVarshney
4-Participant
(To:PaiChung)

Yes, these persistence providers are being used for streams and value streams. 

 

However sometimes Influxdb started after the Thingworx instance, and due to this services started giving the below error:

[1,018] Data store unknown error: [Error occurred while accessing the data provider.]

 

Hence it came as a requirement to determine which persistent providers are connected with the ThingWorx and Persistent provider services "IsConnected" & "TestConnectivity" is always returning true.

It would be helpful if you suggest some ways to determine this connectivity.

Just to clarify a few points...

1) If you start Influx before starting ThingWorx, everything works as expected?

2) At what point are you getting the "[1,018] Data store unknown error: [Error occurred while accessing the data provider.]"?

Is it when running some service dependent on this provider or just in ThingWorx startup logs?

3) If you start Influx after ThingWorx has started, things don't work as expecting (i.e. data can't be saved / read to / from Influx), despite "IsConnected" & "TestConnectivity" returning "True"?

4) Does triggeginr "ConnectDataSource" / "DisconnectDataSource" services resolve the issue, or Influx provider stays "broken" until ThingWorx restart?

5) Is the issue only Influx-related or Postgres is also affected?

1) If you start Influx before starting ThingWorx, everything works as expected?     

Ans: Yes, everything works 

2) At what point are you getting the "[1,018] Data store unknown error: [Error occurred while accessing the data provider.]"?    

Is it when running some service dependent on this provider or just in ThingWorx startup logs?

Ans: Whenever ThingWorx gets started before the Influx DB and some service execution happened which is dependent on Influx DB persistent providers.

3) If you start Influx after ThingWorx has started, things don't work as expecting (i.e. data can't be saved / read to / from Influx), despite "IsConnected" & "TestConnectivity" returning "True"?

Ans: Yes

4) Does triggeginr "ConnectDataSource" / "DisconnectDataSource" services resolve the issue, or Influx provider stays "broken" until ThingWorx restart?

Ans: Yes, If I execute the "ConnectDataSource" service, error get resolved, or if I restart my Server in which InfluxDB started before the Thingworx.

5) Is the issue only Influx-related or Postgres is also affected?

Ans: Yes, the issue is only related to InfluxDB.

PaiChung
22-Sapphire I
(To:VVarshney)

In your case, there is unfortunately no real solution, influx must be started before ThingWorx.

VVarshney
4-Participant
(To:PaiChung)

Ok. so there is no way to check the connection of the Influx BB persistence provider.

Announcements


Top Tags