Connection refused

  • 1
  • Problem
  • Updated 6 years ago
Hi, I'm new at WUI, I registered an account and tried some basic querys, everything works fine.
I've developed a bash script (called from cron) that gets the XML and then some PHP to parse it. When I run the command by hand (the exact same one that the cron calls), it works, but then when I leave the cron running I get this message in the log:
Connecting to api.wunderground.com (api.wunderground.com)|38.102.136.138|:80... failed: Connection refused.
I checked my account and everything looks fine, no errors, and the total amount of requests I've done is much lower than the available.
Just in case, the bash script is:
wget -O "/opt/clima/clima.xml" "http://api.wunderground.com/api/<b>{my_key}</b>/conditions/lang:SP/q/Argentina/Buenos_Aires.xml"
Where {my_key} is the actual key provided by WUI.
Has anyone else experienced this before? I'd appreciate any help you can provide!
Thanks in advance,
Micaela.
Photo of eperfil

eperfil

  • 1 Post
  • 0 Reply Likes
  • frustrated

Posted 6 years ago

  • 1
Photo of afelicioni

afelicioni

  • 227 Posts
  • 43 Reply Likes
trying to guess a network or permission issue



  • does the scheduled job is done using the same user that successfully grabs the output to file in disk?

  • if you execute just this task via sudo or from a super user account crontab, does the issue still persists?

  • does the route allow to reach the remote host?

  • does any other connection method like telnet api.wunderground.com 80 still get unsuccessful?

  • have you tried to force a --no-proxy option into wget commmand?

  • if enabled, try to handle a different selinux security policy and see if it helps