[GH-ISSUE #527] Where can I set the session timeout of the webpage please? #157

Closed
opened 2026-03-07 20:45:31 +03:00 by kerem · 13 comments
Owner

Originally created by @praynise on GitHub (Nov 2, 2021).
Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/527

version: cloudbeaver ce 21.1.4
jdk:adoptopenjdk 11.0.13
problem:the webpage alert 'session expired' to often,the session expired every minute,while i was still writing sql.i try to configure 'session lifetime' in adminstration but it does not work.where can i configure the session lifetime of the webpage?please advise,many thx

Originally created by @praynise on GitHub (Nov 2, 2021). Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/527 version: cloudbeaver ce 21.1.4 jdk:adoptopenjdk 11.0.13 problem:the webpage alert 'session expired' to often,the session expired every minute,while i was still writing sql.i try to configure 'session lifetime' in adminstration but it does not work.where can i configure the session lifetime of the webpage?please advise,many thx
kerem 2026-03-07 20:45:31 +03:00
Author
Owner

@kseniiaguzeeva commented on GitHub (Nov 2, 2021):

  1. Could you please tell what session lifetime did you set? Did you change it after that?
  2. Also could you check the settings in the local configuration (\cloudbeaver\workspace.data.cloudbeaver.runtime.conf)?
    notepad_f599XGUE4Z
  3. Could you please try to clean cookies?
  4. and try the latest release 21.2.1 if it doesn't help?
<!-- gh-comment-id:957168899 --> @kseniiaguzeeva commented on GitHub (Nov 2, 2021): 1. Could you please tell what session lifetime did you set? Did you change it after that? 2. Also could you check the settings in the local configuration (\cloudbeaver\workspace\.data\.cloudbeaver.runtime.conf)? ![notepad_f599XGUE4Z](https://user-images.githubusercontent.com/51405061/139804536-a0f3cb1a-3df6-43cf-9165-82fff93527ef.png) 3. Could you please try to clean cookies? 4. and try [the latest release 21.2.1](https://github.com/dbeaver/cloudbeaver) if it doesn't help?
Author
Owner

@N-ickJones commented on GitHub (Nov 3, 2021):

I'm having the same issue.
Capture

The popup will keep showing up even with the expireSessionAfterPeriod is set to 600000 in the .cloudbeaver.runtime.conf. I cannot find any indicators through the logs, as to what is triggering the popup.

I'm using docker-compose v.3.8 and the only modifications I've made are adding some templates to the workspace/GlobalConfiguration/.dbeaver/data-sources.json as show below

{
	"folders": {},
	"connections": {
		"postgresql-template-1": {
			"provider": "postgresql",
			"driver": "postgres-jdbc",
			"name": "--Redacted--",
			"save-password": true,
			"read-only": false,
			"configuration": {
				"host": "--Redacted--",
				"port": "5432",
				"database": "--Redacted--",
				"url": "jdbc:postgresql://--Redacted--:5432/--Redacted--?user=--Redacted--&password=--Redacted--",
				"type": "dev",
				"auth-model": "native"
			}
		},
		"microsoft-sql-server-template-1": {
			"provider": "sqlserver",
			"driver": "microsoft",
			"name": "--Redacted--",
			"save-password": true,
			"show-system-objects": true,
			"read-only": false,
			"configuration": {
				"host": "--Redacted--",
				"port": "1433",
				"database": "master",
				"url": "jdbc:sqlserver://;serverName=--Redacted--;databaseName=master;username=--Redacted--;password={--Redacted--;",
				"type": "dev",
				"auth-model": "native"
			}
		},
		"microsoft-sql-server-template-2": {
			"provider": "sqlserver",
			"driver": "microsoft",
			"name": "--Redacted--",
			"save-password": true,
			"show-system-objects": true,
			"read-only": false,
			"configuration": {
				"host": "--Redacted--",
				"port": "1433",
				"database": "--Redacted--",
				"url": "jdbc:sqlserver://;serverName=--Redacted--;databaseName=master;username=--Redacted--;password={--Redacted--};",
				"type": "dev",
				"auth-model": "native"
			}
		}
	},
	"connection-types": {
		"dev": {
			"name": "Development",
			"color": "255,255,255",
			"description": "Regular development database",
			"auto-commit": true,
			"confirm-execute": false,
			"confirm-data-change": false,
			"auto-close-transactions": false
		}
	}
}

My .cloudbeaver.runtim.conf looks as follows

{
  "server": {
    "serverName": "--Redacted--",
    "serverURL": "http://localhost:8080",
    "expireSessionAfterPeriod": 600000,
    "develMode": true
  },
  "app": {
    "anonymousAccessEnabled": true,
    "supportsCustomConnections": true,
    "publicCredentialsSaveEnabled": true,
    "adminCredentialsSaveEnabled": true,
    "defaultNavigatorSettings": {},
    "enabledFeatures": [],
    "enabledAuthProviders": [
      "local"
    ]
  }
}
<!-- gh-comment-id:959628257 --> @N-ickJones commented on GitHub (Nov 3, 2021): I'm having the same issue. ![Capture](https://user-images.githubusercontent.com/49326743/140100369-76202498-a5ba-4b83-b375-30248963d4f6.PNG) The popup will keep showing up even with the expireSessionAfterPeriod is set to 600000 in the .cloudbeaver.runtime.conf. I cannot find any indicators through the logs, as to what is triggering the popup. I'm using docker-compose v.3.8 and the only modifications I've made are adding some templates to the workspace/GlobalConfiguration/.dbeaver/data-sources.json as show below ``` { "folders": {}, "connections": { "postgresql-template-1": { "provider": "postgresql", "driver": "postgres-jdbc", "name": "--Redacted--", "save-password": true, "read-only": false, "configuration": { "host": "--Redacted--", "port": "5432", "database": "--Redacted--", "url": "jdbc:postgresql://--Redacted--:5432/--Redacted--?user=--Redacted--&password=--Redacted--", "type": "dev", "auth-model": "native" } }, "microsoft-sql-server-template-1": { "provider": "sqlserver", "driver": "microsoft", "name": "--Redacted--", "save-password": true, "show-system-objects": true, "read-only": false, "configuration": { "host": "--Redacted--", "port": "1433", "database": "master", "url": "jdbc:sqlserver://;serverName=--Redacted--;databaseName=master;username=--Redacted--;password={--Redacted--;", "type": "dev", "auth-model": "native" } }, "microsoft-sql-server-template-2": { "provider": "sqlserver", "driver": "microsoft", "name": "--Redacted--", "save-password": true, "show-system-objects": true, "read-only": false, "configuration": { "host": "--Redacted--", "port": "1433", "database": "--Redacted--", "url": "jdbc:sqlserver://;serverName=--Redacted--;databaseName=master;username=--Redacted--;password={--Redacted--};", "type": "dev", "auth-model": "native" } } }, "connection-types": { "dev": { "name": "Development", "color": "255,255,255", "description": "Regular development database", "auto-commit": true, "confirm-execute": false, "confirm-data-change": false, "auto-close-transactions": false } } } ``` My .cloudbeaver.runtim.conf looks as follows ``` { "server": { "serverName": "--Redacted--", "serverURL": "http://localhost:8080", "expireSessionAfterPeriod": 600000, "develMode": true }, "app": { "anonymousAccessEnabled": true, "supportsCustomConnections": true, "publicCredentialsSaveEnabled": true, "adminCredentialsSaveEnabled": true, "defaultNavigatorSettings": {}, "enabledFeatures": [], "enabledAuthProviders": [ "local" ] } } ```
Author
Owner

@kseniiaguzeeva commented on GitHub (Nov 3, 2021):

Could you please tell your CLoudBeaver version and try:

<!-- gh-comment-id:959650262 --> @kseniiaguzeeva commented on GitHub (Nov 3, 2021): Could you please tell your CLoudBeaver version and try: - to clean cookies? - the [latest release 21.2.1](https://github.com/dbeaver/cloudbeaver) if cleaning cookies didn't help?
Author
Owner

@N-ickJones commented on GitHub (Nov 3, 2021):

The session expired and I pressed 'Reload'. The logs show

cloudbeaver_1  | 2021-11-03 09:05:04.876 - > Expire session 'node01ldoeytrnm2cyjod7gcnhhv710'
cloudbeaver_1  | 2021-11-03 09:08:03.808 - > New web session 'node01ldoeytrnm2cyjod7gcnhhv710'
cloudbeaver_1  | 2021-11-03 09:08:24.408 - > New web session 'node01aa1s4nrcavjo1veogbsavtzfz0'

I've just attempted to clear the cookies and waited. The session expired popup appeared after about 30-60 seconds.
My Dockerfile is using dbeaver/cloudbeaver:latest

<!-- gh-comment-id:959663866 --> @N-ickJones commented on GitHub (Nov 3, 2021): The session expired and I pressed 'Reload'. The logs show ``` cloudbeaver_1 | 2021-11-03 09:05:04.876 - > Expire session 'node01ldoeytrnm2cyjod7gcnhhv710' cloudbeaver_1 | 2021-11-03 09:08:03.808 - > New web session 'node01ldoeytrnm2cyjod7gcnhhv710' cloudbeaver_1 | 2021-11-03 09:08:24.408 - > New web session 'node01aa1s4nrcavjo1veogbsavtzfz0' ``` I've just attempted to clear the cookies and waited. The session expired popup appeared after about 30-60 seconds. My Dockerfile is using dbeaver/cloudbeaver:latest
Author
Owner

@kseniiaguzeeva commented on GitHub (Nov 3, 2021):

Thank you for the details. Could you please provide me with server logs completely (you can find server.log and .log in your local config files: cloudbeaver\workspace\.metadata\)?

<!-- gh-comment-id:959704746 --> @kseniiaguzeeva commented on GitHub (Nov 3, 2021): Thank you for the details. Could you please provide me with server logs completely (you can find `server.log` and `.log` in your local config files: `cloudbeaver\workspace\.metadata\`)?
Author
Owner

@N-ickJones commented on GitHub (Nov 3, 2021):

Ok I'll get the server.log. I've been looking at the session token.

After restarting the container, I get the following log:

cloudbeaver_1  | 2021-11-03 09:21:18.565 - > New web session 'node02mds35bye38xftcitzsnpr211'

*Update 11:57am 11/03/2021 CST
cloudbeaver_1  | 2021-11-03 09:31:21.225 - > Expire session 'node02mds35bye38xftcitzsnpr211'

The cookie looks as follows:

name: cb-session
value: 2021-11-03T09:31:18Z
domain: localhost
path: /
expires: 2021-11-03T16:52:26.572Z
priority: medium
name: DBEAVER_SESSION_ID
value: node02mds35bye38xftcitzsnpr211.node0
domain: localhost
path: /
expires: Session
priority: medium

.log

<!-- gh-comment-id:959724337 --> @N-ickJones commented on GitHub (Nov 3, 2021): Ok I'll get the server.log. I've been looking at the session token. After restarting the container, I get the following log: ``` cloudbeaver_1 | 2021-11-03 09:21:18.565 - > New web session 'node02mds35bye38xftcitzsnpr211' *Update 11:57am 11/03/2021 CST cloudbeaver_1 | 2021-11-03 09:31:21.225 - > Expire session 'node02mds35bye38xftcitzsnpr211' ``` The cookie looks as follows: ``` name: cb-session value: 2021-11-03T09:31:18Z domain: localhost path: / expires: 2021-11-03T16:52:26.572Z priority: medium ``` ``` name: DBEAVER_SESSION_ID value: node02mds35bye38xftcitzsnpr211.node0 domain: localhost path: / expires: Session priority: medium ``` [.log](https://github.com/dbeaver/cloudbeaver/files/7469346/default.log)
Author
Owner

@N-ickJones commented on GitHub (Nov 3, 2021):

I see the message

The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

Seems like I have an issue after modifying the workspace, where the application think's it needs to recover changes causing the reset of the ression?

<!-- gh-comment-id:959727934 --> @N-ickJones commented on GitHub (Nov 3, 2021): I see the message ``` The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. ``` Seems like I have an issue after modifying the workspace, where the application think's it needs to recover changes causing the reset of the ression?
Author
Owner

@N-ickJones commented on GitHub (Nov 3, 2021):

I think I've got it working now. I had changed aka 10 minutes.

"expireSessionAfterPeriod": 600000,

After, I had previous had it at 60 minutes and increased it without success. I think the issue I encountered is that when changing the workspace expireSessionAfterPeriod variable or when using the Administration > Server Configuration > Server Information > Session Lifetime feature, the cookie wasn't being reset? I'll continue to monitor it and see if the issue appears again.

<!-- gh-comment-id:959739674 --> @N-ickJones commented on GitHub (Nov 3, 2021): I think I've got it working now. I had changed aka 10 minutes. ``` "expireSessionAfterPeriod": 600000, ``` After, I had previous had it at 60 minutes and increased it without success. I think the issue I encountered is that when changing the workspace expireSessionAfterPeriod variable or when using the Administration > Server Configuration > Server Information > Session Lifetime feature, the cookie wasn't being reset? I'll continue to monitor it and see if the issue appears again.
Author
Owner

@N-ickJones commented on GitHub (Nov 3, 2021):

Additionally, I have a docker compose volume binding that I changed during my troubleshooting which could have been the issue.
Original

cloudbeaver:
    build:
      context: ./database_configs/cloudbeaver
      dockerfile: Dockerfile
    restart: unless-stopped
    volumes: 
      - ./database_configs/cloudbeaver/workspace:/opt/cloudbeaver/workspace
    ports:
      - 8080:8978

While session is properly working

cloudbeaver:
    build:
      context: ./database_configs/cloudbeaver
      dockerfile: Dockerfile
    restart: unless-stopped
    volumes: 
      - ./database_configs/cloudbeaver/workspace:/opt/cloudbeaver/workspace:rw
    ports:
      - 8080:8978
<!-- gh-comment-id:959745721 --> @N-ickJones commented on GitHub (Nov 3, 2021): Additionally, I have a docker compose volume binding that I changed during my troubleshooting which could have been the issue. Original ``` cloudbeaver: build: context: ./database_configs/cloudbeaver dockerfile: Dockerfile restart: unless-stopped volumes: - ./database_configs/cloudbeaver/workspace:/opt/cloudbeaver/workspace ports: - 8080:8978 ``` While session is properly working ``` cloudbeaver: build: context: ./database_configs/cloudbeaver dockerfile: Dockerfile restart: unless-stopped volumes: - ./database_configs/cloudbeaver/workspace:/opt/cloudbeaver/workspace:rw ports: - 8080:8978 ```
Author
Owner

@kseniiaguzeeva commented on GitHub (Nov 8, 2021):

Thank you for the additional details. We are going to fix this issue.

<!-- gh-comment-id:963165159 --> @kseniiaguzeeva commented on GitHub (Nov 8, 2021): Thank you for the additional details. We are going to fix this issue.
Author
Owner

@kseniiaguzeeva commented on GitHub (Nov 10, 2021):

@praynise @N-ickJones Could you please tell me your timezone? I'm trying to reproduce the issue.

<!-- gh-comment-id:965087021 --> @kseniiaguzeeva commented on GitHub (Nov 10, 2021): @praynise @N-ickJones Could you please tell me your timezone? I'm trying to reproduce the issue.
Author
Owner

@N-ickJones commented on GitHub (Nov 10, 2021):

@kseniiaguzeeva I'm in the CST timezone. I'll continue to try to recreate the issue and give you detailed steps once I accomplish that.

<!-- gh-comment-id:965443258 --> @N-ickJones commented on GitHub (Nov 10, 2021): @kseniiaguzeeva I'm in the CST timezone. I'll continue to try to recreate the issue and give you detailed steps once I accomplish that.
Author
Owner

@kseniiaguzeeva commented on GitHub (Dec 10, 2021):

Please fell free to ask to reopen the ticket if the issue appears again.

<!-- gh-comment-id:990929799 --> @kseniiaguzeeva commented on GitHub (Dec 10, 2021): Please fell free to ask to reopen the ticket if the issue appears again.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#157
No description provided.