我正在尝试将使用docker部署的Cygnus连接到我的CartoDB帐户。我遵循的过程是将新版本的cartodb_keys.conf文件复制到容器中,然后停止容器并启动它。
我发现的问题是,当Cygnus启动时,它会以某种方式从cartodb_keys.conf文件中删除API密钥,从而产生以下错误
time=2018-02-14T12:41:23.930Z | lvl=INFO | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=startAllComponents | msg=org.apache.flume.node.Application[173] : Starting Sink cartodb-sink
time=2018-02-14T12:41:23.931Z | lvl=INFO | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=initializeBackend | msg=com.telefonica.iot.cygnus.sinks.NGSICartoDBSink[284] : [cartodb-sink] Json containing CartoDB API keys has been read: { "cartodb_keys": [ { "username": "myuser", "endpoint": "https://myuser.cartodb.com", "type": "professional" } ]}
time=2018-02-14T12:41:23.939Z | lvl=INFO | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=initializeBackend | msg=com.telefonica.iot.cygnus.sinks.NGSICartoDBSink[288] : [cartodb-sink] Json containing CartoDB API keys is syntactically OK
time=2018-02-14T12:41:23.943Z | lvl=WARN | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=initializeBackend | msg=com.telefonica.iot.cygnus.sinks.NGSICartoDBSink[343] : [cartodb-sink] Invalid API key entry, key is null or empty. Discarding it.
time=2018-02-14T12:41:23.944Z | lvl=ERROR | corr=N/A | trans=N/A | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=start | msg=com.telefonica.iot.cygnus.sinks.NGSICartoDBSink[274] : [cartodb-sink] Error while creating the CartoDB persistence backend. Details: All the API key entries were discarded
但是,cartodb_keys.conf文件如下:
{
"cartodb_keys": [
{
"username": "myuser",
"endpoint": "https://myuser.cartodb.com",
"key":"myapikey",
"type":"professional"
}
]
}
重启后访问容器时,/ opt / apache-flume / conf / cartodb_keys.conf文件如下:
{
"cartodb_keys": [
{
"username": "jmgarciaemergya",
"endpoint": "https://jmgarciaemergya.cartodb.com",
"key":""
"type": "professional"
}
]
}
你对可能发生的事情有任何线索吗?
祝你好运