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
- 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 OPFails to see how this is discordjs related tho
Only occurs on DJS projects
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.
- 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 | hastebinUnknown User•8mo ago
Message Not Public
Sign In & Join Server To View
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•8mo ago
Message Not Public
Sign In & Join Server To View
Also, have you tried running it without pm2 to see if it works?
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
huhyeah so definitely not a DJS issue
aha, windows wasn't establishing a connection duing boot time before PM2 starts, setting service to auto delayed ensure a connection had been made