Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Endpoint disconnect ("We've been having trouble communicating with Cloud Foundry") #2579

Closed
3 of 11 tasks
svollath opened this issue Jun 29, 2018 · 7 comments · Fixed by #2611
Closed
3 of 11 tasks

Endpoint disconnect ("We've been having trouble communicating with Cloud Foundry") #2579

svollath opened this issue Jun 29, 2018 · 7 comments · Fixed by #2611
Assignees
Labels
bug P1 Priority 1

Comments

@svollath
Copy link

Frontent Deployment type

  • Cloud Foundry Application (cf push)
  • Kubernetes, using a helm chart
  • Docker, using docker compose
  • Docker, single container deploying all components
  • npm run start
  • Other (please specify below)

Backend (portal-proxy) Deployment type

  • Cloud Foundry Application (cf push)
  • Kubernetes, using a helm chart
  • Docker, using docker compose
  • Docker, single container deploying all components
  • Other (please specify below)

Stratos 2.0.0-rc1 with pre SCF-2.11.0-rc1 on CaaSPv3-GM

Expected behaviour

The UI should either keep the session active until the user logs out, or redirect to the login page after a default session timeout.

Actual behaviour

When the UI isn't touched for a while the following error will be shown:

"We've been having trouble communicating with Cloud Foundry - You may be seeing out-of-date information"

Steps to reproduce the behavior

Log in to Stratos as admin, and leave the browser window open (idle) for a while (~10 min.). Then try to reuse the UI.

Log output covering before error and any error statements

"We've been having trouble communicating with Cloud Foundry - You may be seeing out-of-date information"

When I "Logout" and "Login" it works again, but will also loose communication after a while again.

Looks like the session times out by default, but the user isn't redirected to the login page. Instead the error message is shown.

@richard-cox
Copy link
Contributor

This sounds like a bug. We should show an 'Are you there?' prompt which if left should automatically log the user out. Does this not show at all? When you see this behaviour are you on an application page or another part of Stratos?

@svollath
Copy link
Author

JFYI: Now, the same error occured while I was constantly using the UI, so it's maybe not related to a default session timeout.

@nwmac nwmac added V2 P1 Priority 1 labels Jun 29, 2018
@richard-cox
Copy link
Contributor

Phew, ok. Are there any interesting statements in the browser's console? We'll show the error bar if a request to a specific CF fails. There should be more information in the request's response. Note - Requests can go out to multiple CF's, so the response for a specific CF response will be nested under it's guid.

@svollath
Copy link
Author

svollath commented Jun 29, 2018

There's one 401 for "verify", which is when the URL is given the first time, then one is redirected to the login page.
Now I reproduced the issue again, and then there's:

"WebSocket connection to 'wss://10.160.67.203.xip.io:8443/pp/v1/0bfc15ad-6595-43c1-9676-700fb5c02ec0/firehose' failed: HTTP Authentication failed; no valid credentials available" for "main".

But that happens just when I try to access "CloudFoundry"->"Firehose".
No error was logged, when it happened, or when I just switch between different menus.

Beside that there are only dozens of messages, saying

"[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952"

which don't seem related.

@svollath
Copy link
Author

Logs from the proxy container, when error appears:

ERRO[Fri Jun 29 13:34:17 UTC 2018] Unable to save a CNSI Token: Unable to UPDATE CNSI token: no rows were updated 
INFO[Fri Jun 29 13:34:17 UTC 2018] Couldn't save new token: Unable to save a CNSI Token: Unable to UPDATE CNSI token: no rows were updated 
WARN[Fri Jun 29 13:34:17 UTC 2018] Passthrough response: URL: https://api.10.160.67.203.xip.io/v2/apps/c7ec9831-3bc5-42e5-9c3c-286e8ee8e954/stats?order-direction=desc&order-direction-field=index&results-per-page=5&page=1, Status Code: 500, Status: Error proxing request, Content Type: Unknown, Length: -1 
WARN[Fri Jun 29 13:34:17 UTC 2018] Couldn't refresh token for CNSI with GUID 0bfc15ad-6595-43c1-9676-700fb5c02ec0 
Request: [2018-06-29T13:34:17Z] Remote-IP:"172.16.4.0" Method:"GET" Path:"/v1/proxy/v2/apps/c7ec9831-3bc5-42e5-9c3c-286e8ee8e954/stats" Status:200 Latency:2.575411902s Bytes-In:0 Bytes-Out:200```

@irfanhabib
Copy link
Contributor

irfanhabib commented Jul 2, 2018

Some more detail from @svollath

yes, it exactly happend now with RC2 - the deployment succeeded 20 min. ago and I was logged in for maybe 10-15 min. - I just let "Cloudfoundry"-"Firehose" run, and the switched to "Applications" after ~10min.. It could be that it's triggered by switching to another menu after a while.

Irfan Habib @IHabib 2:58 PM
ok I'll keep that in mind when testing
thanks

Sebastian Vollath @svollath 3:02 PM
... and btw. when it's in that state (Communication Error) - then, after another while "Are you still there" and redirect to the login page will both work. So in fact my initial thought is wrong. So feel free to change the title of that issue ...

Irfan Habib @IHabib 3:03 PM
So basically...
1. The redirect works when the `Are you still there` message pops up
2. What doesn't work is: there is an endpoint error (red bar) when you perform some operations after soem time?
is this correct?

Sebastian Vollath @svollath 3:06 PM
Yes, that's what I got from Friday - when I just left the UI from reproducing, I saw a "Are you still there" dialog, as well as it was back to the login page - but I mean that must have happened more than an hour later ...

@svollath svollath changed the title Session timeout doesn't redirect to login ("We've been having trouble communicating with Cloud Foundry") Endpoint disconnect ("We've been having trouble communicating with Cloud Foundry") Jul 2, 2018
@svollath
Copy link
Author

svollath commented Jul 2, 2018

Like mentioned in a comment before already the relation to session timeouts was wrong. I reproduced it with 2.0.0-rc2 as well, and even when it's disconnected, the session will time out and redirect as expected.

stratos_comm_err_msg

So the issue is about loosing communication to cloud foundry under UI usage - the proxy container logs "Couldn't refresh token for CNSI".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug P1 Priority 1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants