PhasecoreX / docker-red-discordbot

The newest Red-Discordbot in a convenient container

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Audio cog stop accepting new songs at some point

Axiol opened this issue · comments

Describe the bug
First of all, I know this is probably not an issue with the Docker image itself. But I prefer to ask just to be sure.

So, if I run some <p>play URL, the bot connects to the vocal channel and starts playing the music. But at some point, it will stop accepting new song and return this error :

Lavalink API returned an unsupported response, Please report it.Query: http://localhost:2333/loadtracks?identifier=https%3A//www.youtube.com/watch%3Fv%3DyzC4hFK5P3g{'timestamp': '2020-04-18T21:34:55.691+0000', 'status': 503, 'error': 'Service Unavailable', 'message': 'Service Unavailable', 'path': '/loadtracks', 'query': 'https://www.youtube.com/watch?v=yzC4hFK5P3g', 'encodedquery': 'http://localhost:2333/loadtracks?identifier=https%3A//www.youtube.com/watch%3Fv%3DyzC4hFK5P3g', 'loadType': <LoadType.LOAD_FAILED: 'LOAD_FAILED'>}Query: http://localhost:2333/loadtracks?identifier=https%3A//www.youtube.com/watch%3Fv%3DyzC4hFK5P3g{'timestamp': '2020-04-18T21:40:43.726+0000', 'status': 503, 'error': 'Service Unavailable', 'message': 'Service Unavailable', 'path': '/loadtracks', 'query': 'https://www.youtube.com/watch?v=yzC4hFK5P3g', 'encodedquery': 'http://localhost:2333/loadtracks?identifier=https%3A//www.youtube.com/watch%3Fv%3DyzC4hFK5P3g', 'loadType': <LoadType.LOAD_FAILED: 'LOAD_FAILED'>}

But if I run a <p>reload audio, it'll start working again after. It is not linked to the number of songs. Seems more like the process having an issue if there's not request for a bit.

Run command

docker run -d --name patricio -v "$(pwd)/red:/data" -e TOKEN=<TOKEN> -e PREFIX="pat." -e TZ="Europe/Brussels" phasecorex/red-discordbot

Environment info:
Raspbian on a Raspberry Pi 3

Based on the Lavalink issue you opened, it looks like a timeout error when trying to fetch the next song to play. The interesting part is that it is an SSLException for the timeout, which means that Lavalink was able to connect to YouTube (so the network is working still), but when it tried to setup the SSL encryption (for https), that's what timed out.

For that fact, and for the fact that earlier songs do work, leads me to believe that it's not an issue with this image. Couple of thoughts on what could be causing it:

  • If you're using wifi, know that Raspberry Pi 3's wifi isn't the greatest
  • Maybe your network is being slow?
  • Maybe YouTube is being weird at the moment?

Sorry, maybe that wasn't much help, but that's all I got at the moment. I'm going to leave this open for now, as I want to have my bot play a long playlist of YouTube videos and see if it's reliable.

No problem, like I said, I was pretty sure the image was not at fault here. The Pi is cabled and everything else on the network works fine when it happens. So maybe that's indeed YT which is acting weird for the moment. We'll see, thanks.

Yeah, I was able to play a playlist of 30 and another playlist of 50, and it didn't stop playing at any point. I'll close this for now, and if anything comes back up, feel free to open it again!

Just noticed this as I was looking for something else, and I've notice this issue just today.

I've had two time I've reloaded audio after restarting the bot due to music not starting.

For me it seems to be reproducible when restarting the bot.

I did some more testing restarting the bot and starting a song and it seems to work every time. Do you have any logs from the container or lavalink? Do note that it takes a bit of time for lavalink to start before the command will go through. Though the bot will say that it hasn't established a connection with lavalink at that point.

Sorry, I didn't end up responding to this. I'm not sure if it's lavalink or not, but that's probably what I'm seeing when I restart it.

I don't mind the issue being closed though. I'll keep and eye on things and let you know if I learn more.