diddlesnaps / tvheadend

MIT License
10 stars 0 forks source link

tvheadend.service could not be found #3

Open MrGlasspoole opened 4 years ago

MrGlasspoole commented 4 years ago

Hi.

First time I'm using snap. Its a fresh Debian Buster installation.

~$ snap list
Name       Version   Rev   Tracking  Publisher   Notes
core18     20191030  1265  stable    canonical✓  base
tvheadend  4.2.8     86    stable    diddledan   -

First thin i did was: ~$ sudo dpkg-reconfigure tvheadend because the setup did not start after the installation.

But i get: dpkg-query: package 'tvheadend' is not installed and no information is available

Looking at the service:

~$ sudo service tvheadend status
Unit tvheadend.service could not be found.
lucyllewy commented 4 years ago

The service is called snap.tvheadend.tvheadend.service, but it will already be running. You simply need to open your web browser and navigate to http://localhost:9981 where following the prompts on that page will complete the setup.

MrGlasspoole commented 4 years ago

The web interface is not working. That's the reason i wanted to check the status.

~$ sudo systemctl status -l snap.tvheadend.tvheadend.service
● snap.tvheadend.tvheadend.service - Service for snap application tvheadend.tvheadend
   Loaded: loaded (/etc/systemd/system/snap.tvheadend.tvheadend.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-11-28 13:14:19 CET; 2h 58min ago
 Main PID: 1404 (tvheadend)
    Tasks: 26 (limit: 2303)
   Memory: 93.5M
   CGroup: /system.slice/snap.tvheadend.tvheadend.service
           └─1404 /snap/tvheadend/86/usr/bin/tvheadend --config /var/snap/tvheadend/86

But http://10.1.255.101:9981/ does not work.

~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:8d:d3:0e brd ff:ff:ff:ff:ff:ff
    inet 10.1.255.101/16 brd 10.1.255.255 scope global dynamic ens33
       valid_lft 992sec preferred_lft 992sec
    inet6 fe80::20c:29ff:fe8d:d30e/64 scope link
       valid_lft forever preferred_lft forever

I can ping the server from my workstation without problems and Putty SSH is also working. I also disabled my workstation firewall for testing.

Edit: I tried pinging 9981 and it false. Shouldn't there be a listening on 9981?

~$ sudo lsof -i -P -n | grep LISTEN
sshd      526 root    3u  IPv4  23068      0t0  TCP *:22 (LISTEN)
sshd      526 root    4u  IPv6  23071      0t0  TCP *:22 (LISTEN)
gogo@BOB:~$ sudo lsof -i -P -n
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
dhclient  487 root    7u  IPv4  22628      0t0  UDP *:68
tvheadend 520 root   26u  IPv4  23155      0t0  UDP *:34591
tvheadend 520 root   27u  IPv4  23153      0t0  UDP 239.255.255.250:1900
sshd      526 root    3u  IPv4  23068      0t0  TCP *:22 (LISTEN)
sshd      526 root    4u  IPv6  23071      0t0  TCP *:22 (LISTEN)
sshd      646 root    3u  IPv4  23215      0t0  TCP 10.1.255.101:22->10.1.1.1:9221 (ESTABLISHED)
sshd      663 gogo    3u  IPv4  23215      0t0  TCP 10.1.255.101:22->10.1.1.1:9221 (ESTABLISHED)
lucyllewy commented 4 years ago

Check that there's a file at /var/snap/tvheadend/current/accesscontrol/cd8d0804bef721c2cadef68e5ba6e44e. This should have the following content:

{
    "index": 1,
    "enabled": true,
    "username": "*",
    "prefix": "0.0.0.0/0,::/0",
    "change": [
        "change_rights"
    ],
    "uilevel": -1,
    "uilevel_nochange": -1,
    "streaming": [
        "basic",
        "advanced",
        "htsp"
    ],
    "profile": [
    ],
    "dvr": [
        "basic",
        "htsp",
        "all",
        "all_rw",
        "failed"
    ],
    "htsp_anonymize": false,
    "dvr_config": [
    ],
    "webui": true,
    "admin": true,
    "conn_limit_type": 0,
    "conn_limit": 0,
    "channel_min": 0,
    "channel_max": 0,
    "channel_tag_exclude": false,
    "channel_tag": [
    ],
    "comment": "Default access entry",
    "wizard": false
}

You can force this to be recreated by removing the snap and reinstalling it anew. If that does not recreate it then it might be a problem with snapd or this snap.

You can check whether snap changes reports that the snap installation completed without error. If there is an error you can get more detail which might help me with snap change [change number] for the installation of tvheadend, where the change number is shown on the left of each entry in the snap changes output.

celsoannes commented 4 years ago

I have the same problem, I can't connect to port 9981 or 8888

celso@tvheadend:~$ sudo systemctl status -l snap.tvheadend.tvheadend.service
● snap.tvheadend.tvheadend.service - Service for snap application tvheadend.tvheadend
   Loaded: loaded (/etc/systemd/system/snap.tvheadend.tvheadend.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-09-18 17:10:49 -03; 5min ago
 Main PID: 1726 (tvheadend)
    Tasks: 24 (limit: 2358)
   Memory: 20.7M
   CGroup: /system.slice/snap.tvheadend.tvheadend.service
           └─1726 /snap/tvheadend/139/usr/bin/tvheadend --config /var/snap/tvheadend/139

set 18 17:10:49 tvheadend tvheadend[1726]: scanfile: DVB-T - loaded 44 regions with 1120 networks
set 18 17:10:49 tvheadend tvheadend.tvheadend[1726]: 2020-09-18 17:10:49.782 [   INFO] scanfile: DVB-T - loaded 44 regions with 1120 networks
set 18 17:10:49 tvheadend tvheadend[1726]: scanfile: DVB-C - loaded 19 regions with 63 networks
set 18 17:10:49 tvheadend tvheadend.tvheadend[1726]: 2020-09-18 17:10:49.783 [   INFO] scanfile: DVB-C - loaded 19 regions with 63 networks
set 18 17:10:49 tvheadend tvheadend[1726]: scanfile: ATSC-T - loaded 2 regions with 12 networks
set 18 17:10:49 tvheadend tvheadend.tvheadend[1726]: 2020-09-18 17:10:49.783 [   INFO] scanfile: ATSC-T - loaded 2 regions with 12 networks
set 18 17:10:49 tvheadend tvheadend[1726]: scanfile: ATSC-C - loaded 1 regions with 5 networks
set 18 17:10:49 tvheadend tvheadend.tvheadend[1726]: 2020-09-18 17:10:49.783 [   INFO] scanfile: ATSC-C - loaded 1 regions with 5 networks
set 18 17:10:49 tvheadend tvheadend[1726]: scanfile: ISDB-T - loaded 2 regions with 1297 networks
set 18 17:10:49 tvheadend tvheadend.tvheadend[1726]: 2020-09-18 17:10:49.784 [   INFO] scanfile: ISDB-T - loaded 2 regions with 1297 networks

celso@tvheadend:~$ snap changes
ID   Status  Spawn               Ready               Summary
1    Done    today at 17:09 -03  today at 17:09 -03  Initialize system state
2    Done    today at 17:09 -03  today at 17:10 -03  Install "tvheadend" snap
3    Done    today at 17:09 -03  today at 17:09 -03  Initialize device

celso@tvheadend:~$ snap change 2
Status  Spawn               Ready               Summary
Done    today at 17:09 -03  today at 17:09 -03  Ensure prerequisites for "tvheadend" are available
Done    today at 17:09 -03  today at 17:10 -03  Download snap "tvheadend" (139) from channel "stable"
Done    today at 17:09 -03  today at 17:10 -03  Fetch and check assertions for snap "tvheadend" (139)
Done    today at 17:09 -03  today at 17:10 -03  Mount snap "tvheadend" (139)
Done    today at 17:09 -03  today at 17:10 -03  Copy snap "tvheadend" data
Done    today at 17:09 -03  today at 17:10 -03  Setup snap "tvheadend" (139) security profiles
Done    today at 17:09 -03  today at 17:10 -03  Make snap "tvheadend" (139) available to the system
Done    today at 17:09 -03  today at 17:10 -03  Automatically connect eligible plugs and slots of snap "tvheadend"
Done    today at 17:09 -03  today at 17:10 -03  Set automatic aliases for snap "tvheadend"
Done    today at 17:09 -03  today at 17:10 -03  Setup snap "tvheadend" aliases
Done    today at 17:09 -03  today at 17:10 -03  Run install hook of "tvheadend" snap if present
Done    today at 17:09 -03  today at 17:10 -03  Start snap "tvheadend" (139) services
Done    today at 17:09 -03  today at 17:10 -03  Run configure hook of "tvheadend" snap if present
Done    today at 17:09 -03  today at 17:09 -03  Ensure prerequisites for "core18" are available
Done    today at 17:09 -03  today at 17:09 -03  Download snap "core18" (1885) from channel "stable"
Done    today at 17:09 -03  today at 17:09 -03  Fetch and check assertions for snap "core18" (1885)
Done    today at 17:09 -03  today at 17:09 -03  Mount snap "core18" (1885)
Done    today at 17:09 -03  today at 17:09 -03  Copy snap "core18" data
Done    today at 17:09 -03  today at 17:09 -03  Setup snap "core18" (1885) security profiles
Done    today at 17:09 -03  today at 17:09 -03  Make snap "core18" (1885) available to the system
Done    today at 17:09 -03  today at 17:09 -03  Automatically connect eligible plugs and slots of snap "core18"
Done    today at 17:09 -03  today at 17:09 -03  Set automatic aliases for snap "core18"
Done    today at 17:09 -03  today at 17:09 -03  Setup snap "core18" aliases
Done    today at 17:09 -03  today at 17:09 -03  Run install hook of "core18" snap if present
Done    today at 17:09 -03  today at 17:09 -03  Start snap "core18" (1885) services
Done    today at 17:10 -03  today at 17:10 -03  restart of [tvheadend.tvheadend]
lucyllewy commented 4 years ago

Can you paste the output of snap connections tvheadend please?

lucyllewy commented 3 years ago

Is this still a problem? If you are happy we can close this issue.

fuzileiro1979 commented 3 years ago

Hi Guys, i have installed the last snap version, instaled Tvheadend, then on the Tvheadend interface change login details, and now i can't login!!! now, my question is, how i can change it or how i can reconfigure my Tvheadend? I apreciate all help!

THX

lucyllewy commented 3 years ago

@fuzileiro1979 please don't hijack someone else's issue. You can reset the permissions to default with

tvheadend.reset-permissions