LewdHuTao / MusicBot

Yet another Discord Music Bot using Discord.js v14 and Lavalink v4
ISC License
12 stars 3 forks source link

error on make start #3

Closed szentigrad3 closed 1 month ago

szentigrad3 commented 1 month ago

Screenshot_20240911_172118

LewdHuTao commented 1 month ago

fix your docker. check if your docker is running

szentigrad3 commented 1 month ago

fix your docker. check if your docker is running

docker is running

LewdHuTao commented 1 month ago

fix your docker. check if your docker is running

docker is running

https://wpsandbox.net/devops/fix-dockerexception-error-while-fetching-server-api-version-httpconnection-request-got-an-unexpected-keyword-argument-chunked-p1016

^^ i do some search and found that article. it might be an issue with your docker-compose

szentigrad3 commented 1 month ago

fix your docker. check if your docker is running

docker is running

https://wpsandbox.net/devops/fix-dockerexception-error-while-fetching-server-api-version-httpconnection-request-got-an-unexpected-keyword-argument-chunked-p1016

^^ i do some search and found that article. it might be an issue with your docker-compose

e.g. docker compose and not like you used to docker-compose (dash separated).

New Command

docker compose ....

szentigrad3 commented 1 month ago

Screenshot_20240911_181126

LewdHuTao commented 1 month ago

Screenshot_20240911_181126

run make stop and run make start again. this usually happened because lavalink take long time to boot up

szentigrad3 commented 1 month ago

Screenshot_20240911_181126

run make stop and run make start again. this usually happened because lavalink take long time to boot up

didn't work tried multiple times

LewdHuTao commented 1 month ago

did you make any changes on application.yml? like changing the lavalink password ?

szentigrad3 commented 1 month ago

did you make any changes on application.yml? like changing the lavalink password ?

no changes

LewdHuTao commented 1 month ago

hm thats weird. mine just work fine. can you run the bot without lavalink using make start-noll and host the lavalink seperately. I will try to fix docker-compose settings later

image

LewdHuTao commented 1 month ago

Oh anyway here are my docker and docker-compose version

image

szentigrad3 commented 1 month ago

Oh anyway here are my docker and docker-compose version

image

Screenshot_20240911_214519

LewdHuTao commented 1 month ago

can you try change the settings on docker-compose.yml?

healthcheck:
      test: 'curl -H "Authorization: youshallnotpass" -s http://localhost:2333/version || exit 1'
      interval: 10s
      timeout: 10s
      retries: 3
      start_period: 120s # Delay before starting checks

change retries: 5 and start_period: 10s and after that you run make stop and make start

szentigrad3 commented 1 month ago

can you try change the settings on docker-compose.yml?

healthcheck:
      test: 'curl -H "Authorization: youshallnotpass" -s http://localhost:2333/version || exit 1'
      interval: 10s
      timeout: 10s
      retries: 3
      start_period: 120s # Delay before starting checks

change retries: 5 and start_period: 10s and after that you run make stop and make start

yaml: line 15: did not find expected key

LewdHuTao commented 1 month ago

uhh nvm just copy this and paste it to your docker-compose.yml. remember you need to remove existing docker container and make sure there is no lavalink running on port 2333

services:
  lavalink:
    container_name: lavalink
    image: ghcr.io/lavalink-devs/lavalink
    restart: on-failure
    hostname: docker.lavalink
    volumes:
      - ./lavalink/application.yml:/opt/Lavalink/application.yml
      - ./lavalink/plugins:/opt/Lavalink/plugins
    healthcheck:
      test: 'curl -H "Authorization: youshallnotpass" -s http://localhost:2333/version || exit 1'
      interval: 10s
      timeout: 10s
      retries: 5
      start_period: 10s # Delay before starting checks
    ports:
      - "2333:2333" # Expose port for other containers or external access if needed

  musicbot:
    container_name: musicbot
    build:
      context: .
      target: musicbot
    ports:
      - "3000:3000" # Not required
    volumes:
      - ./src:/app/src # Mount code directory
    environment:
      - NODE_ENV=production # Set your environment variables if needed
    restart: unless-stopped
    depends_on:
      lavalink:
        condition: service_healthy
szentigrad3 commented 1 month ago

uhh nvm just copy this and paste it to your docker-compose.yml. remember you need to remove existing docker container and make sure there is no lavalink running on port 2333

services:
  lavalink:
    container_name: lavalink
    image: ghcr.io/lavalink-devs/lavalink
    restart: on-failure
    hostname: docker.lavalink
    volumes:
      - ./lavalink/application.yml:/opt/Lavalink/application.yml
      - ./lavalink/plugins:/opt/Lavalink/plugins
    healthcheck:
      test: 'curl -H "Authorization: youshallnotpass" -s http://localhost:2333/version || exit 1'
      interval: 10s
      timeout: 10s
      retries: 5
      start_period: 10s # Delay before starting checks
    ports:
      - "2333:2333" # Expose port for other containers or external access if needed

  musicbot:
    container_name: musicbot
    build:
      context: .
      target: musicbot
    ports:
      - "3000:3000" # Not required
    volumes:
      - ./src:/app/src # Mount code directory
    environment:
      - NODE_ENV=production # Set your environment variables if needed
    restart: unless-stopped
    depends_on:
      lavalink:
        condition: service_healthy

i have noticed this ✔ lavalink 8 layers [⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled also same problem

LewdHuTao commented 1 month ago

is the lavalink container running now? if not can you try check the logs using docker logs lavalink

szentigrad3 commented 1 month ago

is the lavalink container running now? if not can you try check the logs using docker logs lavalink

Screenshot_20240911_221014

LewdHuTao commented 1 month ago

ah no wonder docker do not have enough permissions to create plugins folder for lavalink

LewdHuTao commented 1 month ago

you need to set permissions 777 to music bot folder

szentigrad3 commented 1 month ago

you need to set permissions 777 to music bot folder

woot loaded now

LewdHuTao commented 1 month ago

i cant really understand what you trying to say right now

szentigrad3 commented 1 month ago

its working

LewdHuTao commented 1 month ago

alright good to hear that, ill close this issue and feel free to reopen if you have any issues :D