OmniParser icon indicating copy to clipboard operation
OmniParser copied to clipboard

Validation errors: Windows Host is not responding

Open mio-19 opened this issue 11 months ago • 30 comments

I can see that the windows host is responding via novnc however I am getting this error


  File "/Users/user/Apps/OmniParser/omnitool/gradio/app.py", line 217, in process_input
    raise gr.Error("Validation errors: " + ", ".join(errors))
gradio.exceptions.Error: 'Validation errors: Windows Host is not responding'
Traceback (most recent call last):
  File "/Users/user/Apps/OmniParser/.venv/lib/python3.12/site-packages/gradio/queueing.py", line 625, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Apps/OmniParser/.venv/lib/python3.12/site-packages/gradio/route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Apps/OmniParser/.venv/lib/python3.12/site-packages/gradio/blocks.py", line 2044, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Apps/OmniParser/.venv/lib/python3.12/site-packages/gradio/blocks.py", line 1603, in call_function
    prediction = await utils.async_iteration(iterator)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Apps/OmniParser/.venv/lib/python3.12/site-packages/gradio/utils.py", line 728, in async_iteration
    return await anext(iterator)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Apps/OmniParser/.venv/lib/python3.12/site-packages/gradio/utils.py", line 722, in __anext__
    return await anyio.to_thread.run_sync(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Apps/OmniParser/.venv/lib/python3.12/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Apps/OmniParser/.venv/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/user/Apps/OmniParser/.venv/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Apps/OmniParser/.venv/lib/python3.12/site-packages/gradio/utils.py", line 705, in run_sync_iterator_async
    return next(iterator)
           ^^^^^^^^^^^^^^
  File "/Users/user/Apps/OmniParser/.venv/lib/python3.12/site-packages/gradio/utils.py", line 866, in gen_wrapper
    response = next(iterator)
               ^^^^^^^^^^^^^^
  File "/Users/user/Apps/OmniParser/omnitool/gradio/app.py", line 217, in process_input
    raise gr.Error("Validation errors: " + ", ".join(errors))
gradio.exceptions.Error: 'Validation errors: Windows Host is not responding'

mio-19 avatar Feb 17 '25 23:02 mio-19

Image

mio-19 avatar Feb 17 '25 23:02 mio-19

This indicates that the server running in the VM that accepts commands from Gradio and then moves the mouse/ keyboard isn't available. You can verify this by running curl http://localhost:5000/probe. It may be a matter of waiting a little.

If waiting 10 mins doesn't help. Try stopping (./manage_vm.sh stop) and starting (./manage_vm.sh start) your omnibox VM with the script commands.

Then, if that doesn't work, delete your VM (./manage_vm.sh delete) leaving the storage folder and then run create again. It will be fast as it will use the existing storage folder.

Finally, if that still doesn't work and you want to fully reset your VM to factory settings (create a new VM):

  1. run ./manage_vm.sh delete
  2. delete the vm/win11storage folder
  3. run ./manage_vm.sh create

ThomasDh-C avatar Feb 18 '25 01:02 ThomasDh-C

Having the same issue. Stopping and restarting the VM did not help... Will try to re-create it and see if that helps...

LucienPca avatar Feb 18 '25 12:02 LucienPca

Same here, I tried to restart, recreate the VM, but still not work.

Image

DevPaulLiu avatar Feb 19 '25 05:02 DevPaulLiu

same case,windows 11 is the host.

olivercode avatar Feb 19 '25 06:02 olivercode

+1

rxxy avatar Feb 19 '25 06:02 rxxy

  • Identical error here with the same Python response in the terminal as above. Running everything on Ubuntu 24.04. Is this somehow connected with the fact that it is necessary to login into a Windows 11 Virtual Machine with a username and password? That is, should you not specify a username and password when accessing the Windows 11 Virtual machine? I have seen in the file app.py that you are specifying the address localhost:5000.

Why is this address different from localhost:8006 which is running the Web Interface of the virtual machine?

Image

AleksandarHaber avatar Feb 19 '25 07:02 AleksandarHaber

Image

olivercode avatar Feb 19 '25 07:02 olivercode

Maybe someone else can also confirm this. The problem seems to be the following. If you open another terminal while everything is running, type this

curl http://localhost:5000/probe

The response looks like this

curl: (56) Recv failure: Connection reset by peer

My understanding is that the Python file app.py that brings up the gradio interface, is trying to access the address: http://localhost:5000 in the function "valid_params()". Then, in the function, there is a try-except exception handling, where, it is tested if the connection to http://localhost:5000/probe can be made. This returns an error, and everything crashes because the connection cannot be established.

Is this a firewall issue on the Windows 11 virtual machine?

AleksandarHaber avatar Feb 19 '25 07:02 AleksandarHaber

same

JerryWong0527 avatar Feb 19 '25 07:02 JerryWong0527

I just got this resolved, it appears somehow the VM setup not fully complete, You can log on to the machine using https://localhost:8006, and you can see the terminal still running "Admin Installing", after waiting more time, once you see "VM + server is up and running!" You're all set

Image

DevPaulLiu avatar Feb 19 '25 08:02 DevPaulLiu

Try installing Python on the VM from localhost:8006, then requirements.txt and then run this script:

https://github.com/microsoft/OmniParser/blob/master/omnitool/omnibox/vm/win11setup/setupscripts/server/main.py

The error is happening because this script is not getting set up during VM launch.

abhi1703992 avatar Feb 19 '25 08:02 abhi1703992

In my case it was the "win11x64-enterprise-eval.xml". Had to rename it to "win11x64-enterprise.xml" for Docker to see it. Also, looking at the screenshots posted in here a lot of users don't have all the prerequisites installed on the VM. You either need to wait a little longer (slow mirror links) or make sure that the answer file is seen correctly during the installation.

LucienPca avatar Feb 19 '25 08:02 LucienPca

@DevPaulLiu After running the create script, do you not need to do anything and let it complete automatically?

JerryWong0527 avatar Feb 19 '25 08:02 JerryWong0527

@DevPaulLiu After running the create script, do you not need to do anything and let it complete automatically?

I didn't perform any additional operations. If you notice a terminal window titled 'Administer installing' running on the VM, it indicates that certain tools are still being installed. Please be patient as this process may take some time to complete. Once finished, you'll see 'VM + server is up and running!' in the terminal where you executed ./manage_vm.sh create."

DevPaulLiu avatar Feb 19 '25 09:02 DevPaulLiu

Try installing Python on the VM from localhost:8006, then requirements.txt and then run this script:

https://github.com/microsoft/OmniParser/blob/master/omnitool/omnibox/vm/win11setup/setupscripts/server/main.py

The error is happening because this script is not getting set up during VM launch.

install the python,run the main.py, it works.

olivercode avatar Feb 19 '25 09:02 olivercode

Same here, I tried to restart, recreate the VM, but still not work.

Image

As @DevPaulLiu mentioned it can take time for all the apps to install based on download speed. If that terminal window is still open, it is still installing apps. When it is complete it will print 'VM + server is up and running!'. You can also see the apps gradually show up on the desktop in the VNC window.

To set up your VM faster you should be able to comment out lines 57 to 350 in this file that defines all the apps to install when you first create the container + VM. We may support in future this minimal implementation natively in future, but are focused on OmniBox containing a couple starter apps/ tools for the moment.

ThomasDh-C avatar Feb 19 '25 20:02 ThomasDh-C

Hello, I have also encountered your problem. Has your problem been solved? I looked at the solutions provided by the brothers above, but none of them were successful. At present, after executing ./manage_vm.sh create, it never appears (server is up and running), and the output is always (When first building the VM storage folder this can take a while...),It has been executed for at least 2 hours.

longyu5124 avatar Feb 20 '25 13:02 longyu5124

Sorta similar issue:

Image

epicshardz avatar Feb 22 '25 04:02 epicshardz

win11 app.py executed with below same error: Traceback (most recent call last): File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\queueing.py", line 625, in process_events response = await route_utils.call_process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\route_utils.py", line 322, in call_process_api output = await app.get_blocks().process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\blocks.py", line 2044, in process_api result = await self.call_function( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\blocks.py", line 1603, in call_function prediction = await utils.async_iteration(iterator) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\utils.py", line 728, in async_iteration return await anext(iterator) ^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\utils.py", line 722, in anext return await anyio.to_thread.run_sync( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\utils.py", line 705, in run_sync_iterator_async return next(iterator) ^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\utils.py", line 866, in gen_wrapper response = next(iterator) ^^^^^^^^^^^^^^ File "D:\YangYuzhu\tool\OmniParser\omnitool\gradio\app.py", line 219, in process_input raise gr.Error("Validation errors: " + ", ".join(errors)) gradio.exceptions.Error: "Validation errors: Windows Host is not responding: HTTPConnectionPool(host='localhost', port=8006): Max retries exceeded with url: /probe (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001F1DF464890>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))"

i am not sure why target machine actively refused it though my port available at 8006. Any bro ecouter this problem?

ChrisYang2017 avatar Feb 22 '25 07:02 ChrisYang2017

@DevPaulLiu After running the create script, do you not need to do anything and let it complete automatically?

I didn't perform any additional operations. If you notice a terminal window titled 'Administer installing' running on the VM, it indicates that certain tools are still being installed. Please be patient as this process may take some time to complete. Once finished, you'll see 'VM + server is up and running!' in the terminal where you executed ./manage_vm.sh create."

Why isn't a terminal window popping up during the "Administer installing" in my virtual machine operating system?

Image

yuruotong1 avatar Feb 22 '25 11:02 yuruotong1

Hello, I have also encountered your problem. Has your problem been solved? I looked at the solutions provided by the brothers above, but none of them were successful. At present, after executing ./manage_vm.sh create, it never appears (server is up and running), and the output is always (When first building the VM storage folder this can take a while...),It has been executed for at least 2 hours.

@longyu5124 Your download may be slow. Try cleaning up your existing machine as per these instructions and then follow these instructions

ThomasDh-C avatar Feb 23 '25 02:02 ThomasDh-C

Sorta similar issue:

Image

Make sure your VM is running - run ./manage_vm.sh start

ThomasDh-C avatar Feb 23 '25 02:02 ThomasDh-C

win11 app.py executed with below same error: Traceback (most recent call last): File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\queueing.py", line 625, in process_events response = await route_utils.call_process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\route_utils.py", line 322, in call_process_api output = await app.get_blocks().process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\blocks.py", line 2044, in process_api result = await self.call_function( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\blocks.py", line 1603, in call_function prediction = await utils.async_iteration(iterator) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\utils.py", line 728, in async_iteration return await anext(iterator) ^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\utils.py", line 722, in anext return await anyio.to_thread.run_sync( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\utils.py", line 705, in run_sync_iterator_async return next(iterator) ^^^^^^^^^^^^^^ File "D:\anaconda3\envs\omni\Lib\site-packages\gradio\utils.py", line 866, in gen_wrapper response = next(iterator) ^^^^^^^^^^^^^^ File "D:\YangYuzhu\tool\OmniParser\omnitool\gradio\app.py", line 219, in process_input raise gr.Error("Validation errors: " + ", ".join(errors)) gradio.exceptions.Error: "Validation errors: Windows Host is not responding: HTTPConnectionPool(host='localhost', port=8006): Max retries exceeded with url: /probe (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001F1DF464890>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))"

i am not sure why target machine actively refused it though my port available at 8006. Any bro ecouter this problem?

Not sure why you are getting this issue @ChrisYang2017 - NoVNC server for viewing the VM is on port 8006. Server to control the VM is on port 5000 as verified here. Create a separate issue with more details on what lead to this error

ThomasDh-C avatar Feb 23 '25 02:02 ThomasDh-C

@DevPaulLiu After running the create script, do you not need to do anything and let it complete automatically?

I didn't perform any additional operations. If you notice a terminal window titled 'Administer installing' running on the VM, it indicates that certain tools are still being installed. Please be patient as this process may take some time to complete. Once finished, you'll see 'VM + server is up and running!' in the terminal where you executed ./manage_vm.sh create."

Why isn't a terminal window popping up during the "Administer installing" in my virtual machine operating system?

Image

@yuruotong1 Clear this installation and try installation instructions here in case app installations is the issue

ThomasDh-C avatar Feb 23 '25 03:02 ThomasDh-C

I have the same issue. Then, I checked the "firstboot_log" and "setup" and found that many tools installations were unsuccessful. In "setup", could it be that the failure of previous software installations caused the Windows network setup in the virtual machine to be incomplete, ultimately leading to this issue? I have tried many times, but not once has the software installation process been completely successful. Any suggestion?

Image

OWPO avatar Feb 24 '25 00:02 OWPO

I see below errors in firstboot log

how do i fix this?

root@331802cb2ed1:/data# cat firstboot_log.txt Running PowerShell script... C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Waiting for 30 seconds before continuing...

Waiting for 30 seconds, press CTRL+C to quit . 0 Running setup.ps1...

Directory: C:\Users\Docker\Documents\WindowsPowerShell

Mode LastWriteTime Length Name


-a---- 2/25/2025 10:25 PM 0 Microsoft.PowerShell_profile.ps1

Directory: C:\Users\Docker

Mode LastWriteTime Length Name


d----- 2/25/2025 10:25 PM Tools Downloading Python ... Attempt 1 of 3 failed. Error: Unable to connect to the remote server Attempt 2 of 3 failed. Error: Unable to connect to the remote server Attempt 3 of 3 failed. Error: Unable to connect to the remote server Failed to download the file after 3 attempts. Downloading from the provided mirrors failed. Please check and update the mirrors. Failed to download Python. Please try again later or install manually. Git is not installed. Downloading and installing Git... Attempt 1 of 3 failed. Error: Unable to connect to the remote server Attempt 2 of 3 failed. Error: Unable to connect to the remote server Attempt 3 of 3 failed. Error: Unable to connect to the remote server Failed to download the file after 3 attempts. Downloading from the provided mirrors failed. Please check and update the mirrors. Failed to download Git. Please try again later or install manually.

assinchu avatar Feb 25 '25 23:02 assinchu

I also encountered this problem, I can return 200 status using curl http://localhost:500/probe in the container. But it doesn't work on the host machine, although port 8006 can be accessed. I also configured the firewall rules, but it still doesn't work, the port mapping set when the container starts seems to be no problem

twallpasser avatar Mar 09 '25 12:03 twallpasser

Same issue:

Image

OmniParser\omnitool\gradio\app.py", line 217, in process_input
raise gr.Error("Validation errors: " + ", ".join(errors)) gradio.exceptions.Error: 'Validation errors: Windows Host is not responding'

baluMallisetty avatar Mar 16 '25 04:03 baluMallisetty

main.py which running in windows11, the default host ip is 10.0.2.15


if name == 'main': app.run(host="10.0.2.15", port=args.port)


but in my windows11 vm, i look up the ip address which is 20.20.20.21

so i change the main.py to use 20.20.20.21, it could run success,

but i run: docker exec -it omni-windows bash -c "curl --write-out '%{http_code}' --silent --output /dev/null localhost:5000/probe"

which still could not get http 200 response !!!!

so, i still get err about "Validation errors: Windows Host is not responding"

6Shinhwa avatar Oct 25 '25 15:10 6Shinhwa