Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

User job

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


hoodlum7 at gmail

Aug 5, 2012, 11:19 AM

Post #1 of 12 (1720 views)
Permalink
User job

I have setup a user job to export using the script ipod_export.pl from the
mythtv wiki. On myth 0.25 fixes I always get a user job failed. This is the
exact same Job I had running on Mythtv 0.24 Fixes. Has anyone else seen
this issue? What changed or what do I need to change?


2012-08-05 11:15:29.479696 E [5136/5460] UserJob_2170 jobqueue.cpp:2439
(DoUserJobThread) - JobQueue: User Job
'/usr/local/bin/ipodexport.plexportdir=/var/lib/mythtv/export
starttime=20120804165500 chanid=1025
size=720x480 aspect=16:9 acodec=libaacplus' failed.
2012-08-05 11:15:29.479715 I [5136/5460] UserJob_2170 jobqueue.cpp:974
(ChangeJobStatus) - JobQueue: ChangeJobStatus(2170, Errored, 'ERROR: User
Job returned non-zero, check logs.')


Please attach all output as a file in bug reports.
MythTV Version : v0.25.2-15-g46cab93
MythTV Branch : fixes/0.25
Network Protocol : 72
Library API : 0.25.20120506-1
QT Version : 4.7.0
Options compiled in:
linux release use_hidesyms using_alsa using_oss using_backend
using_bindings_perl using_bindings_python using_bindings_php using_dvb
using_firewire using_frontend using_hdhomerun using_ceton using_hdpvr
using_iptv using_ivtv using_joystick_menu using_libcec using_libcrypto
using_libdns_sd using_libxml2 using_libudf using_lirc using_mheg
using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_v4l2
using_v4l1 using_x11 using_xrandr using_xv using_bindings_perl
using_bindings_python using_bindings_php using_mythtranscode using_opengl
using_vaapi using_vdpau using_ffmpeg_threads using_live using_mheg
using_libass using_libxml2 using_libudf


--
Working on World Domination since 2001


hoodlum7 at gmail

Aug 5, 2012, 11:41 AM

Post #2 of 12 (1698 views)
Permalink
Re: User job [In reply to]

On Sun, Aug 5, 2012 at 11:19 AM, Chris Porter <hoodlum7 [at] gmail> wrote:

> I have setup a user job to export using the script ipod_export.pl from
> the mythtv wiki. On myth 0.25 fixes I always get a user job failed. This is
> the exact same Job I had running on Mythtv 0.24 Fixes. Has anyone else seen
> this issue? What changed or what do I need to change?
>
>
> 2012-08-05 11:15:29.479696 E [5136/5460] UserJob_2170 jobqueue.cpp:2439
> (DoUserJobThread) - JobQueue: User Job '/usr/local/bin/ipodexport.plexportdir=/var/lib/mythtv/export starttime=20120804165500 chanid=1025
> size=720x480 aspect=16:9 acodec=libaacplus' failed.
> 2012-08-05 11:15:29.479715 I [5136/5460] UserJob_2170 jobqueue.cpp:974
> (ChangeJobStatus) - JobQueue: ChangeJobStatus(2170, Errored, 'ERROR: User
> Job returned non-zero, check logs.')
>
>
> Please attach all output as a file in bug reports.
> MythTV Version : v0.25.2-15-g46cab93
> MythTV Branch : fixes/0.25
> Network Protocol : 72
> Library API : 0.25.20120506-1
> QT Version : 4.7.0
> Options compiled in:
> linux release use_hidesyms using_alsa using_oss using_backend
> using_bindings_perl using_bindings_python using_bindings_php using_dvb
> using_firewire using_frontend using_hdhomerun using_ceton using_hdpvr
> using_iptv using_ivtv using_joystick_menu using_libcec using_libcrypto
> using_libdns_sd using_libxml2 using_libudf using_lirc using_mheg
> using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_v4l2
> using_v4l1 using_x11 using_xrandr using_xv using_bindings_perl
> using_bindings_python using_bindings_php using_mythtranscode using_opengl
> using_vaapi using_vdpau using_ffmpeg_threads using_live using_mheg
> using_libass using_libxml2 using_libudf
>
>
> --
> Working on World Domination since 2001


I forgot to add, If I run the same command mythtv does on the linux command
line it works just fine.

--
Working on World Domination since 2001


keemllib at gmail

Aug 5, 2012, 1:11 PM

Post #3 of 12 (1693 views)
Permalink
Re: User job [In reply to]

On 08/05/2012 01:41 PM, Chris Porter wrote:
> I forgot to add, If I run the same command mythtv does on the linux command
> line it works just fine.

Hi;

Also, if you type: echo $? after your command line test, you'll
see its exit code, although you'd expect any failure in the
script to print a message.

I'm not sure if: mythbackend --setverbose system will give you
more information that the log you pasted in your 1st post,
but it can't hurt (there's: --setloglevel debug too.)

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


raymond at wagnerrp

Aug 5, 2012, 1:28 PM

Post #4 of 12 (1686 views)
Permalink
Re: User job [In reply to]

On 8/5/2012 16:11, Bill Meek wrote:
> On 08/05/2012 01:41 PM, Chris Porter wrote:
>> I forgot to add, If I run the same command mythtv does on the linux
>> command
>> line it works just fine.
>
> Hi;
>
> Also, if you type: echo $? after your command line test, you'll
> see its exit code, although you'd expect any failure in the
> script to print a message.
>
> I'm not sure if: mythbackend --setverbose system will give you
> more information that the log you pasted in your 1st post,
> but it can't hurt (there's: --setloglevel debug too.)
>

The library for external system calls does not currently log output from
external scripts. The scripts themselves are expected to handle all
logging internally, and MythTV discards any stdout/stderr to /dev/null.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


hoodlum7 at gmail

Aug 5, 2012, 5:22 PM

Post #5 of 12 (1683 views)
Permalink
Re: User job [In reply to]

On Aug 5, 2012 1:28 PM, "Raymond Wagner" <raymond [at] wagnerrp> wrote:
>
> On 8/5/2012 16:11, Bill Meek wrote:
>>
>> On 08/05/2012 01:41 PM, Chris Porter wrote:
>>>
>>> I forgot to add, If I run the same command mythtv does on the linux
>>> command
>>> line it works just fine.
>>
>>
>> Hi;
>>
>> Also, if you type: echo $? after your command line test, you'll
>> see its exit code, although you'd expect any failure in the
>> script to print a message.
>>
>> I'm not sure if: mythbackend --setverbose system will give you
>> more information that the log you pasted in your 1st post,
>> but it can't hurt (there's: --setloglevel debug too.)
>>
>
> The library for external system calls does not currently log output from
external scripts. The scripts themselves are expected to handle all
logging internally, and MythTV discards any stdout/stderr to /dev/null.
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users

What has me banging my head against the wall is the script ruins outside
mythtv's job queue, but not if it is run by the job queue.


keemllib at gmail

Aug 5, 2012, 5:45 PM

Post #6 of 12 (1687 views)
Permalink
Re: User job [In reply to]

On 08/05/2012 07:22 PM, Chris Porter wrote:
...
> What has me banging my head against the wall is the script ruins outside
> mythtv's job queue, but not if it is run by the job queue.

OK, if the return code is 0 on when run from the command line, then
is there a difference between the user running the command? Probably
mythtv when the backend runs it and your own user name when run from
the command line.

diff ~mythtv/.mythtv/mysql.txt ~/.mythtv/mysql.txt

for example.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


mikep at randomtraveller

Aug 6, 2012, 4:05 AM

Post #7 of 12 (1673 views)
Permalink
Re: User job [In reply to]

On 06/08/12 01:45, Bill Meek wrote:
> On 08/05/2012 07:22 PM, Chris Porter wrote:
> ...
> > What has me banging my head against the wall is the script ruins outside
>> mythtv's job queue, but not if it is run by the job queue.
>
> OK, if the return code is 0 on when run from the command line, then
> is there a difference between the user running the command? Probably
> mythtv when the backend runs it and your own user name when run from
> the command line.
>
> diff ~mythtv/.mythtv/mysql.txt ~/.mythtv/mysql.txt
>
> for example.
>
Or environment variables. This has been pointed out as a possible reason for
some other discrepancies. How is $HOME set, for example, in each case? Other
variables which may differ according to how the script is run and from where?

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


hoodlum7 at gmail

Aug 6, 2012, 9:13 AM

Post #8 of 12 (1671 views)
Permalink
Re: User job [In reply to]

On Mon, Aug 6, 2012 at 4:05 AM, Mike Perkins
<mikep [at] randomtraveller>wrote:

> On 06/08/12 01:45, Bill Meek wrote:
>
>> On 08/05/2012 07:22 PM, Chris Porter wrote:
>> ...
>> > What has me banging my head against the wall is the script ruins
>> outside
>>
>>> mythtv's job queue, but not if it is run by the job queue.
>>>
>>
>> OK, if the return code is 0 on when run from the command line, then
>> is there a difference between the user running the command? Probably
>> mythtv when the backend runs it and your own user name when run from
>> the command line.
>>
>> diff ~mythtv/.mythtv/mysql.txt ~/.mythtv/mysql.txt
>>
>> for example.
>>
>> Or environment variables. This has been pointed out as a possible reason
> for some other discrepancies. How is $HOME set, for example, in each case?
> Other variables which may differ according to how the script is run and
> from where?
>
> --
>
> Mike Perkins
>
>
> ______________________________**_________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/**listinfo/mythtv-users<http://www.mythtv.org/mailman/listinfo/mythtv-users>
>

when I get home this evening from work I will check out the above suggests.

Just for further information the ipodexport.pl does not exit until the job
is complete. Matter of fact when run from the Mythtv job queue it never
actually starts the process of exporting. it immediately errors out.

--
Working on World Domination since 2001


dheianevans at gmail

Aug 6, 2012, 11:35 AM

Post #9 of 12 (1676 views)
Permalink
Re: User job [In reply to]

Sort of seeing the same thing here. Script works fine when run by
25-fixes, but still shows up as failed. I guess I need to ignore the
red in the job queue. :-)
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


hoodlum7 at gmail

Aug 11, 2012, 8:14 PM

Post #10 of 12 (1602 views)
Permalink
Re: User job [In reply to]

On Mon, Aug 6, 2012 at 11:35 AM, Ian Evans <dheianevans [at] gmail> wrote:

> Sort of seeing the same thing here. Script works fine when run by
> 25-fixes, but still shows up as failed. I guess I need to ignore the
> red in the job queue. :-)
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


Ok. I was finally able to get a little more info. I will continue digging,
but here is what I have. My user job 3 looks like this normally:

/usr/local/bin/ipodexport.pl exportdir=/var/lib/mythtv/export
starttime=%STARTTIME% chanid=%CHANID% size=720x480 aspect=16:9
acodec=libaacplus

right now I have it set to look like this:

/usr/local/bin/ipod.sh exportdir=/var/lib/mythtv/export
starttime=%STARTTIME% chanid=%CHANID% size=720x480 aspect=16:9
acodec=libaacplus

the ipod.sh script looks like this.
------------------------------------------------------------------------------------------------
#!/bin/bash

echo "Environment variables:" > /tmp/export.log
export >> /tmp/export.log
echo "Exit status before export command $?" >> /tmp/export.log
echo "/usr/local/bin/ipodexport.pl $*" >> /tmp/export.log
/usr/local/bin/ipodexport.pl $*

ret=$?

echo "exit status after attempted export $ret" >> /tmp/export.log

------------------------------------------------------------------------------------------------

The export log contains the following.
---------------------------------------------------------
Environment variables:
declare -x AVAHI_COMPAT_NOWARN="1"
declare -x BOOT_IMAGE="MythTV"
declare -x CONSOLE="/dev/console"
declare -x HOME="/etc/mythtv"
declare -x INIT_VERSION="sysvinit-2.86"
declare -x MYTHCONFDIR="/etc/mythtv"
declare -x OLDPWD
declare -x PATH="/bin:/usr/bin:/sbin:/usr/sbin"
declare -x PREVLEVEL="N"
declare -x PWD="/"
declare -x RUNLEVEL="4"
declare -x SHLVL="4"
declare -x TERM="linux"
declare -x prevlevel="N"
declare -x runlevel="4"
Exit status before export command 0
/usr/local/bin/ipodexport.pl exportdir=/var/lib/mythtv/export
starttime=20120811183000 chanid=13888 size=720x480 aspect=
16:9
exit status after attempted export 255

---------------------------------------------------------



Now if i take the command line
"/usr/local/bin/ipodexport.plexportdir=/var/lib/mythtv/export
starttime=20120811183000 chanid=13888
size=720x480 aspect=16:9 acodec=libaacplus" and run it manually it works
fine.


I realize exit status 255 is special, but the point is the same. My
original job 3 fails, but if I use the same options and run it from the
command line it works fine. I am not sure how to see what error code the
myth job queue is giving. It never appears in my logs.


--
Working on World Domination since 2001


michael at thewatsonfamily

Aug 11, 2012, 8:24 PM

Post #11 of 12 (1597 views)
Permalink
Re: User job [In reply to]

On 12/08/2012 1:14 PM, Chris Porter wrote:
> Exit status before export command 0
> /usr/local/bin/ipodexport.pl <http://ipodexport.pl>
> exportdir=/var/lib/mythtv/export starttime=20120811183000 chanid=13888
> size=720x480 aspect=
> 16:9
> exit status after attempted export 255
>
> ---------------------------------------------------------
>
> Now if i take the command line "/usr/local/bin/ipodexport.pl
> <http://ipodexport.pl> exportdir=/var/lib/mythtv/export
> starttime=20120811183000 chanid=13888 size=720x480 aspect=16:9
> acodec=libaacplus" and run it manually it works fine.

The command execute by your script is missing "acodec=libaacplus". Maybe
there is a size limit to the jobqueue command..

You could change the command in the wrapper script to something like
this: (so you can see whats going on withing ipodexport.pl)
/usr/local/bin/ipodexport.pl <http://ipodexport.pl> $* 1>
/tmp/ipodexport.log 2>&1

Or you could also change to the following:

*Myth Job Command*
/usr/local/bin/ipod.sh starttime=%STARTTIME% chanid=%CHANID%

*/usr/local/bin/ipod.sh*
#!/bin/bash

echo "Environment variables:" > /tmp/export.log
export >> /tmp/export.log
echo "Exit status before export command $?" >> /tmp/export.log
echo "/usr/local/bin/ipodexport.pl <http://ipodexport.pl> $*" >>
/tmp/export.log
/usr/local/bin/ipodexport.pl <http://ipodexport.pl>
exportdir=/var/lib/mythtv/export $* size=720x480 aspect=16:9

ret=$?


_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


michael at thewatsonfamily

Aug 11, 2012, 8:34 PM

Post #12 of 12 (1589 views)
Permalink
Re: User job [In reply to]

Fixed formatting, Thunderbird embedded http links on the perl commands.

On 12/08/2012 1:24 PM, Michael Watson wrote:
> On 12/08/2012 1:14 PM, Chris Porter wrote:
>> Exit status before export command 0
>> /usr/local/bin/ipodexport.pl <http://ipodexport.pl>
>> exportdir=/var/lib/mythtv/export starttime=20120811183000
>> chanid=13888 size=720x480 aspect=
>> 16:9
>> exit status after attempted export 255
>>
>> ---------------------------------------------------------
>>
>> Now if i take the command line "/usr/local/bin/ipodexport.pl
>> <http://ipodexport.pl> exportdir=/var/lib/mythtv/export
>> starttime=20120811183000 chanid=13888 size=720x480 aspect=16:9
>> acodec=libaacplus" and run it manually it works fine.
>
> The command execute by your script is missing "acodec=libaacplus".
> Maybe there is a size limit to the jobqueue command..
>
> You could change the command in the wrapper script to something like
> this: (so you can see whats going on withing ipodexport.pl)
> /usr/local/bin/ipodexport.pl <http://ipodexport.pl> $* 1>
> /tmp/ipodexport.log 2>&1
>
> Or you could also change to the following:
>
> *Myth Job Command*
> /usr/local/bin/ipod.sh starttime=%STARTTIME% chanid=%CHANID%
>
> */usr/local/bin/ipod.sh*
> #!/bin/bash
>
> echo "Environment variables:" > /tmp/export.log
> export >> /tmp/export.log
> echo "Exit status before export command $?" >> /tmp/export.log
> echo "/usr/local/bin/ipodexport.pl $*" >> /tmp/export.log
> /usr/local/bin/ipodexport.pl exportdir=/var/lib/mythtv/export $*
> size=720x480 aspect=16:9
>
> ret=$?
>

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.