From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW: (Hex 0x38) The network operation exceeded the user-specified or system time limit.

i'am trying to send a Post request to ibm watson platform but i got faced this error ?? an i dont know hwo to fix it and manage to send data over post request to ibm server

url : https://{orgID}.internetofthings.ibmcloud.com:8883/api/v0002/device/types/{device_type}/devices/{dev...

 

json: {"name": "Upendra", "job": "Programmer"}

 

Can anyone please mention how can i fix this bug ?

Thanks in advance.

 

 

Sans titre.png

0 Kudos
Message 1 of 13
(4,375 Views)

The HTTP VI can’t connect to the server. Did you use that url literally? The {orgID} and {dev…} almost certainly need to be replaced by numeric IDs that you need to register for.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 13
(4,314 Views)

yes i do replaced them by numeric IDs and i still can't figure out what should i do to fixe the error?

0 Kudos
Message 3 of 13
(4,296 Views)

yes i do replaced them by numeric IDs and i still can't figure out what should i do to fixe the error?

0 Kudos
Message 4 of 13
(4,296 Views)

yes i do replaced them by numeric IDs and i still can't figure out what should i do to fixe the error?

0 Kudos
Message 5 of 13
(4,295 Views)

No need to post three times!

 

 

We don't know either! Something prevents the HTTP library to connect to the server, or the answer from the server never makes it to your computer or the server refuses to send an answer. No idea to know which of this is it.

 

As a cloud service it may also not feel like giving any feedback if something about the authentication is not right, to not give hackers needless clues as to what they might be doing wrong to gain unauthorized access.

 

Have you tried with other tools? Enter the request url in a browser for instance? Using the curl command line tool to connect to the url? etc. etc.

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 13
(4,272 Views)

i have posted three, because it was a connexion problem... Sorry about that.

yes you have reason about the hacker stuff.

well, i have tries too many things and i ended up with new issue1111.png222222.png

any guide line will be appreciated.

and Thank you.

0 Kudos
Message 7 of 13
(4,264 Views)

The HTTP response seems to be pretty clear. The server does not think you are allowed to make the connection. What is probably the reason is that your username and password that you pass to the session HTTP Open Handle VI are not handled by the HTTP library the way the server expects. It will add them as some header fields to the HTTP request, but your server may require a different method. Either with different header field names or instead as HTTP post with the user name and password passed in the HTTP body formatted in some specific way (JSON, XML, IBM Proprietary format, whatever).

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 13
(4,257 Views)

yes you were right. the problem was in username and password and i have got HTTP/1.1 200 OK  in header 

23333.png

BUT, i can't figure out body still empty even though i do pass a message. any one can offer a solution  me 

any guide lines ?

0 Kudos
Message 9 of 13
(4,232 Views)

i figure out that content-type does not have changed in header even though i have changed it to JSON in my code.

any explanation ?

0 Kudos
Message 10 of 13
(4,209 Views)