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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Error Connecting Thingworx to MySQL Server

csadouq
6-Contributor

Error Connecting Thingworx to MySQL Server

Hello,
I am trying to connect Thingworx to MySQL Database to store and read data but it doesn't seem to connect to it. I am constantly getting the error message "Unable to Invoke Service <Service> on <ThingName> : null" when running a simple service to query available data on the database. The isConnected property on my thing is always False, i used MySQLThingTemplate for the Thing.

I created a new user and have granted it all the permissions on the database server and i can access it from another device.

here is a screenshot of the setup.
I would really appreciate some help on this topic.

Thanks.

ACCEPTED SOLUTION

Accepted Solutions
supandey
19-Tanzanite
(To:csadouq)

@csadouq i could reproduce this and just replied to an another user with the steps with which i managed to get it working, you might want to review this thread for my latest response : https://community.ptc.com/t5/ThingWorx-Developers/Unable-to-Invoke-Service-on-MySqlThing-null-using-MySQL/m-p/548602#M28322 

View solution in original post

6 REPLIES 6
supandey
19-Tanzanite
(To:csadouq)

Hi @csadouq do I understand it right that you have this issue even with the Administrator user for Thingworx? Have you checked if the MySQL server is reachable from the machine where you ThingWorx is installed, or are they both on same machine?

csadouq
6-Contributor
(To:supandey)

They are both on the same machine, and i am using the local network address to avoid problems, i tried accessing to it from another machine and it worked but it doesn't seem to work from Thingworx

supandey
19-Tanzanite
(To:csadouq)

Thanks for adding more info, could you please also let me know what template your Thing is based of? Would it be possible to share screenshot?

supandey
19-Tanzanite
(To:csadouq)

@csadouq i could reproduce this and just replied to an another user with the steps with which i managed to get it working, you might want to review this thread for my latest response : https://community.ptc.com/t5/ThingWorx-Developers/Unable-to-Invoke-Service-on-MySqlThing-null-using-MySQL/m-p/548602#M28322 

Hi @supandey

I seem to be having the same issue. The database I want to connect to is on a separate machine to the one where I have Thingworx installed - however, I am able to successfully communicate with this database from my machine but just not via Thingworx.

 

The ThingTemplate I am using is the MySqlServer and I have the configuration setup with the correct username and password.

 

I have seen your reply on the separate post but I can't see that being my issue as I know that this database already allows remote access (I can access from my machine using MySQL Workbench and have a PHP file that has successfully interacted with the database).

 

If you have any ideas, please let me know. Thanks.

supandey
19-Tanzanite
(To:csummers1)

Hi @csummers1 interesting. I'm not sure what could be going on, have you had a look at the logs? You could consider opening a new thread and may be also attach ThingWorx logs (available under /ThingworxStorage/logs) ?

 

So i am assuming isConnected is false for your database Thing, right? Do you get any specific error message while attempting to check for the Tables list from that Thing?

Announcements


Top Tags