gpt4 book ai didi

sql-server - 如何在 AWS Glue 中使用 JDBC 连接来连接 SQLServer

转载 作者:行者123 更新时间:2023-12-05 07:17:19 25 4
gpt4 key购买 nike

在提供 JDBC URL 格式后,我想使用 JDBC 连接选项将数据从 Glue 加载到 SQL Server

jdbc:sqlserver://host:port;databaseName=db_name, User name, and Password

,在测试连接时,我收到下面给出的错误。谁能帮助我哪里出错了?

2019-11-13 09:29:01 INFO  CatalogClient:682 - Got connection 'SQLServer' info from Catalog with url: jdbc:sqlserver://32.238.81.66:1433/Glue_Test
2019-11-13 09:29:02 INFO CatalogClient:718 - JDBC configuration for connection Staken QLServer: JDBCConfiguration(url=jdbc:sqlserver://32.238.81.66:1433/Glue_Test, hostname=32.238.81.66, port=1433, databaseVendor=sqlserver, databaseVersion=null, connectionName=SQLServer, path=Glue_Test, subnetId=subnet-3d416a13, availabilityZone=us-east-1b, securityGroups=[sg-c4d3929b], enforceSSL=false, customJDBCCert=null, skipCustomJDBCCertValidation=null, customJDBCCertString=null)
2019-11-13 09:29:02 INFO JdbcConnection:46 - Starting connecter. driver SQLServerDriver:2
2019-11-13 09:29:02 INFO JdbcConnection:64 - Attempting to connect with SSL host matching: jdbc:sqlserver://32.238.81.66:1433;database={Glue_Test};hostNameInCertificate=32.238.81.66
2019-11-13 09:29:17 INFO JdbcConnection:73 - SSL connection to data store using host matching failed. Retrying without host matching.
2019-11-13 09:29:17 INFO JdbcConnection:87 - Attempting to connect with SSL: jdbc:sqlserver://32.238.81.66:1433;database={Glue_Test}
2019-11-13 09:29:32 INFO JdbcConnection:92 - SSL connection to data store failed. Retrying without SSL.
2019-11-13 09:29:32 INFO JdbcConnection:106 - Attempting to connect without SSL: jdbc:sqlserver://32.238.81.66:1433;database={Glue_Test}
Check that your connection definition references your JDBC database with correct URL syntax, username, and password. The TCP/IP connection to the host 32.238.81.66, port 1433 has failed.

Error: "Connection timed out: no further information. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.". Exiting with error code 30

最佳答案

粘合连接的工作方式与您允许在任何 VPC 中进行通信的方式非常相似。 Glue 将启动一个弹性网络接口(interface),以方便与您的数据库进行通信。您可以测试的第一件事是,在与数据库相同的子网和安全组中启动一个实例,然后执行“nc -vz dbendpoint port”。如果您可以成功连接,这将确认安全组允许在该端口上进行通信。

从胶水使用相同的子网和安全组,这应该没有问题。您也可以将其用作引用:https://docs.aws.amazon.com/glue/latest/dg/start-connecting.html

关于sql-server - 如何在 AWS Glue 中使用 JDBC 连接来连接 SQLServer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58834438/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com