Back

Error: connect ECONNREFUSED 127.0.0.1:80

  • 0
  • Self Hosted
  • Web
m0hsin_
2 Feb, 2024, 14:11

I am creating a cloud function with my local instance of Appwrite, now when I try to instantiate the client within the function using the url(http://localhost/v1 or http://127.0.0.1) I get the following error:

Error: connect ECONNREFUSED 127.0.0.1:80 at Client.call (/usr/local/server/src/function/node_modules/node-appwrite/lib/client.js:180:23) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Databases.updateDocument (/usr/local/server/src/function/node_modules/node-appwrite/lib/services/databases.js:1772:16) at async Module.default (file:///usr/local/server/src/function/index.js:15:26) at async execute (/usr/local/server/src/server.js:141:22) at async /usr/local/server/src/server.js:158:13

Anyone know how I can ressolve this?

TL;DR
Error: connect ECONNREFUSED 127.0.0.1:80 when instantiating client within a cloud function using local instance of Appwrite. Solution: Use the private IP address instead of localhost or 127.0.0.1 when using local instances of Appwrite.
m0hsin_
2 Feb, 2024, 14:15

Ok, managed to figure it out. We should use the private IP address when using local instances of Appwrite

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more