NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
1 2 3 4 5 … 34 Next »
NextPVR webserver not starting, prevents client from starting

 
  • 0 Vote(s) - 0 Average
NextPVR webserver not starting, prevents client from starting
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#21
2025-02-04, 12:53 PM (This post was last modified: 2025-02-04, 01:33 PM by mvallevand.)
Did you ever try and edit web.config or add something to it?

Also I am curious what is being encrypted does this give the same error?

Code:
curl 'http://127.0.0.1:8866/service?method=session.initiate&ver=1.0&device=xbmc'

Martin
homemaisonbaile
Offline

Junior Member

France
Posts: 13
Threads: 1
Joined: Feb 2025
#22
2025-02-04, 02:13 PM
I get the same output running curl locally on the service page. Error 500.

Code:
LivingRoom:~/.kodi/addons/service.nextpvr/nextpvr-bin # curl -v 'http://127.0.0.1:8866/service?method=session.initiate&v
er=1.0&device=xbmc'
*   Trying 127.0.0.1:8866...
* Connected to 127.0.0.1 (127.0.0.1) port 8866
> GET /service?method=session.initiate&ver=1.0&device=xbmc HTTP/1.1
> Host: 127.0.0.1:8866
> User-Agent: curl/8.6.0
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain; charset=utf-8
< Date: Tue, 04 Feb 2025 14:04:42 GMT
< Server: Kestrel
< Transfer-Encoding: chunked
<
System.Security.Cryptography.CryptographicException: An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information.
---> System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlReader.MoveToContent()
   at System.Xml.Linq.XElement.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XElement.Load(Stream stream, LoadOptions options)
   at Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.ReadElementFromFile(String fullPath)
   at Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.GetAllElementsCore()+MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.GetAllElements()
   at Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.GetAllKeys()
   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.CreateCacheableKeyRingCore(DateTimeOffset now, IKey keyJustAdded)
   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow, Boolean forceRefresh)
   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext)
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext)
   at Microsoft.AspNetCore.Session.CookieProtection.Protect(IDataProtector protector, String data)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

HEADERS
=======
Accept: */*
Host: 127.0.0.1:8866
User-Agent: curl/8.6.0
* Leftovers after chunking: 12 bytes
* Connection #0 to host 127.0.0.1 left intact

No I have not edited web.config, I see opening it up now that it is structured as an XML and that there are three space characters at the beginning of the file before the XML declaration, but removing the three spaces makes no difference.

Is there another debug variable I can enable to output what the path of the XML with the supposed missing root is?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#23
2025-02-04, 02:49 PM (This post was last modified: 2025-02-04, 02:50 PM by mvallevand.)
You removed the BOM utf-8 marker it was created on on Windows machine I can't even get NextPVR to read the web.config that is provided.

I am guessing that the problem is you are running multiple web servers (I saw three others running) there might be confusing web.config I think you would find on a cleaner install like mine it would work.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#24
2025-02-04, 03:09 PM
Check the files in /storage/.aspnet/DataProtection-Keys I think there is a bad file in there.

Martin
homemaisonbaile
Offline

Junior Member

France
Posts: 13
Threads: 1
Joined: Feb 2025
#25
2025-02-04, 03:24 PM
(2025-02-04, 02:49 PM)mvallevand Wrote: You removed the BOM utf-8 marker it was created on on Windows machine  I can't even get NextPVR to read the web.config that is provided.

I am guessing that the problem is you are running multiple web servers (I saw three others running) there might be confusing web.config I think you would find on a cleaner install like mine it would work.

Martin

I reverted the file after I saw it made no difference. Just to be clear are you referring to the file in ~/.kodi/addons/service.nextpvr/nextpvr-bin? I have attached it here.
homemaisonbaile
Offline

Junior Member

France
Posts: 13
Threads: 1
Joined: Feb 2025
#26
2025-02-04, 03:27 PM (This post was last modified: 2025-02-04, 03:29 PM by homemaisonbaile.)
(2025-02-04, 03:09 PM)mvallevand Wrote: Check the files in /storage/.aspnet/DataProtection-Keys  I think there is a bad file in there.

Martin

Brilliant, working now. There was one key file in there which was empty, removing it and restarting the service instantly brought up the webserver.

Thank you so much for all the help! Everything seems to be working as normal now, the related errors have disappeared and NextPVR is now recognised as the PVR backend.

Code:
C:\Users\admin>curl -v http://192.168.1.100:8866/
*   Trying 192.168.1.100:8866...
* Connected to 192.168.1.100 (192.168.1.100) port 8866
> GET / HTTP/1.1
> Host: 192.168.1.100:8866
> User-Agent: curl/8.9.1
> Accept: */*
>
< HTTP/1.1 302 Found
< Content-Length: 0
< Date: Tue, 04 Feb 2025 15:29:02 GMT
< Server: Kestrel
< Cache-Control: no-cache,no-store
< Expires: -1
< Location: login.html?salt=f766f371-a2d5-4f64-94c2-c62e88d69a11
< Pragma: no-cache
< Set-Cookie: .AspNetCore.Session=CfDJ8CPgjTaFT6VIur%2BaukEiqLfM%2BgglxNnlB6mn1Rq4FfZPJ0VOfSwpaLU4ymWHyRZmdJBMl5KbXvAVLYxNetH0q%2FLuVzbTRMrUye4wGDfIpeM3%2FTLlBbrSfpVULSJqNnw07%2F%2FWt0WA1FxtSq8zW5Z%2BOpr%2FxSYU1KPILon2zJf2C4zN; path=/; samesite=lax; httponly
<
* Connection #0 to host 192.168.1.100 left intact
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#27
2025-02-04, 03:47 PM
Thanks for the outstanding help on your end, trying so many things. This can actually happen in any environment, unfortunately you were the first one to request help on it.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#28
2025-02-04, 04:55 PM
Great. Glad you got it sorted.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#29
2025-02-04, 05:23 PM (This post was last modified: 2025-02-04, 05:24 PM by mvallevand.)
For future reference some of the other locations to check for bad XML files on other platforms are

Windows C:\Windows\System32\config\systemprofile\AppData\Local\ASP.NET\DataProtection-Keys or
C:\Users\%username%\appdata\Local\ASP.NET\DataProtection-Keys

Linux deb installer. /root/.aspnet/DataProtection-Keys/

They aren't created by NextPVR and many I checked are expired too but if one is bad the web server won't work.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)

Pages (3): « Previous 1 2 3


Possibly Related Threads…
Thread Author Replies Views Last Post
  NextPVR can't open RAI (Italian main TV channels) links f2fg 17 2,894 2025-03-29, 10:15 AM
Last Post: alice_anto
  Guide data issue using NextPVR in a Proxmox LXC njc 10 770 2025-03-23, 01:40 PM
Last Post: njc
  NextPVR oddly limited to 7 tuners DaVinylSmith 4 390 2025-02-12, 02:49 PM
Last Post: DaVinylSmith
  NextPVR 7 looses recordings after post processing ballfam 15 807 2024-12-20, 03:23 AM
Last Post: ballfam
  Colossus 2 and nextpvr Iriman 53 4,401 2024-12-16, 02:32 AM
Last Post: ehfortin
  NextPVR user1232 1 282 2024-11-09, 11:21 AM
Last Post: mvallevand
  How does NextPVR separate TV from VOD ? FrankBKK 8 732 2024-10-30, 06:17 AM
Last Post: sub
  NextPVR i.mjh.nz [Failed: Recording interrupted] Nzbaxterman 6 655 2024-10-29, 11:44 PM
Last Post: sub
  NextPVR server on LibreElec jcjefferies 45 3,754 2024-09-16, 04:38 PM
Last Post: mvallevand
  NextPVR doesn't record retrofan 5 523 2024-09-15, 05:15 PM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode