usdzconvert_webui icon indicating copy to clipboard operation
usdzconvert_webui copied to clipboard

OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

Open antekj opened this issue 4 years ago • 3 comments

Hi, I am trying to run the program as you've explained in the previous issue ("C:\Program Files\usdz_webui\Python\python.exe" "C:\Program Files\usdz_webui\usdz_webui.launch.py" in command prompt) but after installing all the dependencies successfully, I get the error mentioned above. Here are all the messages from the command prompt:

C:\WINDOWS\system32>"C:\Program Files\usdz_webui\Python\python.exe" "C:\Program Files\usdz_webui\usdz_webui.launch.py" 18:30 INFO: USDZ Converter located or installed successfully. C:\Users\antoni\AppData\Local\usdzconvert_webui\instance\converter\pxr_usd_abc1710_py27_win64 18:30 INFO: Providing module with logger: usdz_webui.modules.ftp 18:30 INFO: Providing module with logger: usdz_webui.modules.settings 18:30 INFO: Providing module with logger: usdz_webui.modules.file_mgr 18:30 INFO: Providing module with logger: usdz_webui.modules.usdzconvert_args 18:30 INFO: Providing module with logger: usdz_webui.modules.job Logging setup called: app.py Logging setup detected production env. File handler will be used. Removing handler that will be added to queue listener: <RotatingFileHandler C:\Users\antoni\AppData\Local\usdzconvert_webui\Logs\usdzconvert_webui.log (DEBUG)> Removing handler that will be added to queue listener: <StreamHandler (NOTSET)> 21.08.2020 18:30 usdz_webui INFO: Started Log listener in thread: 16804 21.08.2020 18:30 root INFO: Serving at 192.168.0.24 Traceback (most recent call last): File "C:\Program Files\usdz_webui\usdz_webui.launch.py", line 35, in serve_to_lan() File "C:\Program Files\usdz_webui\pkgs\serve.py", line 16, in serve_to_lan serve(App, host=host, port=port) File "C:\Program Files\usdz_webui\pkgs\waitress_init_.py", line 12, in serve server = _server(app, **kw) File "C:\Program Files\usdz_webui\pkgs\waitress\server.py", line 81, in create_server last_serv = TcpWSGIServer( File "C:\Program Files\usdz_webui\pkgs\waitress\server.py", line 239, in init self.bind_server_socket() File "C:\Program Files\usdz_webui\pkgs\waitress\server.py", line 368, in bind_server_socket self.bind(sockaddr) File "C:\Program Files\usdz_webui\pkgs\waitress\wasyncore.py", line 398, in bind return self.socket.bind(addr) OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

Any help would be much appreciated!

antekj avatar Aug 21 '20 16:08 antekj

Hi, thanks for providing the error messages. The waitress module couldn't open your local port 5000 which either means:

  • some other application is running on your localhost:5000, you can check that with opening a cmd prompt netstat -ano | find ":5000" if the prompt returns nothing it means there is nothing running on that port
  • some anti-virus is blocking the app or the port, so you need to anti-anti virus

If this port is really already in use on your machine: try to edit the file serve.py in the usdz_webui/pkgs directory in Line 13 port=5000 and change the port to something between 1024 - 50000

tappi287 avatar Aug 22 '20 07:08 tappi287

Hi, thank you so much, I really appreciate your help!

antekj avatar Aug 31 '20 19:08 antekj

@tappi287 - Thanks to this:

    if sys.platform == 'win32':
        host = socket.gethostbyname(socket.gethostname())   
        port = 80

running this on windows forces the port to 80 (regardless of how it's set at the top) which is a little bonkers (especially since it's assigned to something more sensible - port 5000 - initially).

The chance that another service is bound to 80 is fairly high. In my case the domain resolution doesn't work that well either, but that's probably unique to my situation. I don't get forcing the port to 80 on Windows, though.

eoffermann avatar Oct 08 '21 18:10 eoffermann