[SOLVED] How to properly setup Appwrite on localhost for cloud functions ?
- 3
- Resolved
- Functions
Function failed in Appwrite Console due to timeout and in logs it's connection refused
Okay. It's connection refused
yep
[Error] Type: Exception [Error] Message: An internal curl error has occurred within the executor! Error Msg: Connection refused [Error] File: /usr/src/code/app/executor.php [Error] Line: 541
in appwrite/appwrite:1.2.1 "executor" container logs
Can you try exec'ing into the runtime container and running
curl -H "X-Internal-Challenge: secret-key" -H "Content-Type: application/json" -X POST http://localhost:3000/ -d '{"payload":"{}"}'`
you mean docker exec -it 3cbb50225f46 /bin/sh and execute your command ?
That's expected because we don't know the internal challenge but at least we can connect to it.
What's the name of the folder your docker-compose.yml is in?
project_dir/appwrite/deployment/
not sure it's matter, because on VM with domain name + ssl everything works fine and this issue is only appears on localhost....
Can you (docker) inspect the runtime container and the executor containers and look to see what docker networks they're in?
yeah, networks in docker were messed up. Sorry for bothering π¦
No worries. So problem is resolved now?
With template function, yes. Now I'm trying to understand what value should I use for APPWRITE_FUNCTION_ENDPOINT to be able to set-up Appwrite client in function
using http://192.168.0.143/v1 or either http://localhost/v1
If you're on a local machine, you typically use your LAN IP. I've also gotten host.docker.internal to work too
I'l try host.docker.internal
host.docker.internal - works perfect. Thanks π
[SOLVED] How to properly setup Appwrite on localhost for cloud functions ?
Recommended threads
- MongoDb Database Breaks integer[] & bigi...
I've got a table with the below column created. When I try to insert the value `[-3408048000]` into it, the dart sdk cloud function call is successful (no error...
- Appwrite Functions cold start
Hello. I'm seeing really long cold starts on Appwrite Cloud Functions and wanted to know if this is expected. My function just authenticates the user, fetches ...
- Error can not create `tablesdb` event wi...
When i'm trying to add an event with `tablesdb` i get an error message My event value: `tablesdb.mtg-decklist-dev.tables.queue_parsing.rows.*.create` Same err...