Error - /api/imagecache/config/load -- 400
Added by Geoff Geoff over 10 years ago
Hi,
I've recently wiped tvheadend and started again - because I was messing around too much. everything seems to be working however when I go into configuration / general I get a box saying failed.
and looking at the logs I get
2014-02-24 08:45:26.224 api: failed to find subsystem [imagecache/config/load]
2014-02-24 08:45:26.224 HTTP: xx.xx.xx.xx: /api/imagecache/config/load -- 400
Any ideas?
Thanks
Geoff
Replies (38)
RE: Error - /api/imagecache/config/load -- 400 - Added by Geoff Geoff over 10 years ago
thanks I will have a look at everything....
would this explain this as well? its killing my system. or this because I'm stopping the services all the time?
24556 hts 20 0 1547m 709m 120 D 0 18.0 28:49.43 tv_grab_uk_rt
24806 hts 20 0 1546m 643m 144 D 0 16.3 29:15.57 tv_grab_uk_rt
25233 hts 20 0 1544m 686m 116 D 0 17.4 29:03.14 tv_grab_uk_rt
Thanks.
RE: Error - /api/imagecache/config/load -- 400 - Added by Prof Yaffle over 10 years ago
Likely because you're restarting the service - each time it gets going, it spawns a new Radio Times XMLTV grab. May be worth switching that off (you can revert to OTA) while you're fiddling.
RE: Error - /api/imagecache/config/load -- 400 - Added by Prof Yaffle over 10 years ago
Moving these posts over from the thread where I put them... they're relevant to that as well, but should have been here... d'oh...
===========
I had a thought here... are we looking in the right place? Permissions are all very well, but what if it isn't hts that's trying to access the files.
tvheadend includes its own web server. That loads up the extjs pages (config.js and friends). I am assuming that none of this necessarily runs as hts... it may run as root, maybe something else. So...
1. If there's some quirk of different distros that changes how this process is spawned, the rights it inherits, or similar then maybe what works on, say, 'buntu 12.x doesn't work on Arch.
2. If something else has happened during installation that does the same - maybe some global umask, maybe a top-level inherited file system permission - then perhaps a process that runs as UID:GID on box 1 can access the files while the equivalent on box 2 can't.
We'd need to figure out where the processes run... are they simply threads of tvheadend (in which case they're indistinguishable and should be hts:video) or are they genuinely separately-spawned processes in their own right.
Just a thought... maybe judicious use of ps -eaf, grep, pstree, fuser and similar would tell us more?
===========
lsof suggests that the web server runs under hts:
tvheadend 21927 hts 11u IPv4 4372076 0t0 TCP *:9981 (LISTEN)
... so I'm not sure whether that shoots my theory down or not.
===========
Okay, I'm done for the moment - time for someone else to have a poke.
On my 'buntu box, at least, I'm not convinced that it's the file permissions. I can remove this file, chmod it to 000, chown it to root:root and do pretty much whatever I like with it - I never get the FAILED error, I never fail to read it or write it. Ultimately, hts has complete access to those directories, so can do what it likes, pretty much.
So the problem lies elsewhere - directory permission, perhaps, or some nebulous process issue.
RE: Error - /api/imagecache/config/load -- 400 - Added by Anonymous over 10 years ago
I also think this hasn't got much to do with permissions on config.js as I've also tried changing stuff with chmod & chown etc. The only thing that breaks stuff is renaming it or chmod 000.
So the error we're getting is "400 Bad Request" for http://{server}:9981/api/imagecache/config/load
Not sure if it's relevant but I'm getting the same error further up the chain, http://{server}:9981/api/
This might be normal behaviour but I'm not in a position to tell as I'm in the "FAILED" error message camp
RE: Error - /api/imagecache/config/load -- 400 - Added by Anonymous over 10 years ago
Ok I fixed the error for me but not entirely sure how
So basically I was messing around with the "configure" file options before compiling.
I changed
"imagecache:auto"
to
"imagecache:no"
Compiled, re-installed and then set it back to "auto" again.
Now the problem is I also turned off option IPTV and back on out of curiosity before I realised the error had gone away. Doubt this had any effect though?
I now see the Image Caching configuration options in the WebUI which I didn't see before underneath the time update section.
RE: Error - /api/imagecache/config/load -- 400 - Added by Prof Yaffle over 10 years ago
I just tried navigating to http://x.x.x.x:9981/api, and tvheadend promptly crashed. So I think I'll accept the fact that maybe my debugging assistance here is coming to an end...!
RE: Error - /api/imagecache/config/load -- 400Again, the JS console should give some clues, - Added by Prof Yaffle over 10 years ago
I'm like a dog with a bone, really I am, so I've been playing with the code just for a giggle. Yeah, I know... I've had a Neo-like "I know Javascript!" moment, just done badly.
A couple of other thoughts:
1. What browser is being used? Anything there that might perhaps explain a malformed set of information being sent to/from the api? I wonder whether it's a genuine JS issue, with something not making it from the HTML form all the way through to the read/save routines. Different browser, different client?
2. What accesscontrol rules are in force? What user are you logged into the web interface as/connected as? This time wondering whether it's an admin rights issue - that tvheadend can access these files, but this particular web interface user can't. Different client, different user, cleared stored passwords, etc.?
RE: Error - /api/imagecache/config/load -- 400 - Added by Geoff Geoff over 10 years ago
staying up most of the night I've got it sorted... so many many thanks however tvheadend is running like a dog with 1 leg and I think its best to reinstall from scratch, so downloading 12.04 TLS and will reinstall tonight with latest drivers from TBS
I would like to write some documentation on this, as maybe help for others.
If I want transcoding, I need to compile the code, rather than apt-get tvheadend. I also want the image caching on
and if I want all the above is the "unstable" release the best to go for?
Appreiate this has changed from the title of the thread, but need a stable system as I'm going to use on day to day rather than having it as a gadget
RE: Error - /api/imagecache/config/load -- 400 - Added by Prof Yaffle over 10 years ago
"Yes" to unstable - well, just the latest code base, really, since you're rolling your own - 'unstable' simply refers to a nightly build versus a beta or stable release, and those are, by definition, pre-compiled.
And "yes, I think" to the self-build to get transcoding. I don't use it, so I don't know that, but that's my understanding.
Good luck. And just think, you can break it all again next month with the new LTS, 14.04 :-)
(As a footnote, I use tvh every day to record stuff for the kids, and rarely have problems on the latest code (3.9.385~g7d8d81a) - so it's certainly out of gadget territory, although transcoding could be a whole new world of fun).
RE: Error - /api/imagecache/config/load -- 400 - Added by Geoff Geoff over 10 years ago
thanks for the replying again...etc..
I took your advise and wiped the machine!
I've written a document on setting it up from scratch, so I don't forget with transcoding built in.
I didn't use any package and downloading the latest version from git and compiled it. good news the system is much more stable and not causing any issues on BBC one HD and ITV HD.
I've still got this imagecache issue, which I will get to the bottom off. I've got one more question.. if I may and please tell me to move to other thread etc..etc.. but I'm not sure if its linked to imagcache 400 issue.
1. I've downloading all icons for channels is a massive zip file is there a way of auto populating them? without manually added them as a icon on each channel. or is there anyway in tvheadend or command line driven to download these icons and map straight away - or can I not do this with the imagecache disabled.
2. I've added my own Channel tag called main channels, and added BBC ONE HD BBC TWO HD, ITV HD, CHANNEL 4 HD, BBC ONE SD, BBC TWO SD, and ITV SD. However aren't in order on xbmc front end I've got BBC TWO HD first, then ITV then BBC ONE HD what do I need to do to get these to be ordered correctly is it something to do with number section within channels, and if it is I've labbelled it BBC ONE HD = 1,BBC TWO HD = 2, ITV HD = 3 and so on however the order isn't right on XBMC or tvhclient. is this again to do with the /config/load 400 error or the /config/save 400 error I'm getting?
Thanks for your patience in reading this - What I would like to do is document this fully then post it up and may help someone else with errors.
thanks again.
RE: Error - /api/imagecache/config/load -- 400 - Added by Prof Yaffle over 10 years ago
Well, it's sounding a little more positive... nearly there...
1. Icons - there's a helper script in this thread: https://tvheadend.org/boards/4/topics/10563. That may be a place to start, although I haven't tried it.
In XBMC, you can set a path to the icons and then scan for missing ones en masse. They have to match the channel names, though, so maybe that's where the helper script could come in. This is where I sorted my icons, as I don't really care whether tvheadend itself knows anything about them.
XBMC: System -> Settings -> Live TV -> Menu/OSD
> Default Folder for PVR thumbails
> Scan for missing icons
2. Numbers - you could number them in XBMC... or you could re-number them in tvheadend. If you do the latter, you could force XBMC to sync to get them to match.
tvheadend: Configuration -> Channel/EPG -> Channels -> Edit (... channel number - or double-click on the channel field)
XBMC: System -> Settings -> Live TV -> General -> Use backend channel numbers
RE: Error - /api/imagecache/config/load -- 400 - Added by Geoff Geoff over 10 years ago
thanks I will try tonight. would need to do it on tvheadend side as mine plan is to your multiple versions of xbmc around the house and don't want to set up channels on each. (Think I'll see to buy another sat card to install into linux server!! )
RE: Error - /api/imagecache/config/load -- 400 - Added by Prof Yaffle over 10 years ago
Regarding the imagecache issue, I wonder if this helps at all: commit:ee06c4bd
- « Previous
- 1
- 2
- Next »