LinHES Forums
http://forums.linhes.org/

User Job Fails
http://forums.linhes.org/viewtopic.php?f=21&t=20806
Page 1 of 1

Author:  Too Many Secrets [ Thu Jan 28, 2010 6:58 pm ]
Post subject:  User Job Fails

I added a User Job for myth2mp3, to rip audio. It wouldn't run when I used the full path (ie, /usr/LH/bin/myth2mp3). When I add myth2mp3 only, it errors with the below in the backendlog. The program runs fine when I run it from commandline with the below details WITH THE ADDITION of the forward slash before 'usr/LH/bin/myth2mp3'. I think the PATH is missing a / ... but where is the PATH file to check?

Code:
2010-01-28 16:25:24.625 JobQueue: Started Myth 2 MP3 (Audio Rip) for "Jim Rome Is Burning" recorded from channel 2039 at Thu Jan 28 13:29:00 2010
sh: usr/LH/bin/myth2mp3: No such file or directory
2010-01-28 16:25:24.647 JobQueue Error: User Job 'usr/LH/bin/myth2mp3 "/myth/tv/2039_20100128132900.mpg" "Jim Rome Is Burning - " "2039" "20100128132900"' failed, unable to find executable, check your PATH and backend logs.
2010-01-28 16:25:24.651 JobQueue: Current PATH: '/bin:/usr/bin:/sbin:/usr/sbin:/usr/LH/bin:/usr/MythVantage/bin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin:/usr/LH/tweaker/bin:/usr/bin'

Author:  Too Many Secrets [ Thu Jan 28, 2010 7:10 pm ]
Post subject: 

OK, asked and answered.

Edited /etc/profile

to look like

Code:
# Set our default path
PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/LH/bin"


and all is running

Author:  mihanson [ Thu Jan 28, 2010 8:52 pm ]
Post subject: 

Too Many Secrets wrote:
2010-01-28 16:25:24.647 JobQueue Error: User Job 'usr/LH/bin/myth2mp3 "/myth/tv/2039_20100128132900.mpg" "Jim Rome Is Burning - " "2039" "20100128132900"' failed, unable to find executable, check your PATH and backend logs.
2010-01-28 16:25:24.651 JobQueue: Current PATH: '/bin:/usr/bin:/sbin:/usr/sbin:/usr/LH/bin:/usr/MythVantage/bin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin:/usr/LH/tweaker/bin:/usr/bin'


Too Many Secrets wrote:
Code:
# Set our default path
PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/LH/bin"
and all is running


It looks to me that /usr/LH/bin was already part of $PATH (See the bold red text above).

I'm not sure I'm following you here:
Too Many Secrets wrote:
It wouldn't run when I used the full path (ie, /usr/LH/bin/myth2mp3) . . . The program runs fine when I run it from commandline . . . WITH THE ADDITION of the forward slash before 'usr/LH/bin/myth2mp3'.


So, as a user job, /usr/LH/bin/myth2mp3 <file parameters> does not work?

From the commandline /usr/LH/bin/myth2mp3 <file parameters> does work?

Whats is the output of
Code:
which myth2mp3
and
Code:
mysql --batch --skip-column-names -u mythtv -pmythtv mythconverg -e "select data from settings where value = 'UserJobN'";
substituting for N the user job number your myth2mp3 runs as.

Author:  Too Many Secrets [ Fri Jan 29, 2010 1:11 am ]
Post subject: 

Thanks for your input, I'm still scratching my head on this one. The only thing I saw from the mythbackend.log that looked fishy was this.

Quote:
2010-01-28 16:25:24.647 JobQueue Error: User Job 'usr/LH/bin/myth2mp3 "/myth/tv/2039_20100128132900.mpg" "Jim Rome Is Burning - " "2039" "20100128132900"' failed, unable to find executable, check your PATH and backend logs.
2010-01-28 16:25:24.651 JobQueue: Current PATH: '/bin:/usr/bin:/sbin:/usr/sbin:/usr/LH/bin:/usr/MythVantage/bin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin:/usr/LH/tweaker/bin:/usr/bin'


It appears to me that the above is missing the leading forward slash / . I don't know if this is a correct diagnosis, but it did lead me to the PATH insert that solved my problem.

Here is the feedback you asked for...

Code:
$ which myth2mp3
/usr/LH/bin/myth2mp3


Code:
$ mysql --batch --skip-column-names -u mythtv -pmythtv mythconverg -e "select data from settings where value = 'UserJob2'";
myth2mp3 "%DIR%/%FILE%" "%TITLE% - %SUBTITLE%" "%CHANID%" "%STARTTIME%"


If my solution was unorthodox, (and I'm almost sure it is) please let me know of a better way. But I agree that the PATH from the log appears to already be included. And again, using the absolute path of /usr/LH/bin/myth2mp3 "%DIR%/%FILE%" "%TITLE% - %SUBTITLE%" "%CHANID%" "%STARTTIME%" in the user job, would just plain NEVER START. It would just stay queued. And I triple checked the user job as being enabled to run. I just don't get it...

:?

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/