modular-led-controller-workstation icon indicating copy to clipboard operation
modular-led-controller-workstation copied to clipboard

FadeCandy Server error. Address already in use.

Open fruechtegott opened this issue 6 years ago • 8 comments

When using the panel simulation setup: Audio processing and effect generating on Mac via FadeCandy-> Raspberry Pi with Proxy Effect via FadeCandy-> Screen with gl server If an error occurs on Mac, the visual output freezes and cant be unfrozen. Restarting server.py (Mac and Raspberry Pi) does not help. Raspberry Pi has to be rebooted. Looks like some connection isn't terminated correctly. Bildschirmfoto 2019-04-21 um 22 03 19

fruechtegott avatar Apr 21 '19 20:04 fruechtegott

@fruechtegott That's a lot of proxying ;)

segfault16 avatar Apr 22 '19 06:04 segfault16

MODULAR! aka I can do whatever I want. Any idea how to solve this, @segfault16?

fruechtegott avatar Apr 23 '19 16:04 fruechtegott

I run into this fairly often, I find that the script crashes but server.py stays running in the background (weird because I invoke it via python3 server.py from the command line, I'm guessing it has to do with threading).

My "fix" is to ps -A |grep server.py, find the orphaned process, then kill -s 9 <PID> and re-launch the script

I haven't had time to turn on debugging and actually find out what's causing the initial crash

ChasonDeshotel avatar Apr 24 '19 00:04 ChasonDeshotel

@ChasonDeshotel can you maybe raise an issue for the crashes?

segfault16 avatar Apr 25 '19 03:04 segfault16

@fruechtegott I've tried to reproduce this without success:

  • Terminal 1: python3 server.py --no_store --no_conf -D FadeCandy --device_candy_server=localhost:7890
  • Open UI, configure proxy listening on port 7891
  • Terminal 2: Run gl_server
  • Terminal 3: python3 server.py --no_store --no_conf -D FadeCandy --device_candy_server=localhost:7891 -p 5001 (-p as a new argument to alter the port of the webUI, see #99)

I can kill server.py of Terminal 3 in any way, after starting it the visual output appears again on gl_server. So the proxy in Terminal 1 seems to be able to handle the closed connections (basically it shouldn't be necessary to restart that if a client crashes or disconnects). Also, how do you run/restart your proxying server? From terminal or via systemctl?

segfault16 avatar Apr 25 '19 03:04 segfault16

@segfault16 - I will. I made a fork for using APA102 LEDs via UDP to an ESP8266, similar to the audio-reactive-led-strip project this was forked from (but without the 256 pixel limit)

I'll have that code cleaned up over the next few days and submit a pull request, I'm pretty sure nothing I did is causing crashes, but I did want to verify the errors aren't from my code changes before submitting an issue

ChasonDeshotel avatar Apr 25 '19 20:04 ChasonDeshotel

Is this still a issue?

segfault16 avatar Apr 22 '20 03:04 segfault16

Yes. Appears when the process gets not terminated correctly. Manually killing works. My suggestion is to add the killing command to the documentation and close.

fruechtegott avatar Apr 22 '20 07:04 fruechtegott