【问题标题】:Snowflake connector "Cannot connect to Snowflake"雪花连接器“无法连接到雪花”
【发布时间】:2021-07-22 13:00:57
【问题描述】:

我正在使用 Kafka 并尝试将雪花与它连接,但它没有连接。 它给出了服务器和集群应该在同一个区域的某种区域错误,我在本地 Kafka 上尝试过并且不接受“snowflake.url.name”。

这是分布式模式下的配置文件。

curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d '
{
  "name":"XYZCompanySensorData",
  "config":{
    "connector.class":"com.snowflake.kafka.connector.SnowflakeSinkConnector",
    "tasks.max":"2",
    "topics":"MysqlJConfluent.source.user_details",
    "buffer.count.records":"10000",
    "buffer.flush.time":"60",
    "buffer.size.bytes":"5000000",
    "snowflake.url.name":"fk79721.europe-west2.gcp.snowflakecomputing.com",
    "snowflake.user.name":"********",
    "snowflake.private.key":"********************************************",
    "snowflake.database.name":"DEMO_DB",
    "snowflake.schema.name":"PUBLIC",
    "key.converter":"org.apache.kafka.connect.storage.StringConverter",
    "value.converter":"com.snowflake.kafka.connector.records.SnowflakeAvroConverter"
  }
}'

日志文件:

HTTP/1.1 100 Continue

HTTP/1.1 400 Bad Request
Date: Wed, 28 Apr 2021 11:50:41 GMT
Content-Type: application/json
Content-Length: 368
Server: Jetty(9.4.33.v20201020)

{"error_code":400,"message":"Connector configuration is invalid and contains the following 3 error(s):\nsnowflake.url.name: Cannot connect to Snowflake\nsnowflake.user.name: Cannot connect to Snowflake\nsnowflake.private.key: Cannot connect to Snowflake\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"}

请告诉我如何连接。

【问题讨论】:

  • 您确定凭据正确吗?并且可以从连接器运行的位置访问该 url?
  • 是的,凭据是正确的。我测试了多个帐户但没有用。
  • 很难提供更多帮助。您是否尝试联系 Snowflake 支持?

标签: apache-kafka snowflake-cloud-data-platform apache-kafka-connect confluent-cloud


【解决方案1】:

这一行:

"snowflake.url.name":"fk79721.europe-west2.gcp.snowflakecomputing.com

表明你没有关闭引号,它应该是这样的:

"snowflake.url.name":"fk79721.europe-west2.gcp.snowflakecomputing.com:443"

【讨论】:

  • 当我将它粘贴到 StackOverflow 时,这是一个拼写错误……它是正确的,但仍然出现同样的错误。 HTTPS:// 和端口号是可选的,我尝试使用它们但仍然没有用。
  • 试试那里提到的curl,看看你得到了什么错误。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-03-22
  • 2023-04-09
  • 1970-01-01
  • 2019-06-18
  • 2019-01-23
  • 2018-10-20
  • 1970-01-01
相关资源
最近更新 更多