Closed moodzunl closed 2 months ago
make sure your lavalink info is correct in your settings.json
I'm using the default values for lavalink provided from the docker-compose file and from the settings.json and these seems good, should these be different?
I think you have to change the lavalink host from 127.0.0.1 to local in settings.json, which is the network name in docker compose
Can you share your docker-compose.yml? Lavalink and Vocard containers should be working in the same virtual network.
This is how my docker-compose.yml looks like:
version: "3.8"
services:
lavalink:
image: ghcr.io/lavalink-devs/lavalink:latest
container_name: lavalink
restart: unless-stopped
environment:
- _JAVA_OPTIONS=-Xmx1G
- SERVER_PORT=2333
volumes:
- ./application.yml:/opt/Lavalink/application.yml
networks:
- local
expose:
- "2333"
# mongo:
# image: mongo:latest
# container_name: mongo
# restart: unless-stopped
# volumes:
# - ./data/mongo/db:/data/db
# - ./data/mongo/conf:/data/configdb
# environment:
# - MONGO_INITDB_ROOT_USERNAME=admin
# - MONGO_INITDB_ROOT_PASSWORD=admin
# expose:
# - "27017"
# networks:
# - local
# command: ["mongod", "--oplogSize=1024", "--wiredTigerCacheSizeGB=1", "--auth", "--noscripting"]
vocard:
image: vocard
container_name: vocard
build:
dockerfile: ./Dockerfile
volumes:
- ./settings.json:/app/settings.json
- ./.env:/app/.env
depends_on:
lavalink:
condition: service_started
# mongo:
# condition: service_started
networks:
- local
networks:
local:
name: local
Same configs as default values, could this be because I don't have the GENIUS_TOKEN available?
Tried with 127.0.0.1
and local
as host value in settings.json, same output. Docker compose up connects to MongoDB succesfully and connects to discord API correctly but it's still unable to find Nodes.
Also tried setting enviroment variables as this:
environment:
- TOKEN=...
- CLIENT_ID=...
- CLIENT_SECRET_ID=...
- SERCET_KEY=...
- BUG_REPORT_CHANNEL_ID=...
- SPOTIFY_CLIENT_ID=...
- SPOTIFY_CLIENT_SECRET=...
- GENIUS_TOKEN=...
- MONGODB_URL=...
- MONGODB_NAME=...
But still unable to run it.
Tried with
127.0.0.1
andlocal
as host value in settings.json, same output. Docker compose up connects to MongoDB succesfully and connects to discord API correctly but it's still unable to find Nodes.Also tried setting enviroment variables as this:
environment: - TOKEN=... - CLIENT_ID=... - CLIENT_SECRET_ID=... - SERCET_KEY=... - BUG_REPORT_CHANNEL_ID=... - SPOTIFY_CLIENT_ID=... - SPOTIFY_CLIENT_SECRET=... - GENIUS_TOKEN=... - MONGODB_URL=... - MONGODB_NAME=...
But still unable to run it.
Sorry my bad, try change the Lavalink host from 127.0.0.1 to lavalink in settings.json
Thanks, I was just doing that and I got a new error and I was finally able to establish connection with the server. About to publish it as an alternative.
I got this as an output
Node DEFAULT is not able to connect! - Reason: The password for node 'DEFAULT' is invalid.
Used the default pass youshallnotpass
as password inside the settings.json, but still the same error.
However after searching in Lavalink Docs I could see there's a LAVALINK_SERVER_PASSWORD
env var. Trying to use this and replacing the password in the settings.json to see if this finally fixes it.
Changes looks like this:
# docker-compose.yml
lavalink:
image: ghcr.io/lavalink-devs/lavalink:latest
container_name: lavalink
restart: unless-stopped
environment:
- _JAVA_OPTIONS=-Xmx1G
- SERVER_PORT=2333
- LAVALINK_SERVER_PASSWORD=youshallnotpass
volumes:
- ./application.yml:/opt/Lavalink/application.yml
networks:
- local
expose:
- "2333"
// settings.json
"nodes": {
"DEFAULT": {
"host": "lavalink",
"port": 2333,
"password": "youshallnotpass",
"secure": false,
"identifier": "DEFAULT"
}
},
(This might take time, I've doing docker pull lavalink image for the past 15 mins)
you have to create a application.yml file in the vocard root directory.
Application.yml is not necessary if we define the:
- LAVALINK_SERVER_PASSWORD=youshallnotpass
Bot succesfully deployed now, maybe you can integrate that for making it more simpler and only running docker compose up.
Thanks!
yea, thank you for your advice.
This is something I was looking for before but found it today 🥲
Trying to set up the bot with docker compose up. But this fails.
After setting everything up - and waiting for lavalink successfull response this pops up:
Node DEFAULT is not able to connect! - Reason: The connection to node 'DEFAULT' failed.
I tried re-running the vocard container after seeing in logs from lavalink showing up that it was ready for receiving collections, but still nothing.
Running this in a windows enviroment with docker desktop with latest version.