AWS GLUE - SQL服务器SSL加密错误

时间:2017-11-07 18:40:46

标签: sql-server amazon-web-services ssl encryption aws-glue

我尝试使用AWS Glue将数据从EC2实例中的SQL Server上传到RedShift。

我创建了Connections和Crawlers,并且它工作正常。

然后我创建了一个Job来加载我得到以下错误的数据。

  

驱动程序无法与SQL Server建立安全连接   使用安全套接字层(SSL)加密。错误:   “sun.security.validator.ValidatorException:PKIX路径构建失败:   sun.security.provider.certpath.SunCertPathBuilderException:无法   找到所请求目标的有效证书路径“。

日志:

raceback (most recent call last):
File "script_2017-10-24-06-24-48.py", line 20, in <module>
datasource0 = glueContext.create_dynamic_frame.from_catalog(database = "XXX", table_name = "XXXXXXX", transformation_ctx = "datasource0")
File "/mnt/yarn/usercache/root/appcache/application_1508826088545_0001/container_1508826088545_0001_02_000001/PyGlue.zip/awsglue/dynamicframe.py", line 508, in from_catalog
File "/mnt/yarn/usercache/root/appcache/application_1508826088545_0001/container_1508826088545_0001_02_000001/PyGlue.zip/awsglue/context.py", line 120, in create_dynamic_frame_from_catalog
File "/mnt/yarn/usercache/root/appcache/application_1508826088545_0001/container_1508826088545_0001_02_000001/PyGlue.zip/awsglue/data_source.py", line 36, in getFrame
File "/mnt/yarn/usercache/root/appcache/application_1508826088545_0001/container_1508826088545_0001_02_000001/py4j-0.10.4-src.zip/py4j/java_gateway.py", line 1133, in __call__
File "/mnt/yarn/usercache/root/appcache/application_1508826088545_0001/container_1508826088545_0001_02_000001/pyspark.zip/pyspark/sql/utils.py", line 63, in deco
File "/mnt/yarn/usercache/root/appcache/application_1508826088545_0001/container_1508826088545_0001_02_000001/py4j-0.10.4-src.zip/py4j/protocol.py", line 319, in get_return_value
py4j.protocol.Py4JJavaError: An error occurred while calling o59.getDynamicFrame.
: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". ClientConnectionId:1ee3a8e5-a3a1-4871-a94c-28907c04acef
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2392)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1777)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1969)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1616)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1447)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:788)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1187)
at com.amazonaws.services.glue.util.JDBCWrapper$$anonfun$getRawConnection$1.apply(JDBCUtils.scala:535)
at com.amazonaws.services.glue.util.JDBCWrapper$$anonfun$getRawConnection$1.apply(JDBCUtils.scala:535)
at com.amazonaws.services.glue.util.JDBCWrapper.catchSSLException(JDBCUtils.scala:514)
at com.amazonaws.services.glue.util.JDBCWrapper.getRawConnection(JDBCUtils.scala:535)
at com.amazonaws.services.glue.JDBCDataSource.getPrimaryKeys(DataSource.scala:392)
at com.amazonaws.services.glue.JDBCDataSource.getDynamicFrame(DataSource.scala:354)
at com.amazonaws.services.glue.DataSource$class.getDynamicFrame(DataSource.scala:45)
at com.amazonaws.services.glue.SparkSQLDataSource.getDynamicFrame(DataSource.scala:317)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)

0 个答案:

没有答案