Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hi Alll,
I'm using the 30 days thingworx composer and tried to ping my twx server from my API machine, and didnt work out.
Also, I tried to do an API call from twx server to my API and it seems that they dont see each other.
My doubt is: the twx server from trial version cant see distant IPs, right?
(Unless you have the license, I think...).
Any tips?
Thanks,
Saito.
Solved! Go to Solution.
Pings into trial servers are probably ignored, try using the wget command to your trial instance to test if you get a response.
The trial servers are not limited in their ability to reach any service available on the internet. Are you using a port or protocol other than 80/443 http/https?
Pings into trial servers are probably ignored, try using the wget command to your trial instance to test if you get a response.
The trial servers are not limited in their ability to reach any service available on the internet. Are you using a port or protocol other than 80/443 http/https?
Thanks for the wget hint.
They see each other!
But still, my twx server cant reach my API server trought LoadFunctionsContent...somehow.
I'm using the "conventional" one, port 80 and protocol http.
Can you give more details? What JS code are you using to reach your API server? How are you triggering that code? Can you reach your API server with a browser?
Hi,
I'm using a JS code like this in my service:
var token = "x";
var params = {
headers: {"Accept": "application/json","Authorization": "Bearer "+token } /* JSON */,
url: "https://192.168.229.139:8080/historian-rest-api/v1/datapoints/currentvalue/mymachine.Simulation00001" /* STRING */,
};
var result = Resources["ContentLoaderFunctions"].GetText(params);
and yeah, I can see my API server with a browser.
The network where your API server is being hosted (192.168.x.x) is reserved for private networks, requests to that IP address can not be routed over the internet from where your ThingWorx trial server is being hosted to your API server.
Here are some options:
1. Configure your firewall and private network to allow the ThingWorx trial server access to your API server.
2. Host your API somewhere that it can be reached by the ThingWorx trial server.
3. Download ThingWorx and host it on the same network as your API server.
Thanks!
I will try these options.
FYI - for security reasons the trial servers are only configured with HTTPS endpoints (so not possible to do an HTTP REST API call)
Yes, and REST API calls to the trial servers do work when you use HTTPS. The trial servers present a valid wildcard certificate for *.devportal.ptc.io