Skip to content
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

WebSocket session duration #968

Open
pablocarle opened this issue May 10, 2023 · 3 comments
Open

WebSocket session duration #968

pablocarle opened this issue May 10, 2023 · 3 comments
Assignees
Labels
bug Something isn't working new not yet triaged priority-medium An issue that isn't very important so it will be planned in the PI, once there are no more important severity-medium A bug where workaround exists or that doesn't prevent the usage of the Zowe or the use case, just ma terminal

Comments

@pablocarle
Copy link

Describe the bug

When accessing the Zowe Desktop through the Zowe API ML Gateway, and opening a WebSocket session by opening for example the TN 3270 emulator, the session will be closed after a 5 minute idling time.

This is mostly a question, to understand if the Zowe Desktop in standalone mode has a similar limitation from the client perspective, where it will close idling websockets after 5 minutes, or if there's something to be improved in the API ML Gateway (which acts as both a WebSocket server and client for the ZLUX)

Is this something that are you guys already aware of?

Steps to Reproduce

  1. Start Zowe
  2. Open Zowe Desktop through the API ML session
  3. Open TN 3270 emulator and login
  4. Wait 5 minutes without action
  5. WebSocket connection is closed and it requires to open it again.

Expected behavior

Screenshots (if needed)

image

Logs

2023-05-10 10:06:59.420 <ZWEAGW1:HttpClient@d0a2765e-scheduler-1:17171702> ZWESVUSR WARN  (o.z.a.g.w.WebSocketProxyClientHandler) WebSocket transport error in session 0c17328a-92de-47c4-8c9f-0539f0c528d9
org.eclipse.jetty.websocket.api.CloseException: java.util.concurrent.TimeoutException: Idle timeout expired: 300001/300000 ms
Caused by: java.util.concurrent.TimeoutException: Idle timeout expired: 300001/300000 ms
	... 9 common frames omitted
2023-05-10 10:06:59.422 <ZWEAGW1:HttpClient@d0a2765e-scheduler-1:17171702> ZWESVUSR DEBUG (o.z.a.g.w.WebSocketProxyClientHandler) afterConnectionClosed(session=JettyWebSocketSession[id=0c17328a-92de-47c4-8c9f-0539f0c528d9, uri=wss://usilca32.lvn.broadcom.net:40034/ZLUX/plugins/org.zowe.zlux.bootstrap/services/adminnotificationdata/_current/],status=CloseStatus[code=1001, reason=java.util.concurrent.TimeoutException: Idle timeout expired: 300001/300000 ms])

Describe your environment

  • Zowe version number nightly
  • Install method (pax, smpe, kubernetes, github clone): pax
  • Operating system (z/OS, kubernetes, etc) and OS version: z/OS
  • Node.js version number (Shown in logs, or via node --version):
  • Java version number (Shown in logs, or via java -version):
java version "1.8.0_351"
Java(TM) SE Runtime Environment (build 8.0.7.20 - pmz6480sr7fp20-20221020_01(SR7 FP20))
IBM J9 VM (build 2.9, JRE 1.8.0 z/OS s390x-64-Bit Compressed References 20220929_37824 (JIT enabled, AOT enabled)
  • z/OSMF version:
  • Browser:
  • Are you accessing the Desktop from the APIML Gateway? (Recommended): Yes
  • What is the output of log message ZWES1014I:
ZWES1014I ZIS status - 'Ok' (name='ZWESIS_LPARPRD  ', cmsRC='0', description='Ok', clientVersion='2')
  • Environment variables in use:

Additional context

@pablocarle pablocarle added bug Something isn't working new not yet triaged labels May 10, 2023
@pablocarle
Copy link
Author

Possibly related: https://stackoverflow.com/questions/49408031/websockets-in-chrome-and-firefox-disconnecting-after-one-minute-of-inactivity
Basically if the Zowe Desktop does not currently implement a custom ping to keep the socket open on inactivity it may be relying on the browser implementation. By looking at the network tab in Chrome I don't see the ping messages, but the implementation between the websocket client on the browser and the client on the Gateway side is different, since going directly to the Zowe Desktop results in a longer session even on inactivity.

Ideally I think there should be some implementation of a ping to keep the session open as long as the UI is open, this would work even with Gateway as it relies the messages.

@1000TurquoisePogs
Copy link
Member

It seems like we can add pings in the terminals because the server code just ignores messages that arent in a certain json format. So, we just need some interval code on the websocket code within here https://github.com/zowe/tn3270-ng2/blob/v2.x/staging/webClient/src/app/terminal.ts for example.

@1000TurquoisePogs 1000TurquoisePogs added priority-medium An issue that isn't very important so it will be planned in the PI, once there are no more important terminal severity-medium A bug where workaround exists or that doesn't prevent the usage of the Zowe or the use case, just ma labels May 12, 2023
@1000TurquoisePogs 1000TurquoisePogs self-assigned this May 12, 2023
@Martin-Zeithaml
Copy link

Some commercial terminals has a setting to press a key each several minutes. You can define which key and interval. This is another way how to keep the connection open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new not yet triaged priority-medium An issue that isn't very important so it will be planned in the PI, once there are no more important severity-medium A bug where workaround exists or that doesn't prevent the usage of the Zowe or the use case, just ma terminal
Projects
Status: Backlog
Development

No branches or pull requests

3 participants