-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ws all_events api disconnects immediately #59183
Comments
By the way, it works fine on bionic, 2019.2 salt --versions-report # bionic 2019.2(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
|
@dbellavista ok so it is a regression from v2019 to 3002.1, did it work on any version in between? |
Hi, just tried with 3000 and 3001 on ubuntu 18.04 and it didn't work. |
Just one question for now. Since the 2019 has been removed from the repo, is there an alternative way to use the WS apis? |
v2019 have been moved to https://archive.repo.saltproject.io/, but if the WS APIs work - since we vendored tornado you have seen the issues (#50699 (comment)), but it should work, since we don't support this version we aren't testing this specific use case, but would be interested to know if that works for you. |
Thanks @sagetherage for for the repo link, I totally missed it! And also thank you for reminding me of that issue. I tried with pip3 install tornado==4.4.3
mv /usr/lib/python3/dist-packages/salt/ext/tornado /usr/lib/python3/dist-packages/salt/ext/tornado_old
cp -r /usr/local/lib/python3.8/dist-packages/tornado /usr/lib/python3/dist-packages/salt/ext/tornado and it works as expected. |
Description
The websocket API
all_events
instantly disconnects after establishing the ws connection.Setup
Steps to Reproduce the behavior
I'm following the API guide to login, obtain the token and then openeing the API with:
Expected behavior
The websocket should remain open. Instead I immediately get:
Salt api log:
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
It seems that when first entering the main loop in
salt/salt/netapi/rest_tornado/saltnado_websockets.py
Line 362 in da68197
the
get_event
call is resolved immediately with aTimeoutException
because the request is finished. It could be that when replying with the websocket headers atsalt/salt/ext/tornado/websocket.py
Line 690 in da68197
The request is involuntary finished, resulting in the subsequent close of the connection?
The text was updated successfully, but these errors were encountered: