Skip to content

Run locally: WinError 10013: access a socket in a way forbidden by its access permissions #2155

@biancat821

Description

@biancat821

Sometimes when I run locally I receive the following error (see also details below).
PermissionError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions.

The strange thing is that the application run without any problem unit yesterday and now it does not start locally.
I tried to restart several times the laptop but the issue is still there.

I had this behaviour before but at some point the issue dissappeared (I do not know how).
I worked more than one month with no problems and now the issue is here again.
But I do not understand the cause.
Any suggestion?


This issue is for a: (mark with an x)

- [ X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Run locally with the instructions
Run azd auth login
Change dir to app
Run ./start.ps1 or ./start.sh

Any log messages given by the failure

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\quart_main
.py", line 6, in
main()
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\quart\cli.py", line 754, in main
cli.main()
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\click\decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\click\core.py", line 783, in invoke
return _callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\quart\cli.py", line 639, in run_command
app.run(
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\quart\app.py", line 852, in run
loop.run_until_complete(asyncio.gather(*tasks))
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\hypercorn\asyncio_init
.py", line 44, in serve
await worker_serve(
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\hypercorn\asyncio\run.py", line 90, in worker_serve
sockets = config.create_sockets()
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\hypercorn\config.py", line 206, in create_sockets
insecure_sockets = self._create_sockets(self.bind)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\xxxxxx\yyyyyyy\app.venv\Lib\site-packages\hypercorn\config.py", line 269, in _create_sockets
sock.bind(binding)
PermissionError: [WinError 10013] Tentativo di accesso al socket con modalità non consentite dalle rispettive autorizzazioni di accesso

Expected/desired behavior

I would like the application run locally.

OS and Version?

Windows 11

azd version?

azd version 1.9.5 (commit cd2b7af9995d358aab33c782614f801ac1997dde)

Versions

Python 3.11.5

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions