segfault16 / modular-led-controller-workstation

:musical_note: :rainbow: Real-time LED strip music visualization using Python and the ESP8266 or Raspberry Pi
MIT License
23 stars 9 forks source link

FadeCandy Server error. Address already in use. #98

Open fruechtegott opened 5 years ago

fruechtegott commented 5 years ago

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
segfault16 commented 5 years ago

@fruechtegott That's a lot of proxying ;)

fruechtegott commented 5 years ago

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

ChasonDeshotel commented 5 years ago

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

segfault16 commented 5 years ago

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

segfault16 commented 5 years ago

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

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?

ChasonDeshotel commented 5 years ago

@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

segfault16 commented 4 years ago

Is this still a issue?

fruechtegott commented 4 years ago

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.