Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 如何在AWS Glue中使用JDBC连接连接SQLServer_Sql Server_Jdbc_Aws Glue - Fatal编程技术网

Sql server 如何在AWS Glue中使用JDBC连接连接SQLServer

Sql server 如何在AWS Glue中使用JDBC连接连接SQLServer,sql-server,jdbc,aws-glue,Sql Server,Jdbc,Aws Glue,在提供JDBCURL格式后,我想使用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 wi

在提供JDBCURL格式后,我想使用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将启动一个弹性网络接口,以方便与数据库的通信。首先要测试的是,在与数据库相同的子网和安全组中启动一个实例,并执行“nc-vz dbendpoint port”。这将确认,如果您能够成功连接,安全组允许在该端口上进行通信


从胶水使用相同的子网和安全组,这应该没有问题。您还可以将此作为参考:

如果您可以上传代码片段,说明您如何从glue脚本访问数据库,这将非常有用。