I have mopidy running on a Pi, playing Spotify playlists in response to external input. When I select a playlist I issue these commands:
mpc -q clear
mpc -q add spotify:...
mpc -q play
While stress testing the system, I run the above commands, waiting for each to finish, every 2 seconds and let it go for a while.
It starts off working perfectly with no issues at all. Inevitably, after about 450-500 iterations (about a half an hour), the following happens:
- First, the “add” command starts failing. It prints “error: Timeout” after a delay and returns 1. “clear” and “play” still succeed.
- After that happens 10 times, all three commands start failing. They print “error: Connection closed by the server” and return 1.
- At this point it is permanently broken.
service mopidy stop
hangs. The only way to make it work again iskillall -s 9 mopidy ; service mopidy restart
.
This happens in 100% of tests. It is consistent. The system is meant to run continuously, so this is a problem.
None of the logs seem to show anything useful. At the time it fails (lines marked with #
are comments added by me for this post, not present in logs):
/var/log/mopidy/mopidy.log:
# lots of these while everything is working:
2016-11-06 02:07:01,514 INFO [6052:MpdSession-741] mopidy.mpd.session: New MPD connection from [::1]:46036
2016-11-06 02:07:33,579 INFO [6052:MpdSession-742] mopidy.mpd.session: New MPD connection from [::1]:46038
2016-11-06 02:07:33,610 INFO [6052:MpdSession-743] mopidy.mpd.session: New MPD connection from [::1]:46040
2016-11-06 02:08:03,672 INFO [6052:MpdSession-744] mopidy.mpd.session: New MPD connection from [::1]:46042
2016-11-06 02:08:35,734 INFO [6052:MpdSession-745] mopidy.mpd.session: New MPD connection from [::1]:46044
2016-11-06 02:08:35,769 INFO [6052:MpdSession-746] mopidy.mpd.session: New MPD connection from [::1]:46046
2016-11-06 02:09:05,826 INFO [6052:MpdSession-747] mopidy.mpd.session: New MPD connection from [::1]:46048
# then it just changes to this at the point where it stops:
2016-11-06 02:09:37,857 WARNING [6052:MainThread] mopidy.internal.network: Rejected connection from [::1]:46050
2016-11-06 02:09:37,878 WARNING [6052:MainThread] mopidy.internal.network: Rejected connection from [::1]:46052
2016-11-06 02:09:37,900 WARNING [6052:MainThread] mopidy.internal.network: Rejected connection from [::1]:46054
2016-11-06 02:09:39,923 WARNING [6052:MainThread] mopidy.internal.network: Rejected connection from [::1]:46056
2016-11-06 02:09:39,944 WARNING [6052:MainThread] mopidy.internal.network: Rejected connection from [::1]:46058
2016-11-06 02:09:39,964 WARNING [6052:MainThread] mopidy.internal.network: Rejected connection from [::1]:46060
/var/log/syslog
# same deal as mopidy.log. works fine:
Nov 6 02:08:03 hostname mopidy[6052]: INFO New MPD connection from [::1]:46042
Nov 6 02:08:35 hostname mopidy[6052]: INFO New MPD connection from [::1]:46044
Nov 6 02:08:35 hostname mopidy[6052]: INFO New MPD connection from [::1]:46046
Nov 6 02:09:05 hostname mopidy[6052]: INFO New MPD connection from [::1]:46048
# then begins failing with no extra info:
Nov 6 02:09:37 hostname mopidy[6052]: WARNING Rejected connection from [::1]:46050
Nov 6 02:09:37 hostname mopidy[6052]: WARNING Rejected connection from [::1]:46052
Nov 6 02:09:37 hostname mopidy[6052]: WARNING Rejected connection from [::1]:46054
Nov 6 02:09:39 hostname mopidy[6052]: WARNING Rejected connection from [::1]:46056
Nov 6 02:09:39 hostname mopidy[6052]: WARNING Rejected connection from [::1]:46058
Nov 6 02:09:39 hostname mopidy[6052]: WARNING Rejected connection from [::1]:46060
Nov 6 02:09:41 hostname mopidy[6052]: WARNING Rejected connection from [::1]:46062
There doesn’t seem to be any info anywhere, it just… stops working forever.
What’s going on?
$ mpc version
mpd version: 0.19.0
I didn’t install or configure mopidy on this Pi, I’m actually taking over this project from somebody else and trying to work out the kinks, so I have to admit to not knowing much about how mopidy is set up. If there’s anything I can do to get more info let me know.
I’m not really sure how else to proceed. When I did a Google search for “mopidy.internal.network: Rejected connection from”, there was exactly one result (a rarity these days), and it was not related to this issue.
Thank you.