Bug 53421 - Verify if Veyon service is available when opening classroom module
Verify if Veyon service is available when opening classroom module
Status: VERIFIED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Computer room
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v2
Assigned To: Johannes Königer
Tobias Wenzel
https://help.univention.com/t/problem...
:
Depends on:
Blocks: 54886
  Show dependency treegraph
 
Reported: 2021-06-08 14:48 CEST by Dirk Schnick
Modified: 2022-07-06 16:19 CEST (History)
6 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.571
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support: Yes
Flags outvoted (downgraded) after PO Review:
Ticket number: 2022070121000119, 2021113021000648, 2021091421000398, 2021060721000255, 2021082321000104, 2021101021000339, 2021101121000186, 2021101121000301, 2021112221000565, 2022031521000887, 2022050521000401, 2022061021000461
Bug group (optional): Error handling, External feedback, Troubleshooting
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schnick univentionstaff 2021-06-08 14:48:40 CEST
A customer reported a problem with the classroom. Opening ended with traceback

Interner Server-Fehler in "computerroom/room/acquire".
Request: computerroom/room/acquire

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 359, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 262, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/school_umc_ldap_connection.py", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/__init__.py", line 444, in room_acquire
    success, message, info = self._room_acquire(roomDN, ldap_user_read)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/__init__.py", line 421, in _room_acquire
    self._italc.room = roomDN
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/room_management.py", line 763, in room
    self._clear()
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/room_management.py", line 814, in _clear
    computer.close()
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/room_management.py", line 1198, in close
    self._veyon_client.remove_session(ip_address)
  File "/usr/lib/pymodules/python2.7/ucsschool/veyon_client/client.py", line 143, in remove_session
    headers={"Connection-Uid": session_uid},
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 150, in delete
    return request('delete', url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='localhost'

The Veyon service was not running. From my point of view it would be a good idea to check the Veyon services when opening the classroom module to avoid this traceback and inform the user about the problem with the service.
Comment 1 Christian Castens univentionstaff 2021-08-26 14:16:51 CEST
reported again:
Version: 4.4-8 errata983 (Blumenthal) - UCS@school 4.4 v9

Error:
Interner Server-Fehler in "computerroom/room/acquire".
Request: computerroom/room/acquire

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 359, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "%PY2.7%/univention/management/console/base.py", line 262, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "%PY2.7%/ucsschool/lib/school_umc_ldap_connection.py", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/computerroom/__init__.py", line 444, in room_acquire
    success, message, info = self._room_acquire(roomDN, ldap_user_read)
  File "%PY2.7%/univention/management/console/modules/computerroom/__init__.py", line 421, in _room_acquire
    self._italc.room = roomDN
  File "%PY2.7%/univention/management/console/modules/computerroom/room_management.py", line 763, in room
    self._clear()
  File "%PY2.7%/univention/management/console/modules/computerroom/room_management.py", line 814, in _clear
    computer.close()
  File "%PY2.7%/univention/management/console/modules/computerroom/room_management.py", line 1198, in close
    self._veyon_client.remove_session(ip_address)
  File "%PY2.7%/ucsschool/veyon_client/client.py", line 143, in remove_session
    headers={"Connection-Uid": session_uid},
  File "%PY2.7%/requests/api.py", line 150, in delete
    return request('delete', url, **kwargs)
  File "%PY2.7%/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "%PY2.7%/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "%PY2.7%/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "%PY2.7%/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='localhost', port=11080): Max retries exceeded with url: /api/v1/authentication (Caused by
NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fa9244abc50>: Failed to establish a new connection: [Errno 111] Verbindungsaufbau
abgelehnt',))

Role: domaincontroller_slave
Comment 2 Christina Scheinig univentionstaff 2021-10-11 09:09:43 CEST
My customer has this traceback.

Interner Server-Fehler in "computerroom/room/acquire".
Request: computerroom/room/acquire

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 359, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 262, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "/usr/lib/python2.7/dist-packages/ucsschool/lib/school_umc_ldap_connection.py", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/computerroom/__init__.py", line 444, in room_acquire
    success, message, info = self._room_acquire(roomDN, ldap_user_read)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/computerroom/__init__.py", line 421, in _room_acquire
    self._italc.room = roomDN
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/computerroom/room_management.py", line 763, in room
    self._clear()
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/computerroom/room_management.py", line 814, in _clear
    computer.close()
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/computerroom/room_management.py", line 1198, in close
    self._veyon_client.remove_session(ip_address)
  File "/usr/lib/python2.7/dist-packages/ucsschool/veyon_client/client.py", line 143, in remove_session
    headers={"Connection-Uid": session_uid},
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 150, in delete
    return request('delete', url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='localhost', port=11080): Max retries exceeded with url: /api/v1/authentication (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f4e028fa450>: Failed to establish a new connection: [Errno 111] Verbindungsaufbau abgelehnt',))

Unfortunately a reboot of the server does not solve the problem.

I will investigate
Comment 3 Christina Scheinig univentionstaff 2021-10-11 11:52:21 CEST
And an other customer with the same traceback.
4.4-8 errata105
Comment 4 Christina Scheinig univentionstaff 2021-10-11 16:35:56 CEST
In the customer environment, after starting the docker container 
# docker ps
CONTAINER ID        IMAGE                                                                    COMMAND                  CREATED             STATUS              PORTS                      NAMES
871ac661e62d        docker.software-univention.de/ucsschool-veyon-webapi-proxy:4.5.2.4-1.1   "/usr/bin/run-veyon-…"   2 months ago        Up 2 hours          0.0.0.0:11080->11080/tcp   reverent_herschel

docker logs shows

# docker logs 871ac661e62d
[ERROR] Could not modify the autostart property for the Veyon Service.
[FAIL]
[INFO] WebAPI server running at port 11080
Segmentation fault (core dumped)
[ERROR] Could not modify the autostart property for the Veyon Service.
[FAIL]
[INFO] WebAPI server running at port 11080
[ERROR] Could not modify the autostart property for the Veyon Service.
[FAIL]
[INFO] WebAPI server running at port 11080
[ERROR] Could not modify the autostart property for the Veyon Service.
[FAIL]
[INFO] WebAPI server running at port 11080
[ERROR] Could not modify the autostart property for the Veyon Service.
[FAIL]
[INFO] WebAPI server running at port 11080
Segmentation fault (core dumped)
[ERROR] Could not modify the autostart property for the Veyon Service.
[FAIL]
[INFO] WebAPI server running at port 11080
Segmentation fault (core dumped)
[FAIL]
[ERROR] Could not modify the autostart property for the Veyon Service.
[INFO] WebAPI server running at port 11080
Comment 5 Christina Scheinig univentionstaff 2021-10-13 09:57:17 CEST
You have first to stop the service and then start it, to make the docker come up again.

service docker-app-ucsschool-veyon-proxy stop
service docker-app-ucsschool-veyon-proxy start
Comment 6 Maximilian Janßen univentionstaff 2021-11-19 17:02:27 CET
Reportet again:
Version: 4.4-8 errata983 (Blumenthal) - UCS@school 4.4 v9
Comment 7 Ingo Steuwer univentionstaff 2021-11-22 14:59:07 CET
I think we have two issues here:

1. generate a user friendly message instead of the traceback
2. make the Veyon service more stable or (re-)start it automatically
Comment 9 Riya Bhattacharjee univentionstaff 2021-12-07 12:14:49 CET
Reported again in feedback ticket 2021112221000565.
UCS Version: 4.4-8 errata1087 (Blumenthal)
Comment 10 Christina Scheinig univentionstaff 2022-03-17 11:00:06 CET
Happend again.
Seems also to interrupt exammode.
Comment 11 Christina Scheinig univentionstaff 2022-03-18 09:17:34 CET
Happened again 2022031821000112
Comment 12 Christina Scheinig univentionstaff 2022-03-18 09:18:01 CET
Happend again.
Seems also to interrupt exammode.
Comment 13 Christina Scheinig univentionstaff 2022-03-21 12:06:13 CET
`docker container update <ContainerID> --restart always`
Seems to be a temporary workaround
Comment 15 Johannes Königer univentionstaff 2022-06-22 10:38:53 CEST
Merge request proposal to solve issue ucs#802 / bug 53421: https://git.knut.univention.de/univention/ucsschool/-/merge_requests/119
 
Remarks:
- This will add a dedicated test for the Veyon WebAPI server and an understandable error message
- The connection test will be executed if a user chooses a computerroom for remote control, not directly after entering the computerroom umc module as the latter would imply further necessary changes in the frontend javascript code
- This proposal does not improve the stability of the Veyon WebAPI server, this will be handled within issue ucs#803 / bug 53558
Comment 16 Johannes Königer univentionstaff 2022-06-23 11:06:00 CEST
(In reply to Johannes Königer from comment #15)
> Merge request proposal to solve issue ucs#802 / bug 53421:
> https://git.knut.univention.de/univention/ucsschool/-/merge_requests/119
>  
> Remarks:
> - This will add a dedicated test for the Veyon WebAPI server and an
> understandable error message
> - The connection test will be executed if a user chooses a computerroom for
> remote control, not directly after entering the computerroom umc module as
> the latter would imply further necessary changes in the frontend javascript
> code
> - This proposal does not improve the stability of the Veyon WebAPI server,
> this will be handled within issue ucs#803 / bug 53558

Changes have been merged into 5.0.
Comment 17 Tobias Wenzel univentionstaff 2022-06-24 08:59:17 CEST
all ok, verify

- changelog ok
- merge ok
- advisory ok
- jenkins happy