cabernetwork / cabernet

Cabernet allows control of IPTV streams. Plugins supports DaddyLive, Pluto TV, XUMO, M3U/XMLTV.XML files (SamsungTV, STIRR, DistroTV, Plex TV)
https://cabernetwork.github.io
MIT License
154 stars 22 forks source link

Could not start Windows service. #151

Closed UrTerrible closed 1 month ago

UrTerrible commented 1 month ago

Screenshot 2024-06-12 101650

All of a sudden, the Windows service will no longer start. I have tried restarting, reinstalling, and deletion and re-registering of the service. Very unsure what changed.

The issue states: "Windows could not start the Cabernet service on Local Computer. The service did not return an error. This could be an internal Windows error or an internal service error.".

rocky4546 commented 1 month ago

Getting to the error in windows service is a little hard, but I will walk you through it.

  1. Bring up a CMD window
  2. Go to where cabernet is installed
  3. cd to lib\tvheadend\service\Windows
  4. You will find a nssm.exe file there.
  5. Run this file with the command: nssm edit Cabernet
  6. It will take admin priv. Once the window appears, go to the I/O tab
  7. You will see where it is placing the error and stdout files.
  8. Go to the location for the files and take a look. Normally, the error log will tell you why it does not start.
UrTerrible commented 1 month ago

Thank you so much for responding so quickly!

I get the following error:

Traceback (most recent call last):
  File "C:\Program Files\cabernet\tvh_main.py", line 28, in <module>
    from lib import main
  File "C:\Program Files\cabernet\lib\main.py", line 48, in <module>
    import lib.clients.hdhr.hdhr_server as hdhr_server
  File "C:\Program Files\cabernet\lib\clients\__init__.py", line 1, in <module>
    import lib.clients.epg2xml
  File "C:\Program Files\cabernet\lib\clients\epg2xml.py", line 29, in <module>
    from lib.common.decorators import getrequest
  File "C:\Program Files\cabernet\lib\common\decorators.py", line 22, in <module>
    import httpcore
ModuleNotFoundError: No module named 'httpcore'

I tried to use pip to install httpcore and it says it is already installed. I am really a noob. I apologize lol.

rocky4546 commented 1 month ago

The issue is that httpcore must be installed so the service account can see the module. By you running pip, it will look at your account and not the service account. If pip is installed correctly, cabernet will install the module for you, but again is must be installed so the service account can see it. You can try running pip from an admin window and see if that fixes it.

UrTerrible commented 1 month ago

Hmm. I tried to run pip via admin cmd and I recieved the same info; httpcore is installed. I'm under the assumption pip is installed with Python thus I am unsure why it wouldn't work. Additionally, running tvh_main.py manually via cmd is successful. This to me says that httpcore is installed, unless I stand corrected. Your help is much appreciated.

rocky4546 commented 1 month ago

you needing httpcore is strange. I looked and the latest version of cabernet no longer requires it. Try RC01.

I will add the installer in just a bit...

rocky4546 commented 1 month ago

installer for RC01 added in case you need it.

UrTerrible commented 1 month ago

You're a king amongst men! Thanks a million for your help thus far.

Screenshot 2024-06-12 123742

I get this error upon using the installer. I truly have no idea what it means.

UrTerrible commented 1 month ago

Solved it! I was able to create a config.ini via manually running tvh_main in a new directory and copied it over to the default location. Seems to be working. Thank you!

rocky4546 commented 1 month ago

glad it worked out. closing ticket