Back

Dart function fails to build

  • 0
  • Self Hosted
  • Functions
darkmess
6 Dec, 2023, 09:28

I'm self hosting, and building dart functions fails even though the server connection is fine. I'm able to ping pub.dev

TL;DR
Title: Dart function fails to build TL;DR: To fix the issue, update the Docker configuration file and restart Docker. Also, update the runtime network configuration in appwrite's docker-compose.yml file. This issue is likely related to IPv6. Solution: 1. Edit /etc/docker/daemon.json file to include the following values: ``` { "ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64", "experimental": true, "ip6tables": true } ``` 2. Restart Docker using the command: sudo systemctl
Drake
6 Dec, 2023, 09:47

any chance you can try making a curl from inside the runtime container?

darkmess
6 Dec, 2023, 10:11
darkmess
6 Dec, 2023, 11:12

It seems to be related with ipv6. I assigned an ipv4 address to my server and it started working, I removed the ipv4 address and it started failing again

Drake
6 Dec, 2023, 11:13

Whoa weird...I've definitely seen disabling ipv6 as the solution to a lot of network related problems πŸ˜…

darkmess
6 Dec, 2023, 11:19

Unfortunately in my case I need to run appwrite in ipv6 only servers

darkmess
6 Dec, 2023, 11:20

Is this worth opening an issue about? No idea if it's an appwrite or docker problem

Drake
6 Dec, 2023, 12:53

I'm leaning towards it being a docker problem. Maybe you need to configure something more? I don't know much about ipv6

Drake
6 Dec, 2023, 12:54

If you spin up a dart container, does it have this problem too?

darkmess
7 Dec, 2023, 11:15

Yes

darkmess
7 Dec, 2023, 11:16

Looks like docker needs additional configuration for containers to work with ipv6

darkmess
8 Dec, 2023, 08:30

to anyone that comes across this problem in the future, here's how to fix it

edit /etc/docker/daemon.json to contain these values

TypeScript
  "ipv6": true,
  "fixed-cidr-v6": "2001:db8:1::/64",
  "experimental": true,
  "ip6tables": true
}```

restart docker `sudo systemctl restart docker`

edit appwrite's `docker-compose.yml` runtimes network to this

```runtimes:
    name: runtimes
    enable_ipv6: true
     ipam:
       config:
         - subnet: 2001:0DB8::/112```
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