dbeaver / dbeaver/dbeaver

Refresh IP address upon reconnect

Open
#10,973 1 comment 3 reactions 0 assignees View on GitHub
xf:connection
Dominant language
Java
Stars
51.8k
Forks
4.4k
Avg merge
3d 8h
Merged PRs (30d)
188

Description

#### System information:
- Operating system (distribution) and version: MacOS Catalina 10.15.7
- DBeaver version: 7.3.1.202012201616

#### Connection specification:
- Database name and version: Snowflake 5.0.1
- Do you use tunnels or proxies (SSH, SOCKS, etc)? VPN (GlobalProtect)

#### Describe the problem you're observing:

If I try to connect to my DB while logged out of the VPN, DBeaver won't let me in, even if I log in to the VPN. I need to restart DBeaver so it becomes aware of my new IP address.

#### Steps to reproduce, if exist:

1. I try to connect
2. DBeaver responds "IP 1.2.3.4 not allowed". Damn! I forgot to connect to the VPN.
3. I connect to the VPN. Press "Invalidate/Reconnect" on DBeaver.
4. DBeaver responds "IP 1.2.3.4 not allowed". But that's not my IP anymore!
5. Restart DBeaver so it knows my new IP.
This happens whether I'm just starting DBeaver, or if some hours ago I was using it, but now the VPN connection has timed-out.

#### Include any warning/errors/backtraces from the logs

```2021-01-14 09:17:20.989 - SQL Error [390420] [XX000]: IP xxx.xxx.xxx.xxx is not allowed to access Snowflake. Contact your local security administrator.
org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error [390420] [XX000]: IP is not allowed.xxx.xxx.xxx.xxx to access Snowflake. Contact your local security administrator.
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:133)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:509)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$0(SQLQueryJob.java:440)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:168)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:427)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:812)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:3180)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:121)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:168)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:119)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$ResultSetDataPumpJob.run(ResultSetViewer.java:4512)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: net.snowflake.client.jdbc.SnowflakeSQLException: IP xxx.xxx.xxx.xxx is not allowed to access Snowflake. Contact your local security administrator.
at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowExceptionSub(SnowflakeUtil.java:151)
at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowException(SnowflakeUtil.java:76)
at net.snowflake.client.core.StmtUtil.pollForOutput(StmtUtil.java:503)
at net.snowflake.client.core.StmtUtil.execute(StmtUtil.java:380)
at net.snowflake.client.core.SFStatement.executeHelper(SFStatement.java:582)
at net.snowflake.client.core.SFStatement.executeQueryInternal(SFStatement.java:266)
at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:202)
at net.snowflake.client.core.SFStatement.execute(SFStatement.java:882)
at net.snowflake.client.jdbc.SnowflakeStatementV1.executeInternal(SnowflakeStatementV1.java:331)
at net.snowflake.client.jdbc.SnowflakeStatementV1.execute(SnowflakeStatementV1.java:395)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:327)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:130)
... 12 more```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.