Ask coding questions

← Back to all posts
Lavalink cant connect to localhost
h
Primefirst (0)

Hi,

Does someone know why lavalink wont connect to the ost 127.0.0.1:2333. I've done the command java -jar Lavalink.jar and it works fine except when i start the bot it says that it couldnt connect to the host

Comments
hotnewtop
Korbindev (142)

try to connect to 8080 or 8000 or 5000

Primefirst (0)

@Korbindev

ok so i found out why it didnt play, but when i close the browser it stops playing due to it not connecting to the host. I tried with the ports u said and it still does not work.

ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 8080)

DillonB07 (61)

That is a local domain. If lavalink is an external service, it can't connect to the local domain you specified(127.0.0.1:2333)

Primefirst (0)

@DillonB07

Hi the thing is that it works fine on my pc and on other webhosts except replit

DillonB07 (61)

@Primefirst Could you invite me, or make the repl public?
I can't really help any more unless I can see the code and logs to see what's going on.

Primefirst (0)

@DillonB07
hi didnt see ur message. yea i can make it public rn

DillonB07 (61)

@Primefirst Could you tell me whereabouts your LavaLink code is please (file/lines)?

Primefirst (0)

@DillonB07 I figured out why it happened, but for some reason my bot wont play music or anything rn. It says that it found the song, but it just doesnt play it