Hi TMDB,
I'm having some issues with connecting my Discord bot to the TMDB API. It connects and runs as intended whenever I'm running the bot locally but I'm trying to host it on Cybrancee and API connection keeps getting refused and coming back with the following error:
code: 'ECONNREFUSED',
errors: [ Error: connect ECONNREFUSED ::1:443
at createConnectionError (node:net:1634:14)
at afterConnectMultiple (node:net:1664:40) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 443
I raised a query with Cybrancee but was told that this is a connection problem at your end. Any idea why the connection is being blocked? Thanks!
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by robbie3999
on September 8, 2023 at 12:06 PM
Hi @pepper_head, the address "::1" is the ipv6 local loopback address. Somewhere in your code you are trying to connect to the local system for some reason, and it is not configured properly on the hosting service you are using.
Reply by pepper_head
on September 8, 2023 at 12:53 PM
Hi robbie3999, thanks for getting back to me.
This is the code that is connecting to the API:
});
I haven't configured anything in the code to specifically connect to the local system.
Reply by robbie3999
on September 8, 2023 at 5:09 PM
Well, I'm just reading what the error information shows, its clearly calling out an address and port. Keep in mind that the error may not be coming from the try/catch code you listed. Perhaps someone else will come along and have more ideas.