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!
Nu găsiți un film sau un serial? Autentificați-vă pentru a-l crea.
Doriți să evaluați sau să adăugați acest articol într-o listă?
Nu sunteți membru?
Răspuns de robbie3999
pe data de 8 septembrie 2023 la ora 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.
Răspuns de pepper_head
pe data de 8 septembrie 2023 la ora 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.
Răspuns de robbie3999
pe data de 8 septembrie 2023 la ora 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.