Docker ports on GCP & AWS
I recently dockerized my bot and have it running fine off my local machine, however when deploying it the bot hangs on when the client tries to login. I found a post mentioning that certain ports on GCP and AWS needed to be exposed but they didnt mention which.
Anyone run into a similar issue with docker and those hosts?
Turns out it actually is logging in, it just isn't recieving the slash commands. I have tried exposing ports 80 and 443 but no luck with those.
6 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!Logs in but I haven’t checked if ready is firing. Deployed it to digital ocean last night and seemed to work fine. So appears to be isolated to GCP VMs
So upon looking into this, I am getting the token returned from the login method, but no the ready event is not firing
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 | hastebinWill have to keep an eye on it with these logs running, I recently moved the container to digital ocean which seemed to have fixed the issue. However it does seem to happen intermittently
Here is the log when it stops responding to events, the ready event also does not fire as well but everything else logs wise looks healthy (to me). Does anything stand out that could be an issue?
Unknown User•14mo ago
Message Not Public
Sign In & Join Server To View
The ready isnt actually firing even once, I put a console log in the event handler that does go off the few times everything has fired up and worked, but the ready event log isnt actually included in this log. This is just the debug and warn evens being logged along with a few other logs from my script.
I believe I have narrowed down the cause. It seem to work when I build the image locally, push it to dockerhub and then pull it to my remote VM and run it. The point of failure is when I build it in a gitub action and then push to dockerhub. But its the same command so I am really unsure what the difference is that could be causing events to fail just from building the same exact image on gibhub vs local.
the job that pulls depends on the job that builds and pushes
Does anyone know if the gateway events require any ports besides 80 or 443?