-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
running in background #17
Comments
Thanks for the report. This makes sense because there is nothing to read from in background mode. I'll have to add something to detect if we're running in such a situation. In the meantime a fix would be to use screen or tmux. |
screen is working great. thx for the workaround and of course for mjpeg-relay ;) |
I'm trying to run this as a background service but nothing I try will keep it running for more than maybe 15 minutes at a time. Running it as a systemd service results in systemd restarting it repeatedly until the restart limit is reached, then systemd says that it failed, with "Main process exited, code=exited, status=1". If I try simply running the Python script on the command line (within screen), it works fine for a while but eventually ends up exiting with no indication of why (following is with debug mode enabled):
This is with mjpeg-relay connecting to a Raspberry Pi running mjpg-streamer, which I suspect will be the standard way for anyone to be getting a mjpeg stream from a Pi. I'll have both ZoneMinder and a Chrome browser connected as clients for mjpeg-relay, although the Chrome connection tends to be closed by the time that mjpeg-relay exits. Any ideas? Thanks :) |
It needs stdin stream... Else it will crash... |
I can´t run it in background.
If I do with nohup python relay.py "http://user:pwd" &@ip..." & I get "'nohup python relay.py -d "http:…' has stopped" and in nohup.out the following:
Traceback (most recent call last):
File "relay.py", line 82, in
while raw_input() != "quit":
IOError: [Errno 9] Bad file descriptor
The text was updated successfully, but these errors were encountered: