【问题标题】:R Studio Redshift Connection Over VPNR Studio Redshift 通过 VPN 连接
【发布时间】:2019-09-29 15:39:56
【问题描述】:

我正在尝试使用 RPostgres 包连接到 Redshift。

通常这可以正常工作,但是我使用 VPN 连接到我的公司网络。

运行以下内容,显然带有敏感信息的占位符:

library(RPostgres)
con <- dbConnect(RPostgres::Postgres(),
                     dbname = "db",
                     host = "host.redshift.amazonaws.com",
                     port = 5439,
                     user = 'me',
                     password = 'password',
                    sslmode = 'require')

得到以下错误:

Error in connection_create(names(opts), as.vector(opts)) : could not connect to server: Operation timed out Is the server running on host "host.redshift.amazonaws.com" (IP Address) and accepting TCP/IP connections on port 5439?

我不熟悉 VPN 或它如何影响连接。

对这个问题的笼统性表示歉意,但希望有一些想法至少可以让我开始寻找解决方案。

【问题讨论】:

    标签: r rstudio amazon-redshift rpostgresql


    【解决方案1】:

    转到您的 Redshift 控制台,查看用于您的 Redshift 集群的安全组,在安全组设置中,查看 Inbound 设置,这些设置应该已启用来自您的 IP 的连接。但是当您使用 VPN 时,VPN 分配给您的 IP 可能不允许作为入站连接进行连接。

    因此,您可以通过安全组入站权限允许一系列 IP 进行连接,或者允许所有 IP 进行连接。

    【讨论】:

      猜你喜欢
      • 2015-04-13
      • 1970-01-01
      • 2017-04-13
      • 2012-04-22
      • 2015-02-20
      • 2023-03-08
      • 2011-12-21
      • 1970-01-01
      • 2011-12-16
      相关资源
      最近更新 更多