NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 … 28 29 30 31 32 … 34 Next »
Headless RPI4: Status shows not running on boot

 
  • 0 Vote(s) - 0 Average
Headless RPI4: Status shows not running on boot
arud01ph
Offline

Junior Member

Posts: 13
Threads: 3
Joined: Dec 2019
#11
2019-12-07, 07:22 AM
reloaded buster lite from scratch
- ran raspi-config to change password, turn on SSH, Turn off VNC, Set locale/hostname, etc.
- reboot

performed these operations:
- sudo apt-get update
- sudo apt-get upgrade
- sudo curl https://nextpvr.com/nextpvr-helper.deb -O
- sudo apt install ./nextpvr-helper.deb --install-recommends

configured server via web
tested guide/LiveTV in web browser=OK

power cycled the server

server not running
logged in
Code:
pi@NextPVR:~ $ service nextpvr-server status
● nextpvr-server.service - NextPVRServer
   Loaded: loaded (/usr/lib/systemd/system/nextpvr-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Sat 2019-12-07 02:07:21 EST; 1min 11s ago
  Process: 306 ExecStart=/opt/nextpvr/shell/server.sh start (code=exited, status=0/SUCCESS)
Main PID: 352 (code=killed, signal=ABRT)

Dec 07 02:07:21 NextPVR server.sh[306]: Unhandled Exception: System.Net.Sockets.SocketException: Network is unreachable
Dec 07 02:07:21 NextPVR server.sh[306]:    at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
Dec 07 02:07:21 NextPVR server.sh[306]:    at System.Net.Sockets.Socket.SendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remoteEP)
Dec 07 02:07:21 NextPVR server.sh[306]:    at NShared.Utility.HDHomeRun.Discover(String specificDeviceID)
Dec 07 02:07:21 NextPVR server.sh[306]:    at NShared.HDHomeRunRecorder.GetPresentDevices()
Dec 07 02:07:21 NextPVR server.sh[306]:    at NShared.Visible.CaptureSource.UpdateDevices(ICaptureSourceUpdateStatus callback)
Dec 07 02:07:21 NextPVR server.sh[306]:    at NShared.RecordingService..ctor()
Dec 07 02:07:21 NextPVR server.sh[306]:    at NPVR5.Program.Main(String[] args)
Dec 07 02:07:21 NextPVR systemd[1]: nextpvr-server.service: Main process exited, code=killed, status=6/ABRT
Dec 07 02:07:21 NextPVR systemd[1]: nextpvr-server.service: Failed with result 'signal'.
pi@NextPVR:~ $ sudo service nextpvr-server restart
pi@NextPVR:~ $ service nextpvr-server status
● nextpvr-server.service - NextPVRServer
   Loaded: loaded (/usr/lib/systemd/system/nextpvr-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-12-07 02:08:42 EST; 7s ago
  Process: 609 ExecStart=/opt/nextpvr/shell/server.sh start (code=exited, status=0/SUCCESS)
Main PID: 611 (dotnet)
    Tasks: 23 (limit: 4373)
   Memory: 81.3M
   CGroup: /system.slice/nextpvr-server.service
           └─611 /opt/dotnet/dotnet /opt/nextpvr/system/NextPVRServer.dll

Dec 07 02:08:40 NextPVR systemd[1]: Starting NextPVRServer...
Dec 07 02:08:42 NextPVR server.sh[609]: Starting server..Done. PID=611
Dec 07 02:08:42 NextPVR systemd[1]: Started NextPVRServer.
pi@NextPVR:~ $

What gets me in the stack is the call to:
   at NShared.Utility.HDHomeRun.Discover(String specificDeviceID)

Why would it pass OK after just a few seconds/cycling the service?
I'm running Ethernet/no WiFi on this box.  If you think it's the network is not online, is there a way to introduce a nSecond wait to the service start as a test? 
Maybe modify the startup/boot to throw a recycle in there/test (or hack my way to headless)?

Thanks for your time in helping me get this going bulletproof.  I really appreciate the feedback.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#12
2019-12-07, 09:04 AM (This post was last modified: 2019-12-07, 09:04 AM by mvallevand.)
That is exactly what I expected when I made that last post.

If you could save the output of sudo journalctl to a file, and zip it up and post it here I will see what I can do. The server script does have a wait for networking but I might need to tweak it.

Sub should be able to trap that error rather then crashing too.

Martin
arud01ph
Offline

Junior Member

Posts: 13
Threads: 3
Joined: Dec 2019
#13
2019-12-07, 02:43 PM
Yep, line 489 reports eth0 is down before attempting to start the service


Attached Files
.zip   arudolph_journal_onboot.zip (Size: 12.24 KB / Downloads: 4)
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#14
2019-12-07, 02:50 PM
I'll send you a PreStartup.sh script in a few hours that will help with this. I have to do something similiar for a slow USB device.

Meanwhile you can check on your IPTV source to see if it provide ts or mpeg URL's so you don't need to transcode.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,766
Threads: 954
Joined: May 2006
#15
2019-12-07, 05:38 PM
It looks like it took 17 seconds for the network and NextPVR started after 3

Here is something you should put in a file called /var/opt/nextpvr/scripts/PreStartup.sh After creating the file run

sudo chmod +x /var/opt/nextpvr/scripts/PreStartup.sh

Code:
read -d. uptime < /proc/uptime
echo $uptime
while [ $uptime -lt  18 ]; do
        sleep 1
        read -d. uptime < /proc/uptime
done

If the error still occurs from time to increase the 18 to whatever you need based on a log review.

Since the logic is based on uptime it won't impact server restarts just reboots.

Martin
arud01ph
Offline

Junior Member

Posts: 13
Threads: 3
Joined: Dec 2019
#16
2019-12-07, 07:18 PM
Works a charm Martin. Thank you for taking the time to work on it.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  Settings page shows only the main content area, not the side nav TheRealRoland 2 591 2024-02-13, 02:10 AM
Last Post: TheRealRoland
  Wrong frequencies in DVB-C-channels.conf, but scan log shows correct frequencies RonnyAdam 25 3,477 2023-07-24, 10:24 PM
Last Post: mvallevand
  How to record to a drive other than the boot drive? RocketDestroyer 5 1,223 2022-07-22, 08:38 PM
Last Post: mvallevand
  nextpvr server stopped running SteveTyrakowski 22 4,347 2021-10-30, 10:41 PM
Last Post: mvallevand
  Headless Linux install and update for dummies snagglewest 5 10,416 2021-06-12, 01:37 PM
Last Post: mvallevand
  Arch x64 install fails ATSC scan ("status":"Error: No such file or directory") jwh7 18 6,617 2020-11-27, 05:52 PM
Last Post: jwh7
  Recording service not running at recording time baj1 22 5,023 2020-11-21, 07:05 PM
Last Post: mvallevand
  RPi4 crashes or root disk is unmounted while recording on Hauppauge WinTV-dualHD scotrich99 17 3,885 2020-06-09, 02:56 AM
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