Bug 55730 - Kelvin error h11._util.LocalProtocolError: Can't send data when our state is ERROR
Kelvin error h11._util.LocalProtocolError: Can't send data when our state is ...
Status: NEW
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
UCS@school 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-02-20 16:47 CET by Carlos García-Mauriño
Modified: 2023-02-21 08:19 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2023021421000254
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos García-Mauriño univentionstaff 2023-02-20 16:47:12 CET
Traceback when creating a user:

```
2023-02-20 07:51:32 DEBUG [236][362f58d2d7] base_http.call_openapi:443  'search' 'users/user' -> udm_users_user_object_search_with_http_info(**{'hidden': 'true', 'filter': 'username=t98306765653377', 'position': 'dc=school,dc=test', 'scope': 'sub'}) -> UsersUserList(1 * UsersUser) [200]
2023-02-20 07:51:32 INFO  [235][None] timing.emit:132  TIMING: Wall: 3119.9ms | CPU:  222.6ms | ucsschool.kelvin.routers.user.create
2023-02-20 07:51:32 INFO  [235][None] h11_impl.send:480  172.17.42.1:55584 - "POST /ucsschool/kelvin/v1/users/ HTTP/1.1" 201
2023-02-20 07:51:32 ERROR [235][None] main.unhandled_exception_handler:151  While responding to POST http://backup1.school.test/ucsschool/kelvin/v1/users/: Can't send data when our state is ERROR
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/usr/lib/python3.8/site-packages/starlette/middleware/base.py", line 109, in __call__
    await response(scope, receive, send)
  File "/usr/lib/python3.8/site-packages/starlette/responses.py", line 277, in __call__
    await wrap(partial(self.listen_for_disconnect, receive))
  File "/usr/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 662, in __aexit__
    raise exceptions[0]
  File "/usr/lib/python3.8/site-packages/starlette/responses.py", line 273, in wrap
    await func()
  File "/usr/lib/python3.8/site-packages/starlette/middleware/base.py", line 134, in stream_response
    return await super().stream_response(send)
  File "/usr/lib/python3.8/site-packages/starlette/responses.py", line 255, in stream_response
    await send(
  File "/usr/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in _send
    await send(message)
  File "/usr/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 494, in send
    output = self.conn.send(event)
  File "/usr/lib/python3.8/site-packages/h11/_connection.py", line 512, in send
    data_list = self.send_with_data_passthrough(event)
  File "/usr/lib/python3.8/site-packages/h11/_connection.py", line 527, in send_with_data_passthrough
    raise LocalProtocolError("Can't send data when our state is ERROR")
h11._util.LocalProtocolError: Can't send data when our state is ERROR
2023-02-20 07:51:32 INFO  [236][None] timing.emit:132  TIMING: Wall: 3115.3ms | CPU:  348.7ms | ucsschool.kelvin.routers.user.create
2023-02-20 07:51:32 INFO  [236][None] h11_impl.send:480  172.17.42.1:55612 - "POST /ucsschool/kelvin/v1/users/ HTTP/1.1" 201
```

Does not happen always.