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

Connection issue while trying to run hello world workflow

Yaswanth-Tippireddy opened this issue · comments

Hi,

I have setup a cluster on WSL in my windows machine (Ubuntu 20.04 WSL - 16 cores, 32 GB RAM),

when I am trying to run the hello world workflow, I have been getting the following error

yaswanth@GAVLMUMLT-071:~/Devprojects/farmvibes-ai$ python -m vibe_core.farmvibes_ai_hello_world
INFO:__main__:Successfully obtained a FarmVibes.AI client (addr=http://192.168.49.2:30000)
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.8/http/client.py", line 1256, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1302, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1251, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1011, in _send_output
    self.send(msg)
  File "/usr/lib/python3.8/http/client.py", line 951, in send
    self.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 187, in connect
    conn = self._new_conn()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7ff1ffa2c550>: Failed to establish a new connection: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/yaswanth/.local/lib/python3.8/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.49.2', port=30000): Max retries exceeded with url: /v0/workflows (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ff1ffa2c550>: Failed to establish a new connection: [Errno 110] Connection timed out'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/yaswanth/.local/lib/python3.8/site-packages/vibe_core/farmvibes_ai_hello_world.py", line 45, in <module>
    main()
  File "/home/yaswanth/.local/lib/python3.8/site-packages/vibe_core/farmvibes_ai_hello_world.py", line 29, in main
    LOGGER.info(f"available workflows: {client.list_workflows()}")
  File "/home/yaswanth/.local/lib/python3.8/site-packages/vibe_core/client.py", line 115, in list_workflows
    return self._request("GET", "v0/workflows")
  File "/home/yaswanth/.local/lib/python3.8/site-packages/vibe_core/client.py", line 79, in _request
    response = self.session.request(method, urljoin(self.baseurl, endpoint), *args, **kwargs)
  File "/home/yaswanth/.local/lib/python3.8/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/yaswanth/.local/lib/python3.8/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/home/yaswanth/.local/lib/python3.8/site-packages/requests/adapters.py", line 565, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.49.2', port=30000): Max retries exceeded with url: /v0/workflows (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ff1ffa2c550>: Failed to establish a new connection: [Errno 110] Connection timed out'))

I understand it is a networking issue, and I tried to ping /check the IP address 192.168.49.2 manually, but I cannot ping it. I have checked the ipconfig and I can't find that series in my list of virtual adapters as well.

I have tried restarting cluster, deleting the cluster and fresh installation, etc but the issue remains the same.

Please point me in the right direction to resolve this.

Hi @Yaswanth-Tippireddy,

Thanks for testing our solution. Unfortunately, WSL is not supported by FarmVibes.AI yet. My recommendation is to use a pure Ubuntu installation or a VM on azure.

You can check our documentation on how to create an Azure VM or take a look at our presentation here explaining how to set this VM up.

Thanks, @brsilvarec . I'll set this up in a VM.

To ensure there is no confusion, can you edit this line in documentation/VM-SETUP.md so that others may not waste time trying WSL.

You'll need a Linux computer or Windows Subsystem for Linux in your Windows Machine.

Thank you for your contribution, Yaswanth. At this time, Windows Subsystem for Linux (WSL) can only be used to create the virtual machine. Unfortunately, WSL is not currently supported for running the FarmVibes-ai cluster. I will make sure to update the documentation to reflect this information more clearly