Maraschino (formerly HTPC Frontend) - a summary web interface for your XBMC HTPC

  Thread Rating:
  • 4 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
HarryRosen Offline
Senior Member
Posts: 255
Joined: Dec 2009
Reputation: 0
Post: #61
did you call the file htpcfrontend.conf with the .conf extention? try calling the file just htpcfrontend
find quote
Dougedey Offline
Junior Member
Posts: 20
Joined: Nov 2010
Reputation: 0
Post: #62
I'm finding the same issue, I've set everything up as the instruction vaguely mention and the result is I just get a directory listing.

[Image: widget]
find quote
DejaVu Offline
Posting Freak
Posts: 1,155
Joined: May 2010
Reputation: 2
Location: United Kingdom
Post: #63
Nice - that sorted it - but still get directory listings only.

Code:
xbmc@XBMCLive:~$ a2ensite htpcfrontend
Enabling site htpcfrontend.
Could not create /etc/apache2/sites-enabled/htpcfrontend: Permission denied
xbmc@XBMCLive:~$ sudo a2ensite htpcfrontend
[sudo] password for xbmc:
Enabling site htpcfrontend.
Run '/etc/init.d/apache2 reload' to activate new configuration!
xbmc@XBMCLive:~$ /etc/init.d/apache2 reload
* Reloading web server config apache2                                          httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                                                                         [fail]
xbmc@XBMCLive:~$ sudo /etc/init.d/apache2 reload
* Reloading web server config apache2                                   [ OK ]
xbmc@XBMCLive:~$

EDIT -
I reset my Apache log just before the reload and found this. Don't know if it will help though.
Code:
[Thu Nov 03 02:31:20 2011] [notice] Graceful restart requested, doing restart
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:21 2011] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.10 with Suhosin-Patch mod_wsgi/2.8 Python/2.6.5 configured -- resuming normal operations

[Image: watched-fanart.jpg]
Maraschino - Web based HTPC Organiser. Keep track of all your web based programs all in one place.
Home Page - Repo - Bug Tracker - Support Forum.
(This post was last modified: 2011-11-03 04:35 by DejaVu.)
find quote
percula Offline
Junior Member
Posts: 18
Joined: Aug 2011
Reputation: 0
Post: #64
DejaVu Wrote:EDIT -
I reset my Apache log just before the reload and found this. Don't know if it will help though.
Code:
[Thu Nov 03 02:31:20 2011] [notice] Graceful restart requested, doing restart
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:20 2011] [error] Exception KeyError: KeyError(-1215748352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Thu Nov 03 02:31:21 2011] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.10 with Suhosin-Patch mod_wsgi/2.8 Python/2.6.5 configured -- resuming normal operations

Did a bit of Google-fu... the KeyError thing is a known bug that was patched over a year ago. But I dont think Ubuntu heard about it as the version of mod_wsgi that installed on 10.04 is 2.8-2 with the current version being 3.3

I will venture to say all of the people (myself included) that are just getting the directory listing are on some flavor of Ubuntu with mod_wsgi version less than 3.3

I will leave the find of the right package to someone else...
find quote
Dougedey Offline
Junior Member
Posts: 20
Joined: Nov 2010
Reputation: 0
Post: #65
percula Wrote:Did a bit of Google-fu... the KeyError thing is a known bug that was patched over a year ago. But I dont think Ubuntu heard about it as the version of mod_wsgi that installed on 10.04 is 2.8-2 with the current version being 3.3

I will venture to say all of the people (myself included) that are just getting the directory listing are on some flavor of Ubuntu with mod_wsgi version less than 3.3

I will leave the find of the right package to someone else...

Ubuntu 11.10 comes with 3.3.

You can get the 3.3 packages from here: http://packages.debian.org/unstable/pyth...2-mod-wsgi

[Image: widget]
find quote
percula Offline
Junior Member
Posts: 18
Joined: Aug 2011
Reputation: 0
Post: #66
Dougedey Wrote:Ubuntu 11.10 comes with 3.3.

You can get the 3.3 packages from here: http://packages.debian.org/unstable/pyth...2-mod-wsgi

Doesn't seem to matter, I compiled 3.3 on 10.04, no more of the threading errors in the apache error log, but still no site either, just the directory listing.

One wild goose chased down, next.
find quote
UndisclosedP Offline
Junior Member
Posts: 26
Joined: Dec 2006
Reputation: 0
Post: #67
Seems like needing apache for this is overkill. I'd second the request to put something like CherryPY in to the app so it 'just works'. That being said. There is a quick way to get the app running without apache right now.

This instructions were performed on a debian sid box, but I don't see why they wouldn't work on ubuntu/lenny/whatever. I'm assuming you've managed to clone marashino out of git, installed the other pre-requisites. (Flask, JSONRPClib, etc) and set up a settings.py

Code:
sudo easy_install gunicorn
cd /your/maraschino/directory/
gunicorn -b yourip:yourport -w 4 htpcfrontend:app

Now maraschino will be served up at the ip : port you specified, no need for apache. If you want it to run persistently run

Code:
gunicorn -b yourip:yourport -w 4 htpcfrontend:app -D

Though this wont survive a reboot like the apache method. It does get the app up and running for you to play with. I assume you could knock up init scripts if you so desired. But I haven't got the time just now, and don't see the point until I'm using Eden full time.

@mrkipling Thanks for your efforts on this, its gorgeous and amazing, can't wait to actually use it full time when Eden goes gold.

NINJA EDIT:
So hacked around with flask, which i've never used before and it seems it does have its own built in web server. I'm not sure why mrkipling doesnt suggest using it. Perhaps you can enlighten us. But another way to get the app to 'just run' is

Code:
cd /your/maraschino/directory/
python htpcfrontend.py

This will start the flask debug server on port 127.0.0.1:5000 and it seems to work perfectly! You can hack htpcfrontend.py to run a different port and ip like so at the end of the file.

Code:
if __name__ == '__main__':
    app.run(debug=True,port=5001,host='0.0.0.0')
(This post was last modified: 2011-11-03 11:42 by UndisclosedP.)
find quote
mrkipling Offline
Senior Member
Posts: 214
Joined: Apr 2011
Reputation: 3
Post: #68
UndisclosedP Wrote:So hacked around with flask, which i've never used before and it seems it does have its own built in web server. I'm not sure why mrkipling doesnt suggest using it. Perhaps you can enlighten us. But another way to get the app to 'just run' is

Code:
cd /your/maraschino/directory/
python htpcfrontend.py

This will start the flask debug server on port 127.0.0.1:5000 and it seems to work perfectly! You can hack htpcfrontend.py to run a different port and ip like so at the end of the file.

Code:
if __name__ == '__main__':
    app.run(debug=True,port=5001,host='0.0.0.0')

A good point! I didn't think to suggest using the development server because, well, it's a development server - but now you mention it I'm sure it's fine for most uses. If people are having trouble setting up a proper web server then this could be a good alternative.

I'll have a play around with it, and making it start on boot, and if I'm satisfied with it then I'll add this method to the documentation.
find quote
mrkipling Offline
Senior Member
Posts: 214
Joined: Apr 2011
Reputation: 3
Post: #69
DejaVu Wrote:Could I make a coulpe of suggestions/requests...

hard drive capacity widget and frontend settings editing.

The HD capacity widget is a good idea - I've added it to my list of stuff that I'd like to implement.

The ability to edit settings and module placement in the browser is already on my todo list. It's a sizeable chunk of work though so it might be a little while.
find quote
DejaVu Offline
Posting Freak
Posts: 1,155
Joined: May 2010
Reputation: 2
Location: United Kingdom
Post: #70
Ran it manually from inside Putty to have a nose and I must say, it looks even better in the flesh!
I reckon this is the way to go - forget *apache and just run it using Python within a deamon and an init.d script with its own unique port?
Thanks UndisclosedP.

Changing None next to Trakt_API_Key to my API Key is throwing an error. Tried with ('apikey'), without (apikey) and with ("apikey"). Also tried with commas - but keep getting...

Code:
xbmc@XBMCLive:~$ sudo python /var/www/htpc-frontend/htpcfrontend.py
Traceback (most recent call last):
  File "/var/www/htpc-frontend/htpcfrontend.py", line 2, in <module>
    from settings import *
  File "/var/www/htpc-frontend/settings.py", line 30
    TRAKT_API_KEY = thisismytraktvapikey
Traceback (most recent call last):
  File "/var/www/htpc-frontend/htpcfrontend.py", line 2, in <module>
    from settings import *
  File "/var/www/htpc-frontend/settings.py", line 30
    TRAKT_API_KEY = thisismytraktvapikey
                                                       ^
SyntaxError: invalid syntax
What is the correct syntax for this?

[Image: watched-fanart.jpg]
Maraschino - Web based HTPC Organiser. Keep track of all your web based programs all in one place.
Home Page - Repo - Bug Tracker - Support Forum.
(This post was last modified: 2011-11-03 15:24 by DejaVu.)
find quote
Post Reply