News:

  • September 24, 2026, 12:03:30 PM

Login with username, password and session length

Author Topic: DNS Lookup Failure after Temporary Router Failure  (Read 6845 times)

belias

  • Full Member
  • ***
  • Posts: 36
DNS Lookup Failure after Temporary Router Failure
« on: August 07, 2023, 09:06:10 PM »
I have a DoMore PLC running 2.9.7, and one of the functions it performs is an HTTP request with subsequent JSON parse to api.openweathermap.org.  It runs smoothly for months on end, however if the network goes down for a length of time (usually over an hour) it will sometimes stop running.  It's fixed by a reboot of the PLC* (after the network issue is resolved).

Today, this happened again and I did a bit of troubleshooting before rebooting the unit.  The HTTPCMD is setting the error bit with a response status code of 0 and empty strings for the response text / header / body.  Additionally, the PLC status will ocassionally flash yellow and it shows "DNS server was unable to find address...in HTTPCMD at Weather_JSON_SG at 29".

When I use Tools --> Lookup IP adress, it correctly resolves api.openweathermap.org and it's possible to browse to the adress on a computer and receive an appropriate JSON response.

Any suggestions on how I can troubleshoot this / what might be happening?


*  It actually requires a hard / physical power cycle to correct the problem.  Re-initializing the PLC I/O doesn't work, and even using the REBOOT command (set by a CNR bit) doesn't work - only a physical power cycle.


Thanks.
« Last Edit: August 07, 2023, 09:44:14 PM by belias »

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: DNS Lookup Failure after Temporary Router Failure
« Reply #1 on: August 08, 2023, 10:43:44 AM »
I have a DoMore PLC running 2.9.7, and one of the functions it performs is an HTTP request with subsequent JSON parse to api.openweathermap.org.  It runs smoothly for months on end, however if the network goes down for a length of time (usually over an hour) it will sometimes stop running.  It's fixed by a reboot of the PLC* (after the network issue is resolved).

Today, this happened again and I did a bit of troubleshooting before rebooting the unit.  The HTTPCMD is setting the error bit with a response status code of 0 and empty strings for the response text / header / body.  Additionally, the PLC status will ocassionally flash yellow and it shows "DNS server was unable to find address...in HTTPCMD at Weather_JSON_SG at 29".

When I use Tools --> Lookup IP adress, it correctly resolves api.openweathermap.org and it's possible to browse to the adress on a computer and receive an appropriate JSON response.

Any suggestions on how I can troubleshoot this / what might be happening?


*  It actually requires a hard / physical power cycle to correct the problem.  Re-initializing the PLC I/O doesn't work, and even using the REBOOT command (set by a CNR bit) doesn't work - only a physical power cycle.


Thanks.

About the only networking difference between a REBOOT and power cycle is that the Ethernet PHY gets reinitialized, although I think the PHY gets a reset pulled during the normal reboot, so I'm not sure how that would be any different. If it possible that something else in the system is also getting power cycled (like a switch) when the PLC is?
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO