PM2 specifically fails to start djs bot, all other projects restart just fine

Only happens on reboot, I have 2 other non djs projects using express which restart just fine on server reboot but my DJS projects, 2 bots, Fail to do so, they appear online in PM2 but the logs are empty, a pm2 restart gets them out of this state and running
11 Replies
d.js toolkit
d.js toolkit9mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
NyR
NyR9mo ago
Fails to see how this is discordjs related tho
CrackedPotato
CrackedPotatoOP9mo ago
Only occurs on DJS projects
d.js docs
d.js docs9mo ago
Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.
client
.on("debug", console.log)
.on("warn", console.log)
client
.on("debug", console.log)
.on("warn", console.log)
- Note: if you initialize your Client as bot or other identifiers you need to use these instead of client - If the output is too long to post consider using a bin instead: gist | paste.gg | sourceb.in | hastebin
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
CrackedPotato
CrackedPotatoOP9mo ago
Sorry? i meant after the server reboots, the bot is "online" according to PM2 but the logs are empty and the bot is offline
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
NyR
NyR9mo ago
Also, have you tried running it without pm2 to see if it works?
CrackedPotato
CrackedPotatoOP9mo ago
Ok so i found the error Error: getaddrinfo ENOTFOUND discord.com v seems like the network connection isn't established when pm2 trys to start up huh
sludge
sludge9mo ago
yeah so definitely not a DJS issue
CrackedPotato
CrackedPotatoOP9mo ago
aha, windows wasn't establishing a connection duing boot time before PM2 starts, setting service to auto delayed ensure a connection had been made
Want results from more Discord servers?
Add your server