[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AWIPS #FMZ-840607]: EDEX - notify qpid error



Hi there,

> I augmented my python script I had written to automatically download and feed 
> data from the ECMWF into EDEX 
> by calling the script you suggested. This method works when I manually 
> execute qpidNotify.py in my terminal 
> AND when I manually execute the python script that I wrote that calls 
> qpidNotify.py. However, it does NOT
> work if my cron job executes the scripts automatically. I know cron is 
> executing the script like it should 
> because it properly downloads the ECMWF files like I wrote it to do, but 
> those files never get put into EDEX.
> The last line of my script is where I call qpidNotify.py and seems to be 
> "failing" there. Again, when I run
> this same script in my terminal, it executes fine, and the data is available 
> in CAVE with its proper model
> name. I should add that this script worked just fine in v18 for about 1.5 
> years.

Are you getting any kind of error or exception print out when the cron fails?  
Are you piping the output of 
your cronjob into a log file?

One thing we have come across ourselves, is it appears that jobs run from cron 
don't necessarily have the 
same environment as the user awips (which is what you would be using when 
running the script manually from
the command line).
How we've solved this issue for ourselves, is to re-write the script in bash, 
which I think could be done 
fairly easy for your script as well, and then in cron you can call it with bash 
-l like this:

*/2 * * * * bash -l /awips2/ldm/dev/checkFileTime.sh >> 
/awips2/ldm/dev/logs/checkFileTime.log 2>&1

I know this is not the script you're referring to, but it's an example of how 
to call a bash script with the
awips user's environment (and then it's piping the output into a log for review 
as well).

Without knowing further what the error your seeing is, this is my best guess as 
to why it's failing.


--Shay Carter

She/Her/Hers
AWIPS Software Engineer
NSF Unidata

If you're interested, please feel free to fill out a survey about the support 
you receive: 
https://docs.google.com/forms/d/e/1FAIpQLSeDIkdk8qUMgq8ZdM4jhP-ubJPUOr-mJMQgxInwoAWoV5QcOw/viewform

Ticket Details
===================
Ticket ID: FMZ-840607
Department: Support AWIPS
Priority: Low
Status: Open
===================
NOTE: All email exchanges with NSF Unidata User Support are recorded in the 
Unidata inquiry tracking system and then made publicly available through the 
web.  If you do not want to have your interactions made available in this way, 
you must let us know in each email you send to us.