-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
st2client : Pack Install is hanging with HTTPS #4842
Comments
Try to run the CLI command with |
Does the same issue happen if you don't use SSL / TLS on the load balancer? It appears it's something related to the streaming API endpoint from which client consumes the events. It could be related to some load balancer keep alive or similar mechanism, but I think client should still handle that and we can't rely on server (aka stream API endpoint) closing the connection since that API endpoint is long running. In any case, as @armab pointed out, gistting the whole output of the command when you include |
Hi Kami, No it doesn't happen with HTTP , it only hangs with HTTPS (Nginx : 443). Below is the debug output. I suspect something to do with st2client streaming connection with st2stream where it is not properly getting closed. Regards [st2dev@st2-dev-1 ~ ]$ st2 --debug pack remove -d pack_install -t 1f3964cf767f4643a330269d5633dedc -------- begin 140659860837776 request ----------curl -X GET -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: /' -H 'User-Agent: python-requests/2.22.0' -H 'X-Auth-Token: 1f3964cf767f4643a330269d5633dedc' https://st2-dev-1/api/packs -------- begin 140659860837776 response ----------[ -------- end 140659860837776 response -------------------- begin 140659860837776 request ----------curl -X POST -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: /' -H 'User-Agent: python-requests/2.22.0' -H 'content-type: application/json' -H 'X-Auth-Token: 1f3964cf767f4643a330269d5633dedc' -H 'Content-Length: 27' --data-binary '{"packs": ["pack_install"]}' https://st2-dev-1/api/packs/uninstall -------- begin 140659860837776 response ----------{ -------- end 140659860837776 response ------------No handlers could be found for logger "sseclient"
Traceback (most recent call last): |
Same issue here, |
I also just saw this just now. Here's my --debug output:
|
I also have this issue. It also affect |
Has this cleared up for everyone? I wonder if the internet had a hiccups, for example, unable to check Cert Revocations... |
No this is still an issue. It has to do with ssl and how nginx handles it.
…On Wed, Apr 22, 2020, 00:41 JP Bourget ***@***.***> wrote:
Has this cleared up for everyone? I wonder if the internet had a hiccups,
for example, unable to check Cert Revocations...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4842 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZ5TIKXJJIJ7DRUHB2R4ELRNZYN7ANCNFSM4KGQL75A>
.
|
So it looks like SSL does not respect the proxy_buffering = off The solution appears to be for us to set this header in the request which should be respected by nginx:
|
correction i need to add the header |
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue. |
Also running into this exact same issue. I have two different setups. Stackstorm - nginx SSL termination - Hangs on the finish Not sure what I can do to help, I've tried what I can from the cli and my nginx configuration. But nothing seems to work. Walking through (debugging) the st2client it seems to continue to loop on socket.py --> readinto()
Originating from
|
I submitted #5042 but i still see the hang. I will leave it WIP. |
I found the magic setting.
This way after 10 seconds of inactivity the connection will be flushed by nginx. |
This doesn't actually work. I have some actions that run longer than 10 seconds without streaming any output. Within 10 seconds my terminal returns, but my execution is actually still running on the server. |
setting the proxy_read_timeout causes some client side issues. I just experienced the same issue. |
Here is some more info: |
The only solution we are left with is to just pad the response with extra bytes so it flushes. |
Here they did set the read timeout to a larger number: http://docs.cuepublishing.com/ece-install-guide/7.2/sse_proxy_configuration__https.html |
for now i set the following. It at least will drop the connection after the timeout period.
|
I spent some more time on this. The timeout won't help here. every 30 seconds a pack is sent back anyway. The issue is in this part of the code.
self._stopped is never equal to True but that isn't the problem since this appears to be a singleton class anyway. the generator function doesn't specify what the final message is so it can stop generating events to send back to the client.
Gunicorn must drop the connection for stackstorm thus why it works via http pointed at the stream port. I think I need to find the event that is fired when a workflow is completed or failed and trigger a break out of the while loop. |
I did a hack where i wait for the message body to be "Successfully installed pack" and exit the loop. That worked. But we need a solid solution. |
the call also is not filtering based on execution_id so presumably you just get every pack installation if 2 are run at the same time
|
I also found out that if you have a hung tail in one terminal window, and you kick-off another execution in stackstorm, then the hung tail event closes successfully. |
Updated PR #5042 with a potential fix. |
ah. ok so the tail command has the same issue. |
Hello Stackstorm team,
We're noticing an issue with "st2 pack install file://$PWD" command with HTTPS endpoints.
For eg: if we set the below environment variables and try to install a pack , it works without any issues.
export ST2_API_URL=http://127.0.0.1:9101
export ST2_STREAM_URL=http://127.0.0.1:9102
export ST2_AUTH_URL=http://127.0.0.1:9100
export ST2_BASE_URL=http://127.0.0.1
But when we try to install a pack with the below environment variables wherein we route every request via Nginx reverse proxy/load balancer, the st2client fails to show the progress.
export ST2_BASE_URL=https://127.0.0.1
export ST2_AUTH_URL=https://127.0.0.1/auth
export ST2_API_URL=https://127.0.0.1/api
export ST2_STREAM_URL=https://127.0.0.1/stream
export ST2_CACERT=/etc/ssl/st2/st2.crt
Basically the pack install will show the progress like but the client won't exit and it would simply hang forever. But the pack install action chain would have really executed and completed without any issues.
Appreciate if any pointers to resolved this issue.
Regards
Harish
The text was updated successfully, but these errors were encountered: