microsoft / farmvibes-ai

FarmVibes.AI: Multi-Modal GeoSpatial ML Models for Agriculture and Sustainability

Home Page:https://microsoft.github.io/farmvibes-ai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error setting up farmvibes-ai

kirrukirru opened this issue · comments

I am setting up FarmVibes-AI in Ubuntu 20.04 vm. I have following error when running farmvibes-ai local setup

>farmvibes-ai local setup
2023-12-01 08:33:29,508 - INFO    - Setting up local cluster
2023-12-01 08:33:29,572 - INFO    - Checking disk space in /home/user_org_com/.cache/farmvibes-ai
2023-12-01 08:33:29,572 - INFO    - Creating cluster farmvibes-ai-user_org_com
2023-12-01 08:33:29,628 - INFO    - k3d: FATA[0000] Schema Validation failed for config file /tmp/tmphn0fowm7/tmpc6qig15n: - metadata.name: Does not match format 'hostname'
2023-12-01 08:33:29,629 - ERROR   - Unable to run command ['/home/user_org_com/.config/farmvibes-ai/k3d', 'cluster', 'create', '--config', '/tmp/tmphn0fowm7/tmpc6qig15n'].

2023-12-01 08:33:29,630 - ERROR   - farmvibes-ai local failed (Failed to create local cluster with k3d). Please see the above error descriptions. If you think this is an error with the program, please file an issue at https://github.com/microsoft/farmvibes-ai/issues. Please also include the contents of /home/user_org_com/.cache/farmvibes-ai/farmvibes-ai-local.log in your issue.

I don't find the file /tmp/tmphn0fowm7/tmpc6qig15n

The same command runs fine in Ubuntu WSL though..

Hi, @kirrukirru. Thanks for raising this issue.

Please, could you provide the log file /home/user_org_com/.cache/farmvibes-ai/farmvibes-ai-local.log?
Did you install the dependencies prior to setting up the cluster, as recommended by our QuickStart guide?

@rafaspadilha - Thanks for the response.
Yes, the setup instructions were followed. Here is the complete log. Please note I could set it up on WSL2, but not on Ubuntu 20.04 vm (in GCP).

2023-12-12 13:43:12,100 - DEBUG   - Checking dependency dapr
2023-12-12 13:43:12,100 - INFO    - Creating config directory /home/sa_109895067591019570007/.config/farmvibes-ai
2023-12-12 13:43:12,101 - DEBUG   - Dependency dapr found at system level, but is unsupported, trying to install
2023-12-12 13:43:12,292 - INFO    - Downloading dapr from https://github.com/dapr/cli/releases/download/v1.12.0/dapr_linux_amd64.tar.gz
2023-12-12 13:43:12,292 - DEBUG   - Downloading https://github.com/dapr/cli/releases/download/v1.12.0/dapr_linux_amd64.tar.gz to /tmp/tmp4hbadr3b/dapr_linux_amd64.tar.gz
2023-12-12 13:43:12,767 - DEBUG   - Extracting dapr from tar.gz
2023-12-12 13:43:13,348 - DEBUG   - Searching for dapr in /tmp/tmp4hbadr3b
2023-12-12 13:43:13,348 - DEBUG   - Walking /tmp/tmp4hbadr3b with files ['dapr_linux_amd64.tar.gz', 'dapr'] looking for dapr
2023-12-12 13:43:13,348 - DEBUG   - Found dapr. Copying it to /home/sa_109895067591019570007/.config/farmvibes-ai/dapr
2023-12-12 13:43:13,424 - INFO    - Successfully installed dapr to /home/sa_109895067591019570007/.config/farmvibes-ai/dapr
2023-12-12 13:43:13,424 - DEBUG   - Checking dependency docker
2023-12-12 13:43:13,518 - DEBUG   - Dependency docker found at /usr/bin/docker with supported version >= 20.10.0
2023-12-12 13:43:13,518 - DEBUG   - Checking dependency helm
2023-12-12 13:43:13,519 - DEBUG   - Dependency helm found at system level, but is unsupported, trying to install
2023-12-12 13:43:13,716 - INFO    - Downloading helm from https://get.helm.sh/helm-v3.13.2-linux-amd64.tar.gz
2023-12-12 13:43:13,723 - DEBUG   - Downloading https://get.helm.sh/helm-v3.13.2-linux-amd64.tar.gz to /tmp/tmp8nxftwev/helm-v3.13.2-linux-amd64.tar.gz
2023-12-12 13:43:14,302 - DEBUG   - Extracting helm from tar.gz
2023-12-12 13:43:14,698 - DEBUG   - Searching for helm in /tmp/tmp8nxftwev
2023-12-12 13:43:14,698 - DEBUG   - Walking /tmp/tmp8nxftwev with files ['helm-v3.13.2-linux-amd64.tar.gz'] looking for helm
2023-12-12 13:43:14,698 - DEBUG   - Walking /tmp/tmp8nxftwev/linux-amd64 with files ['LICENSE', 'README.md', 'helm'] looking for helm
2023-12-12 13:43:14,698 - DEBUG   - Found helm. Copying it to /home/sa_109895067591019570007/.config/farmvibes-ai/helm
2023-12-12 13:43:14,747 - INFO    - Successfully installed helm to /home/sa_109895067591019570007/.config/farmvibes-ai/helm
2023-12-12 13:43:14,747 - DEBUG   - Checking dependency k3d
2023-12-12 13:43:14,748 - DEBUG   - Dependency k3d found at system level, but is unsupported, trying to install
2023-12-12 13:43:14,927 - INFO    - Downloading k3d from https://github.com/k3d-io/k3d/releases/download/v5.6.0/k3d-linux-amd64
2023-12-12 13:43:14,927 - DEBUG   - Downloading https://github.com/k3d-io/k3d/releases/download/v5.6.0/k3d-linux-amd64 to /tmp/tmp3f1f2il0/k3d-linux-amd64
2023-12-12 13:43:15,265 - INFO    - Successfully installed k3d to /home/sa_109895067591019570007/.config/farmvibes-ai/k3d
2023-12-12 13:43:15,266 - DEBUG   - Checking dependency kubectl
2023-12-12 13:43:15,266 - DEBUG   - Dependency kubectl found at system level, but is unsupported, trying to install
2023-12-12 13:43:15,312 - INFO    - Downloading kubectl from https://storage.googleapis.com/kubernetes-release/release/v1.28.4/bin/linux/amd64/kubectl
2023-12-12 13:43:15,312 - DEBUG   - Downloading https://storage.googleapis.com/kubernetes-release/release/v1.28.4/bin/linux/amd64/kubectl to /tmp/tmprdcjnc1s/kubectl
2023-12-12 13:43:15,752 - INFO    - Successfully installed kubectl to /home/sa_109895067591019570007/.config/farmvibes-ai/kubectl
2023-12-12 13:43:15,753 - DEBUG   - Checking dependency terraform
2023-12-12 13:43:15,753 - DEBUG   - Dependency terraform found at system level, but is unsupported, trying to install
2023-12-12 13:43:15,962 - INFO    - Downloading terraform from https://releases.hashicorp.com/terraform/1.6.5/terraform_1.6.5_linux_amd64.zip
2023-12-12 13:43:15,962 - DEBUG   - Downloading https://releases.hashicorp.com/terraform/1.6.5/terraform_1.6.5_linux_amd64.zip to /tmp/tmpdju8h21w/terraform_1.6.5_linux_amd64.zip
2023-12-12 13:43:16,170 - DEBUG   - Extracting terraform from zip
2023-12-12 13:43:16,687 - DEBUG   - Searching for terraform in /tmp/tmpdju8h21w
2023-12-12 13:43:16,687 - DEBUG   - Walking /tmp/tmpdju8h21w with files ['terraform', 'terraform_1.6.5_linux_amd64.zip'] looking for terraform
2023-12-12 13:43:16,687 - DEBUG   - Found terraform. Copying it to /home/sa_109895067591019570007/.config/farmvibes-ai/terraform
2023-12-12 13:43:16,770 - INFO    - Successfully installed terraform to /home/sa_109895067591019570007/.config/farmvibes-ai/terraform
2023-12-12 13:43:16,933 - DEBUG   - Executing command: /home/sa_109895067591019570007/.config/farmvibes-ai/k3d cluster list -o json
2023-12-12 13:43:16,961 - DEBUG   - k3d: []
2023-12-12 13:43:16,963 - INFO    - Setting up local cluster
2023-12-12 13:43:16,990 - DEBUG   - Executing command: /home/sa_109895067591019570007/.config/farmvibes-ai/k3d cluster list -o json
2023-12-12 13:43:17,017 - DEBUG   - k3d: []
2023-12-12 13:43:17,018 - INFO    - Creating data path /home/sa_109895067591019570007/.cache/farmvibes-ai/data
2023-12-12 13:43:17,018 - INFO    - Checking disk space in /home/sa_109895067591019570007/.cache/farmvibes-ai
2023-12-12 13:43:17,018 - INFO    - Creating cluster farmvibes-ai-sa_109895067591019570007
2023-12-12 13:43:17,045 - DEBUG   - Executing command: /home/sa_109895067591019570007/.config/farmvibes-ai/k3d cluster create --config /tmp/tmph3v3sy9a/tmp79laiq2v
2023-12-12 13:43:17,072 - INFO    - k3d: FATA[0000] Schema Validation failed for config file /tmp/tmph3v3sy9a/tmp79laiq2v: - metadata.name: Does not match format 'hostname'
2023-12-12 13:43:17,073 - ERROR   - Unable to run command ['/home/sa_109895067591019570007/.config/farmvibes-ai/k3d', 'cluster', 'create', '--config', '/tmp/tmph3v3sy9a/tmp79laiq2v'].

2023-12-12 13:43:17,073 - ERROR   - farmvibes-ai local failed (Failed to create local cluster with k3d). Please see the above error descriptions. If you think this is an error with the program, please file an issue at https://github.com/microsoft/farmvibes-ai/issues. Please also include the contents of /home/sa_109895067591019570007/.cache/farmvibes-ai/farmvibes-ai-local.log in your issue.

@rafaspadilha - I am also stuck with same issue. Any suggestions on your part to fix this?

Hi, @kirrukirru and @chetan2309, sorry for the delay in replying.

Seems like it is an issue with an invalid name when the docker container for FarmVibes.AI services is being set up. By default, our script concatenates farmvibes-ai- with your username, which may have invalid characters or may extrapolate the size limit for naming a container.

Please, could you try passing a service name with the -n parameter when running the setup command? For example:

farmvibes-ai local setup -n my_farmvibes_cluster

Please, let me know if this works for you.

@rafaspadilha - Tried your suggestion, getting exactly same error.

farmvibes-ai local setup -n my_farmvibes_cluster
2024-01-22 18:01:51,991 - INFO - Setting up local cluster
2024-01-22 18:01:52,042 - INFO - Checking disk space in /home/chetan.sharma/.cache/farmvibes-ai
2024-01-22 18:01:52,042 - INFO - Creating cluster my_farmvibes_cluster
2024-01-22 18:01:52,092 - INFO - k3d: FATA[0000] Schema Validation failed for config file /tmp/tmpbci4t551/tmp723b_esw: - metadata.name: Does not match format 'hostname'
2024-01-22 18:01:52,093 - ERROR - Unable to run command ['/home/chetan.sharma/.config/farmvibes-ai/k3d', 'cluster', 'create', '--config', '/tmp/tmpbci4t551/tmp723b_esw'].

2024-01-22 18:01:52,093 - ERROR - farmvibes-ai local failed (Failed to create local cluster with k3d). Please see the above error descriptions. If you think this is an error with the program, please file an issue at https://github.com/microsoft/farmvibes-ai/issues. Please also include the contents of /home/chetan.sharma/.cache/farmvibes-ai/farmvibes-ai-local.log in your issue.

@rafaspadilha - Adding content of logs

2024-01-23 06:13:24,734 - DEBUG - Checking dependency dapr
2024-01-23 06:13:24,775 - DEBUG - Dependency dapr found at /home/chetan.sharma/.config/farmvibes-ai/dapr with supported version >= 1.9.0
2024-01-23 06:13:24,775 - DEBUG - Checking dependency docker
2024-01-23 06:13:24,831 - DEBUG - Dependency docker found at /usr/bin/docker with supported version >= 20.10.0
2024-01-23 06:13:24,832 - DEBUG - Checking dependency helm
2024-01-23 06:13:24,877 - DEBUG - Dependency helm found at /home/chetan.sharma/.config/farmvibes-ai/helm with supported version >= 3.0.0
2024-01-23 06:13:24,877 - DEBUG - Checking dependency k3d
2024-01-23 06:13:24,904 - DEBUG - Dependency k3d found at /home/chetan.sharma/.config/farmvibes-ai/k3d with supported version >= 5.5.0
2024-01-23 06:13:24,904 - DEBUG - Checking dependency kubectl
2024-01-23 06:13:24,954 - DEBUG - Dependency kubectl found at /home/chetan.sharma/.config/farmvibes-ai/kubectl with supported version >= 1.27.0
2024-01-23 06:13:24,955 - DEBUG - Checking dependency terraform
2024-01-23 06:13:24,993 - DEBUG - Dependency terraform found at /home/chetan.sharma/.config/farmvibes-ai/terraform with supported version >= 1.0.2
2024-01-23 06:13:25,019 - DEBUG - Executing command: /home/chetan.sharma/.config/farmvibes-ai/k3d cluster list -o json
2024-01-23 06:13:25,044 - DEBUG - k3d: []
2024-01-23 06:13:25,045 - INFO - Setting up local cluster
2024-01-23 06:13:25,070 - DEBUG - Executing command: /home/chetan.sharma/.config/farmvibes-ai/k3d cluster list -o json
2024-01-23 06:13:25,096 - DEBUG - k3d: []
2024-01-23 06:13:25,096 - INFO - Checking disk space in /home/chetan.sharma/.cache/farmvibes-ai
2024-01-23 06:13:25,097 - INFO - Creating cluster my_farmvibes_cluster
2024-01-23 06:13:25,123 - DEBUG - Executing command: /home/chetan.sharma/.config/farmvibes-ai/k3d cluster create --config /tmp/tmp23_oa_ru/tmpiwjayc3z
2024-01-23 06:13:25,148 - INFO - k3d: FATA[0000] Schema Validation failed for config file /tmp/tmp23_oa_ru/tmpiwjayc3z: - metadata.name: Does not match format 'hostname'
2024-01-23 06:13:25,149 - ERROR - Unable to run command ['/home/chetan.sharma/.config/farmvibes-ai/k3d', 'cluster', 'create', '--config', '/tmp/tmp23_oa_ru/tmpiwjayc3z'].

2024-01-23 06:13:25,149 - ERROR - farmvibes-ai local failed (Failed to create local cluster with k3d). Please see the above error descriptions. If you think this is an error with the program, please file an issue at https://github.com/microsoft/farmvibes-ai/issues. Please also include the contents of /home/chetan.sharma/.cache/farmvibes-ai/farmvibes-ai-local.log in your issue.

Just an update @rafaspadilha @kirrukirru - I tired with

farmvibes-ai local setup --n farmvibes-ai-chetan so instead of underscore I used hyphen and it worked. Probably it doesn't expect underscore

Great, @chetan2309. I'm glad your setup worked out. I imagined it was an issue with the hostname size limit, but (as you found out) the underscore is an invalid character. Thanks for sharing with us. In a future release, we will have a fix for that.

@kirrukirru, please could you check if the chetan2309's suggestion works for you?

Hi, I also have a problem with this part. The full log is:

2024-02-02 12:19:36,048 - DEBUG   - Checking dependency dapr
2024-02-02 12:19:36,070 - DEBUG   - Dependency dapr found at /home/raminta/.config/farmvibes-ai/dapr with supported version >= 1.9.0
2024-02-02 12:19:36,070 - DEBUG   - Checking dependency docker
2024-02-02 12:19:36,092 - DEBUG   - Dependency docker found at /usr/bin/docker with supported version >= 20.10.0
2024-02-02 12:19:36,092 - DEBUG   - Checking dependency helm
2024-02-02 12:19:36,115 - DEBUG   - Dependency helm found at /home/raminta/.config/farmvibes-ai/helm with supported version >= 3.0.0
2024-02-02 12:19:36,115 - DEBUG   - Checking dependency k3d
2024-02-02 12:19:36,123 - DEBUG   - Dependency k3d found at /home/raminta/.config/farmvibes-ai/k3d with supported version >= 5.5.0
2024-02-02 12:19:36,123 - DEBUG   - Checking dependency kubectl
2024-02-02 12:19:36,153 - DEBUG   - Dependency kubectl found at /home/raminta/.config/farmvibes-ai/kubectl with supported version >= 1.27.0
2024-02-02 12:19:36,153 - DEBUG   - Checking dependency terraform
2024-02-02 12:19:36,170 - DEBUG   - Dependency terraform found at /home/raminta/.config/farmvibes-ai/terraform with supported version >= 1.0.2
2024-02-02 12:19:36,176 - DEBUG   - Executing command: /home/raminta/.config/farmvibes-ai/k3d cluster list -o json
2024-02-02 12:19:36,182 - DEBUG   - k3d: FATA[0000] runtime failed to list nodes: docker failed to get containers with labels 'map[app:k3d]': failed to list containers: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22app%3Dk3d%22%3Atrue%7D%7D": dial unix /var/run/docker.sock: connect: permission denied
2024-02-02 12:19:36,182 - ERROR   - farmvibes-ai local failed (Unable to list clusters). Please see the above error descriptions. If you think this is an error with the program, please file an issue at https://github.com/microsoft/farmvibes-ai/issues. Please also include the contents of /home/raminta/.cache/farmvibes-ai/farmvibes-ai-local.log in your issue.

I have installed the dependencies as stated in Quick Start. farmvibes-ai local setup --n farmvibes-ai-rmnt didn't do the trick

Thank you, @renatolfc I have solved the problem :)

Closing the issue for now, folks. Feel free to reopen or create a new one if you have additional doubts.