jagrosh/MusicBot

[Bug Report] Running as a service trough NSSM doesn't work

Closed this issue · 5 comments

Bug Description

image

Steps to Reproduce

Did all the steps from the instuctions

Expected Result

Expected to work

Debug Output

.

Additional Info

No response

Checklist

Do you have Java 11 installed, and is it the default Java version?

Do you have Java 11 installed, and is it the default Java version?
image
And considering the bot works without it being a service i didnt think that could be the issue

Can you type "nssm edit JMusicBot" and show a screenshot from there?

I have searched for similar issues on the issues page

I had the same issue before and found this to be my solution:

chilux00 commented on Oct 29, 2023

  • Run nssm edit JMusicBot to bring up the GUI for editing the service. You should see three editable text fields pop up.
  • For the first field, "Path", set this to the path of your java.exe. This is probably in your program files so you can find it in your C:\ drive.
  • For the second field "Startup Directory", set this to the path of the working directory folder (i.e the folder where your JMusicBot file is), something like C:\Users<User Name>\Documents<Folder Name>
  • For the last field "Arguments", you want to append -jar and set it to the exact path of your music bot .jar file, so something like -jar C:\Users<User Name>\Documents<Folder Name>\JMusicBot-0.3.9.jar. If you've renamed your .jar file, change this accordingly.

#1444 (comment)

Fixed it but don't know exactly which change that i made that fixed it.
I changed to Java 11 from Oracle , and did the nssm edit changes.