Author Topic: FPPD running, playlist running but no output until FPPD restart  (Read 767 times)

Offline JSOrange97

  • Newbie
  • *
  • Join Date: Dec 2015
  • Location:
  • Posts: 27
  • Kudos: 0
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #15 on: January 11, 2019, 03:28:49 PM »
The 'every so often' is every 10 seconds.  I couldn't remember if it was 30 or 10, but just checked the code in UDPOutput.cpp.   If you are seeing the lights not working for 5 minutes, then that is something we need to look into.  There should be some warnings in the fppd.log file when FPP disables outputs.  Can you take a look and see if you see any?  You will need to have the 'Channel Output' Log Mask checkbox checked on the FPP Settings page or else the entries won't show.  If you see those, can you clear the fppd.log file before shutting down sometime and then after you are booted back up and the problem is occurring, grab the logs zip and post it here and we can take a look to see what fppd logged when it started up and as the playlist started playing.
Thanks for letting me know about the debug as this answers a question that was coming next.  :)


I will try and re-create the problem over the weekend and grab the log files.

Offline JSOrange97

  • Newbie
  • *
  • Join Date: Dec 2015
  • Location:
  • Posts: 27
  • Kudos: 0
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #16 on: January 11, 2019, 03:41:02 PM »

The 'every so often' is every 10 seconds.  I couldn't remember if it was 30 or 10, but just checked the code in UDPOutput.cpp.   If you are seeing the lights not working for 5 minutes, then that is something we need to look into.  There should be some warnings in the fppd.log file when FPP disables outputs.  Can you take a look and see if you see any?  You will need to have the 'Channel Output' Log Mask checkbox checked on the FPP Settings page or else the entries won't show.  If you see those, can you clear the fppd.log file before shutting down sometime and then after you are booted back up and the problem is occurring, grab the logs zip and post it here and we can take a look to see what fppd logged when it started up and as the playlist started playing.


The existing log is littered with these:

channeloutput/UDPOutput.cpp:191:sendmmsg() failed for UDP output (output count: -1/97   time: 0 ms) with error: 22   Invalid argument

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #17 on: January 11, 2019, 03:49:06 PM »
The existing log is littered with these:

channeloutput/UDPOutput.cpp:191:sendmmsg() failed for UDP output (output count: -1/97   time: 0 ms) with error: 22   Invalid argument

It looks like the -1 is indicating that sendmmsg returned with the error listed.  I'm wondering if there was an error setting up the socket.  I think we need to see the fppd.log file from right after the reboot when fppd starts up and then a little later starts playing the scheduled playlist.
-
Chris

Offline JSOrange97

  • Newbie
  • *
  • Join Date: Dec 2015
  • Location:
  • Posts: 27
  • Kudos: 0
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #18 on: January 11, 2019, 04:17:13 PM »
It looks like the -1 is indicating that sendmmsg returned with the error listed.  I'm wondering if there was an error setting up the socket.  I think we need to see the fppd.log file from right after the reboot when fppd starts up and then a little later starts playing the scheduled playlist.


Here you go.  This represents the power on with controllers off, verify fppd running, then turn controllers on.  Waited over a minute then did "fppd restart"

Offline JSOrange97

  • Newbie
  • *
  • Join Date: Dec 2015
  • Location:
  • Posts: 27
  • Kudos: 0
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #19 on: January 14, 2019, 03:12:31 PM »
It looks like the -1 is indicating that sendmmsg returned with the error listed.  I'm wondering if there was an error setting up the socket.  I think we need to see the fppd.log file from right after the reboot when fppd starts up and then a little later starts playing the scheduled playlist.


Here you go.  This represents the power on with controllers off, verify fppd running, then turn controllers on.  Waited over a minute then did "fppd restart"
I'm curious if anything was gleaned from the logs?  Further testing shows that it doesn't matter if the controllers are on or not.  It only works with an "fppd restart".

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #20 on: January 14, 2019, 03:19:45 PM »
The sendmmsg() errors started right away as soon as fppd started, so it couldn't contact that controllers for some reason.

Code: [Select]
2019-01-11 18:02:48 (1204) log.c:220:=========================================
2019-01-11 18:02:48 (1204) log.c:221:FPP 2.x-126-g65152480
2019-01-11 18:02:48 (1204) log.c:222:Branch: master
2019-01-11 18:02:48 (1204) log.c:223:=========================================
2019-01-11 18:02:49 (1254) channeloutput/channeloutput.c:489:universes 0:  Determined range needed 0 - 49597
2019-01-11 18:02:49 (1254) channeloutput/channeloutput.c:475:LOR 1:  Determined range needed 49598 - 49613
2019-01-11 18:02:49 (1254) channeloutput/channeloutput.c:527:Determined range needed 0 - 49615
2019-01-11 18:02:49 (1254) channeloutput/UDPOutput.cpp:191:sendmmsg() failed for UDP output (output count: -1/97   time: 0 ms) with error: 22   Invalid argument

I'm wondering if this is fppd starting up before the networking is fully up.  I think Dan was looking into something similar in another thread.  How comfortable are you with the command line?  We could try a test and give you a command to add to a file to force fppd startup to wait a few seconds to make sure the network has some time to spin up.

Offline JSOrange97

  • Newbie
  • *
  • Join Date: Dec 2015
  • Location:
  • Posts: 27
  • Kudos: 0
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #21 on: January 14, 2019, 03:26:44 PM »
The sendmmsg() errors started right away as soon as fppd started, so it couldn't contact that controllers for some reason.

Code: [Select]
2019-01-11 18:02:48 (1204) log.c:220:=========================================
2019-01-11 18:02:48 (1204) log.c:221:FPP 2.x-126-g65152480
2019-01-11 18:02:48 (1204) log.c:222:Branch: master
2019-01-11 18:02:48 (1204) log.c:223:=========================================
2019-01-11 18:02:49 (1254) channeloutput/channeloutput.c:489:universes 0:  Determined range needed 0 - 49597
2019-01-11 18:02:49 (1254) channeloutput/channeloutput.c:475:LOR 1:  Determined range needed 49598 - 49613
2019-01-11 18:02:49 (1254) channeloutput/channeloutput.c:527:Determined range needed 0 - 49615
2019-01-11 18:02:49 (1254) channeloutput/UDPOutput.cpp:191:sendmmsg() failed for UDP output (output count: -1/97   time: 0 ms) with error: 22   Invalid argument

I'm wondering if this is fppd starting up before the networking is fully up.  I think Dan was looking into something similar in another thread.  How comfortable are you with the command line?  We could try a test and give you a command to add to a file to force fppd startup to wait a few seconds to make sure the network has some time to spin up.


No issue with command line.  Fire away...

Offline JSOrange97

  • Newbie
  • *
  • Join Date: Dec 2015
  • Location:
  • Posts: 27
  • Kudos: 0
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #22 on: January 14, 2019, 03:43:47 PM »
The sendmmsg() errors started right away as soon as fppd started, so it couldn't contact that controllers for some reason.

Code: [Select]
2019-01-11 18:02:48 (1204) log.c:220:=========================================
2019-01-11 18:02:48 (1204) log.c:221:FPP 2.x-126-g65152480
2019-01-11 18:02:48 (1204) log.c:222:Branch: master
2019-01-11 18:02:48 (1204) log.c:223:=========================================
2019-01-11 18:02:49 (1254) channeloutput/channeloutput.c:489:universes 0:  Determined range needed 0 - 49597
2019-01-11 18:02:49 (1254) channeloutput/channeloutput.c:475:LOR 1:  Determined range needed 49598 - 49613
2019-01-11 18:02:49 (1254) channeloutput/channeloutput.c:527:Determined range needed 0 - 49615
2019-01-11 18:02:49 (1254) channeloutput/UDPOutput.cpp:191:sendmmsg() failed for UDP output (output count: -1/97   time: 0 ms) with error: 22   Invalid argument

I'm wondering if this is fppd starting up before the networking is fully up.  I think Dan was looking into something similar in another thread.  How comfortable are you with the command line?  We could try a test and give you a command to add to a file to force fppd startup to wait a few seconds to make sure the network has some time to spin up.


No issue with command line.  Fire away...


BTW - you can also assume I know how to use vi and Linux command line stuff - don't need to get too crazy specific on the step-by-step.

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #23 on: January 14, 2019, 04:06:14 PM »
No issue with command line.  Fire away...

OK.  SSH into the Pi.  You can do this via ssh on your system or via the ssh web client under the 'Help' menu.  Login with as the 'fpp' user with password 'falcon'.

Once logged in, run "sudo nano /opt/fpp/scripts/fpp_boot"

Scroll down to the bottom of the file and above the "fppd_start" line, add a new line that says "sleep 5".  That will make the script pause for 5 seconds before starting fppd.

Hit CTRL-X to save, hit 'Y' for yes, hit ENTER to use the current filename.  Then you can type 'exit' to exit and reboot the Pi via the web browser.

EDIT: I sent this before seeing your other message about vi.  So while I didn't get too detailed, it evidently was still more than you needed. :)

Offline JSOrange97

  • Newbie
  • *
  • Join Date: Dec 2015
  • Location:
  • Posts: 27
  • Kudos: 0
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #24 on: January 14, 2019, 04:24:27 PM »
No issue with command line.  Fire away...

OK.  SSH into the Pi.  You can do this via ssh on your system or via the ssh web client under the 'Help' menu.  Login with as the 'fpp' user with password 'falcon'.

Once logged in, run "sudo nano /opt/fpp/scripts/fpp_boot"

Scroll down to the bottom of the file and above the "fppd_start" line, add a new line that says "sleep 5".  That will make the script pause for 5 seconds before starting fppd.

Hit CTRL-X to save, hit 'Y' for yes, hit ENTER to use the current filename.  Then you can type 'exit' to exit and reboot the Pi via the web browser.

EDIT: I sent this before seeing your other message about vi.  So while I didn't get too detailed, it evidently was still more than you needed. :)


Made the edit.  4x reboots and one "cold start" with good behavior.  Needs more testing, but it looks like you may be onto something with this network timing issue. 

Offline pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 1,430
  • Kudos: 45
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #25 on: January 14, 2019, 04:31:28 PM »
Made the edit.  4x reboots and one "cold start" with good behavior.  Needs more testing, but it looks like you may be onto something with this network timing issue.


Not to hi-jack anything The Captain wants you to do next.... but if it were me, I'd start trying shorter SLEEP times (4,3,2,1).  1 second may be plenty but won't know unless you try  ;)
-Mark

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #26 on: January 14, 2019, 05:07:26 PM »
Checking shorter would be good.  I think this is the same we saw in another forum thread and Dan commented about the fact that we might have to slow down the startup a bit by inserting a sleep.

Im thinking that 1 second is probably good enough and little enough not to notice.  :)

If you can test, I would start with 1 and go up if needed.

Offline JSOrange97

  • Newbie
  • *
  • Join Date: Dec 2015
  • Location:
  • Posts: 27
  • Kudos: 0
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #27 on: January 14, 2019, 06:00:57 PM »
Checking shorter would be good.  I think this is the same we saw in another forum thread and Dan commented about the fact that we might have to slow down the startup a bit by inserting a sleep.

Im thinking that 1 second is probably good enough and little enough not to notice.  :)

If you can test, I would start with 1 and go up if needed.
Sure - i can try a 1 second delay.  If that works maybe we can try iterations of usleep   ;)

Online dkulp

  • Moderator
  • *****
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 1,688
  • Kudos: 96
    • KulpLights.com
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #28 on: January 14, 2019, 06:09:04 PM »
This likely needs to be a "Startup Delay" setting of some sort...   I have seen routers and such take quite a while to startup.   Heck, my cable modem takes almost 2 minutes to boot up.  If both the Pi and the router are powered on at the same time, it can easily be a while before sending out IGMP requests and such will actually work. 


Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: FPPD running, playlist running but no output until FPPD restart
« Reply #29 on: January 14, 2019, 08:22:50 PM »
I added a Boot Delay setting to the advanced settings page in master.  It defaults to zero seconds.

 

Back to top