Forum

Full Version: XBian tvheadend package
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Hi guys,

I just got closer to my RasPi and installed the TVHeadEnd package.
But the server doesn't work. I tried to get to ip_address:9981. Nothing happened.

What should I do?

Here is the content of the only file in the TVHeadEnd directory:
Terminal

xbian@xbian ~/.hts/tvheadend/accesscontrol $ cat 1
{
"enabled": 1,
"username": "xbian",
"password": "raspberry",
"comment": "Default access entry",
"prefix": "0.0.0.0/24",
"streaming": 1,
"dvr": 1,
"dvrallcfg": 1,
"webui": 1,
"admin": 1,
"id": "1"
}

Edit 1:
Well, I managed to start TVHeadEnd by using the following command in shell:
Code:
xbian@xbian ~ $ sudo start tvheadend
tvheadend start/running, process 2022
But when i browse to ip_address:9981 and use xbian and raspberry to access I get 401 Unauthorized
What I'm doing wrong now and why isn't TVHeadEnd starting on reboot?

Thanks.
(20th Nov, 2013 09:45 PM)starous Wrote: [ -> ]
Terminal

xbian@xbian ~/.hts/tvheadend/accesscontrol $ cat 1
{
"enabled": 1,
"username": "xbian",
"password": "raspberry",
"comment": "Default access entry",
"prefix": "0.0.0.0/24",
"streaming": 1,
"dvr": 1,
"dvrallcfg": 1,
"webui": 1,
"admin": 1,
"id": "1"
}

But when i browse to ip_address:9981 and use xbian and raspberry to access I get 401 Unauthorized
What I'm doing wrong now and why isn't TVHeadEnd starting on reboot?

Thanks.

See my previous post:
replace
"prefix": "0.0.0.0/24",
by
"prefix": "0.0.0.0/0,::/0"
(20th Nov, 2013 11:40 PM)Killerbee Wrote: [ -> ]
(20th Nov, 2013 09:45 PM)starous Wrote: [ -> ]
Terminal

xbian@xbian ~/.hts/tvheadend/accesscontrol $ cat 1
{
"enabled": 1,
"username": "xbian",
"password": "raspberry",
"comment": "Default access entry",
"prefix": "0.0.0.0/24",
"streaming": 1,
"dvr": 1,
"dvrallcfg": 1,
"webui": 1,
"admin": 1,
"id": "1"
}

But when i browse to ip_address:9981 and use xbian and raspberry to access I get 401 Unauthorized
What I'm doing wrong now and why isn't TVHeadEnd starting on reboot?

Thanks.

See my previous post:
replace
"prefix": "0.0.0.0/24",
by
"prefix": "0.0.0.0/0,::/0"

Hi,

I have tried this, but it didn't help Huh
(20th Nov, 2013 11:53 PM)starous Wrote: [ -> ]Hi,

I have tried this, but it didn't help Huh

Did you check the file permissions of the ~/.hts/tvheadend/accesscontrol/1 file?
It needs to be owned by xbian and it should have read/write permission.

By the way the file needs to be in the /home/xbian directory. Not in /root
KB
(21st Nov, 2013 12:04 AM)Killerbee Wrote: [ -> ]
(20th Nov, 2013 11:53 PM)starous Wrote: [ -> ]Hi,

I have tried this, but it didn't help Huh

Did you check the file permissions of the ~/.hts/tvheadend/accesscontrol/1 file?
It needs to be owned by xbian and it should have read/write permission.

By the way the file needs to be in the /home/xbian directory. Not in /root
KB

It seems that it has the right permission
Terminal

xbian@xbian ~/.hts/tvheadend/accesscontrol $ ls -l
celkem 4
-rw-r--r-- 1 xbian xbian 291 lis 20 13:07 1
xbian@xbian ~/.hts/tvheadend/accesscontrol $

And it's location is in /home/xbian/.hts/tvheadend/accesscontrol
(21st Nov, 2013 12:09 AM)starous Wrote: [ -> ]It seems that it has the right permission
Terminal

xbian@xbian ~/.hts/tvheadend/accesscontrol $ ls -l
celkem 4
-rw-r--r-- 1 xbian xbian 291 lis 20 13:07 1
xbian@xbian ~/.hts/tvheadend/accesscontrol $

And it's location is in /home/xbian/.hts/tvheadend/accesscontrol

what does ps -ef | grep tvheadend show?
(21st Nov, 2013 12:36 AM)Killerbee Wrote: [ -> ]what does ps -ef | grep tvheadend show?

Terminal

xbian@xbian ~ $ ps -ef | grep tvheadend
xbian 9619 1 0 15:35 ? 00:00:00 tvheadend -f -u xbian -g video
xbian 10216 10094 0 15:42 pts/0 00:00:00 grep --color=auto tvheadend

and permissions are
Terminal

drwxr-xr-x 1 xbian xbian 18 lis 19 21:21 .hts
(21st Nov, 2013 12:44 AM)starous Wrote: [ -> ]
Terminal

xbian@xbian ~ $ ps -ef | grep tvheadend
xbian 9619 1 0 15:35 ? 00:00:00 tvheadend -f -u xbian -g video
xbian 10216 10094 0 15:42 pts/0 00:00:00 grep --color=auto tvheadend

and permissions are
Terminal

drwxr-xr-x 1 xbian xbian 18 lis 19 21:21 .hts

Looks good to me. Maybe you could try this.
Terminal
stop tvheadend
wait a few seconds and check if tvheadend has stopped.
now run tvheadend manually. So without the start command but with -C
Terminal
tvheadend -C
If all is correct you should be able to access tvheadend in your browser without the authentication dialog pop-up screen. If so please close it again.
Hit CTRL C to stop tvheadend
Now start tvheadend with the start command
Terminal
start tvheadend
And try to access tvheadend in your browser.

KB
(21st Nov, 2013 12:54 AM)Killerbee Wrote: [ -> ]
(21st Nov, 2013 12:44 AM)starous Wrote: [ -> ]
Terminal

xbian@xbian ~ $ ps -ef | grep tvheadend
xbian 9619 1 0 15:35 ? 00:00:00 tvheadend -f -u xbian -g video
xbian 10216 10094 0 15:42 pts/0 00:00:00 grep --color=auto tvheadend

and permissions are
Terminal

drwxr-xr-x 1 xbian xbian 18 lis 19 21:21 .hts

Looks good to me. Maybe you could try this.
Terminal
stop tvheadend
wait a few seconds and check if tvheadend has stopped.
now run tvheadend manually. So without the start command but with -C
Terminal
tvheadend -C
If all is correct you should be able to access tvheadend in your browser without the authentication dialog pop-up screen. If so please close it again.
Hit CTRL C to stop tvheadend
Now start tvheadend with the start command
Terminal
start tvheadend
And try to access tvheadend in your browser.

KB

Thanks, it helped.
Few more questions:
Will it work properly even after setting the user name and password?
Will it start on reboot?
Is it normal that I need to use the sudo command to start or stop the service, when I have permissions as xbian?
(21st Nov, 2013 01:05 AM)starous Wrote: [ -> ]Thanks, it helped.
Few more questions:
Will it work properly even after setting the user name and password?
Will it start on reboot?
Is it normal that I need to use the sudo command to start or stop the service, when I have permissions as xbian?

Hold your horses I am not an expert Big Grin
First off all. Are you able to access tvheadend in your browser now with user xbian password raspberry?
To answer your question about start on reboot: I am facing the same issue. I have to dig into it myself. It seems to be an upstart script issue. I am new to upstart.

Regarding "sudo start tvheadend": yes as far as I know sudo is normal in this situation. Since only "root" is allowed to start any daemon.

KB
(21st Nov, 2013 01:14 AM)Killerbee Wrote: [ -> ]Hold your horses I am not an expert Big Grin
First off all. Are you able to access tvheadend in your browser now with user xbian password raspberry?
To answer your question about start on reboot: I am facing the same issue. I have to dig into it myself. It seems to be an upstart script issue. I am new to upstart.

Regarding "sudo start tvheadend": yes as far as I know sudo is normal in this situation. Since only "root" is allowed to start any daemon.

KB

Accessing with xbian:raspberry is working. Awesome.
When you get an answer for the start after reboot, let me know Wink
if you upgrade to version 1.0.1b of tvheadend package, it should auto start on reboot (it is fixing startup script). also, with this version tvheadend is added into services list of xbian-config and should be controllable through xbian-config (ssh and/or XBMC version).
(21st Nov, 2013 07:26 AM)mk01 Wrote: [ -> ]if you upgrade to version 1.0.1b of tvheadend package, it should auto start on reboot (it is fixing startup script). also, with this version tvheadend is added into services list of xbian-config and should be controllable through xbian-config (ssh and/or XBMC version).

Well, it seems that there is a problem.
I've updated to 1.0.1b and my tvheadend stop working again. I've looked into file 1 and its content was
Terminal

{
"enabled": 1,
"username": "xbian",
"password": "raspberry",
"comment": "Default access entry",
"prefix": "0.0.0.0/24",
"streaming": 1,
"dvr": 1,
"dvrallcfg": 1,
"webui": 1,
"admin": 1,
"id": "1"
}
again.

And this time tvheadend -C didn't help.
(23rd Nov, 2013 03:01 AM)starous Wrote: [ -> ]
(21st Nov, 2013 07:26 AM)mk01 Wrote: [ -> ]if you upgrade to version 1.0.1b of tvheadend package, it should auto start on reboot (it is fixing startup script). also, with this version tvheadend is added into services list of xbian-config and should be controllable through xbian-config (ssh and/or XBMC version).

Well, it seems that there is a problem.
I've updated to 1.0.1b and my tvheadend stop working again. I've looked into file 1 and its content was
Terminal

{
"enabled": 1,
"username": "xbian",
"password": "raspberry",
"comment": "Default access entry",
"prefix": "0.0.0.0/24",
"streaming": 1,
"dvr": 1,
"dvrallcfg": 1,
"webui": 1,
"admin": 1,
"id": "1"
}
again.

And this time tvheadend -C didn't help.

mk01 forgot to modify this part (probably so did you)....Tongue
Code:
See my previous post:
replace
"prefix": "0.0.0.0/24",
by
"prefix": "0.0.0.0/0,::/0",

@mk01
Could please update the prefix in the configuration file?
Version 3.5 requires this new prefix.
Also we have to run tvheadend -C once to make it work.
Could you please add tvheadend -C to the installation script (and kill it)?

Thanks
So, I managed to fix the tvheadend server on my XBian, but it still doesn't start on reboot Sad
Pages: 1 2 3 4
Reference URL's