我有一个本地托管的 CartoDB 实例,当我上传 KML 文件时,我收到以下错误。
无法加载数据 (2001)
我们无法将您文件中的数据加载到数据库中。
我检查了日志并在 development.log 上找到了这个
2016-03-06 11:52:56 UTC: Filename: /tmp/imports/20160306-8915-1m8eifb/map_12.kml Size (bytes): 769
true: Importing data from /tmp/imports/20160306-8915-1m8eifb/map_12.kml
true: File-based import load
true: Detected encoding UTF-8
true: Using database connection with {:adapter=>"postgres", :encoding=>"unicode", :host=>"localhost", :port=>5432, :database=>"cartodb_dev_user_45677c0a-c82a-43a8-ae8e-5d9fe453b76a_db", :username=>"postgres", :conn_validator_timeout=>900, :user=>"development_cartodb_user_6ab70972-9698-46b3-ba19-e821f563084e"}
false: ogr2ogr call: OSM_USE_CUSTOM_INDEXING=NO PG_USE_COPY=YES PGCLIENTENCODING=UTF-8 /usr/bin/ogr2ogr2 -f PostgreSQL PG:"host=localhost port=5432 user=development_cartodb_user_6ab70972-9698-46b3-ba19-e821f563084e dbname=cartodb_dev_user_45677c0a-c82a-43a8-ae8e-5d9fe453b76a_db password=15c7b5083320ff4bae1e2d4340c298bd73cf923adevelopment_cartodb_user_6ab70972-9698-46b3-ba19-e821f563084e" -t_srs EPSG:4326 -lco DIM=2 -lco PRECISION=NO /tmp/imports/20160306-8915-1m8eifb/map_12.kml -nln cdb_importer.importer_f77d7e50e39111e5ab510242ac110002 -nlt PROMOTE_TO_MULTI
true: ogr2ogr output: ERROR 4: Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the
directory containing EPSG csv files.
ERROR 1: Failed to process SRS definition: EPSG:4326
true: ogr2ogr exit code: 256
2016-03-06 11:52:57 UTC: Ogr2ogr FAILED!
2016-03-06 11:52:57 UTC: ogr2ogr.exit_code = 256
2016-03-06 11:52:57 UTC: ogr2ogr.command = OSM_USE_CUSTOM_INDEXING=NO PG_USE_COPY=YES PGCLIENTENCODING=UTF-8 /usr/bin/ogr2ogr2 -f PostgreSQL PG:"host=localhost port=5432 user=development_cartodb_user_6ab70972-9698-46b3-ba19-e821f563084e dbname=cartodb_dev_user_45677c0a-c82a-43a8-ae8e-5d9fe453b76a_db password=15c7b5083320ff4bae1e2d4340c298bd73cf923adevelopment_cartodb_user_6ab70972-9698-46b3-ba19-e821f563084e" -t_srs EPSG:4326 -lco DIM=2 -lco PRECISION=NO /tmp/imports/20160306-8915-1m8eifb/map_12.kml -nln cdb_importer.importer_f77d7e50e39111e5ab510242ac110002 -nlt PROMOTE_TO_MULTI
2016-03-06 11:52:57 UTC: ogr2ogr.command_output = ERROR 4: Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the
directory containing EPSG csv files.
ERROR 1: Failed to process SRS definition: EPSG:4326
true: Errored importing data from /tmp/imports/20160306-8915-1m8eifb/map_12.kml:
false: CartoDB::Importer2::LoadError: 2016-03-06 11:52:56 UTC: Running on server c55d5fa50056 with PID: 8915
2016-03-06 11:52:56 UTC: new_importer()
2016-03-06 11:52:56 UTC: Fetching datasource public_url metadata for item id /cartodb/public/uploads/ebb774d4a1a7d86868c8/map_(12).kml
2016-03-06 11:52:56 UTC: File will be downloaded from /cartodb/public/uploads/ebb774d4a1a7d86868c8/map_(12).kml
2016-03-06 11:52:56 UTC: Before importer run
2016-03-06 11:52:56 UTC: Starting import for /cartodb/public/uploads/ebb774d4a1a7d86868c8/map_(12).kml
2016-03-06 11:52:56 UTC: Unpacking /cartodb/public/uploads/ebb774d4a1a7d86868c8/map_(12).kml
2016-03-06 11:52:56 UTC: Filename: /tmp/imports/20160306-8915-1m8eifb/map_12.kml Size (bytes): 769
true: Importing data from /tmp/imports/20160306-8915-1m8eifb/map_12.kml
true: File-based import load
true: Detected encoding UTF-8
true: Using database connection with {:adapter=>"postgres", :encoding=>"unicode", :host=>"localhost", :port=>5432, :database=>"cartodb_dev_user_45677c0a-c82a-43a8-ae8e-5d9fe453b76a_db", :username=>"postgres", :conn_validator_timeout=>900, :user=>"development_cartodb_user_6ab70972-9698-46b3-ba19-e821f563084e"}
false: ogr2ogr call: OSM_USE_CUSTOM_INDEXING=NO PG_USE_COPY=YES PGCLIENTENCODING=UTF-8 /usr/bin/ogr2ogr2 -f PostgreSQL PG:"host=localhost port=5432 user=development_cartodb_user_6ab70972-9698-46b3-ba19-e821f563084e dbname=cartodb_dev_user_45677c0a-c82a-43a8-ae8e-5d9fe453b76a_db password=15c7b5083320ff4bae1e2d4340c298bd73cf923adevelopment_cartodb_user_6ab70972-9698-46b3-ba19-e821f563084e" -t_srs EPSG:4326 -lco DIM=2 -lco PRECISION=NO /tmp/imports/20160306-8915-1m8eifb/map_12.kml -nln cdb_importer.importer_f77d7e50e39111e5ab510242ac110002 -nlt PROMOTE_TO_MULTI
true: ogr2ogr output: ERROR 4: Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the
directory containing EPSG csv files.
ERROR 1: Failed to process SRS definition: EPSG:4326
true: ogr2ogr exit code: 256
2016-03-06 11:52:57 UTC: Ogr2ogr FAILED!
2016-03-06 11:52:57 UTC: ogr2ogr.exit_code = 256
2016-03-06 11:52:57 UTC: ogr2ogr.command = OSM_USE_CUSTOM_INDEXING=NO PG_USE_COPY=YES PGCLIENTENCODING=UTF-8 /usr/bin/ogr2ogr2 -f PostgreSQL PG:"host=localhost port=5432 user=development_cartodb_user_6ab70972-9698-46b3-ba19-e821f563084e dbname=cartodb_dev_user_45677c0a-c82a-43a8-ae8e-5d9fe453b76a_db password=15c7b5083320ff4bae1e2d4340c298bd73cf923adevelopment_cartodb_user_6ab70972-9698-46b3-ba19-e821f563084e" -t_srs EPSG:4326 -lco DIM=2 -lco PRECISION=NO /tmp/imports/20160306-8915-1m8eifb/map_12.kml -nln cdb_importer.importer_f77d7e50e39111e5ab510242ac110002 -nlt PROMOTE_TO_MULTI
2016-03-06 11:52:57 UTC: ogr2ogr.command_output = ERROR 4: Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the
directory containing EPSG csv files.
ERROR 1: Failed to process SRS definition: EPSG:4326
true: Errored importing data from /tmp/imports/20160306-8915-1m8eifb/map_12.kml:
===LOG END===
true: ----------------------------------------------------
false: ["/cartodb/services/importer/lib/importer/loader.rb:335:in `check_for_import_errors'", "/cartodb/services/importer/lib/importer/loader.rb:268:in `run_ogr2ogr'", "/cartodb/services/importer/lib/importer/loader.rb:63:in `block (2 levels) in run'", "/cartodb/lib/cartodb/stats/aggregator.rb:97:in `method_missing'", "/cartodb/services/importer/lib/importer/loader.rb:62:in `block in run'", "/cartodb/lib/cartodb/stats/aggregator.rb:97:in `method_missing'", "/cartodb/services/importer/lib/importer/loader.rb:52:in `run'", "/cartodb/services/importer/lib/importer/runner.rb:227:in `file_based_loader_run'", "/cartodb/services/importer/lib/importer/runner.rb:179:in `import'", "/cartodb/services/importer/lib/importer/runner.rb:335:in `execute_import'", "/cartodb/services/importer/lib/importer/runner.rb:264:in `block (3 levels) in single_resource_import'", "/cartodb/services/importer/lib/importer/runner.rb:258:in `each'", "/cartodb/services/importer/lib/importer/runner.rb:258:in `each_with_index'", "/cartodb/services/importer/lib/importer/runner.rb:258:in `block (2 levels) in single_resource_import'", "/cartodb/lib/cartodb/stats/aggregator.rb:97:in `method_missing'", "/cartodb/services/importer/lib/importer/runner.rb:253:in `block in single_resource_import'", "/cartodb/lib/cartodb/stats/aggregator.rb:97:in `method_missing'", "/cartodb/services/importer/lib/importer/runner.rb:231:in `single_resource_import'", "/cartodb/services/importer/lib/importer/runner.rb:97:in `run_import'", "/cartodb/services/importer/lib/importer/runner.rb:90:in `block in run'", "/cartodb/lib/cartodb/stats/aggregator.rb:97:in `method_missing'", "/cartodb/services/importer/lib/importer/runner.rb:89:in `run'", "/cartodb/app/connectors/importer.rb:41:in `run'", "/cartodb/app/models/data_import.rb:644:in `new_importer'", "/cartodb/app/models/data_import.rb:378:in `dispatch'", "/cartodb/app/models/data_import.rb:172:in `run_import!'", "/cartodb/lib/resque/importer_jobs.rb:9:in `block in perform'", "/cartodb/lib/resque/base_job.rb:21:in `call'", "/cartodb/lib/resque/base_job.rb:21:in `run_action'", "/cartodb/lib/resque/importer_jobs.rb:9:in `perform'", "/usr/local/rvm/gems/ruby-2.2.3/gems/resque-1.25.2/lib/resque/job.rb:240:in `block (3 levels) in perform'", "/usr/local/rvm/gems/ruby-2.2.3/gems/resque-metrics-0.1.1/lib/resque/metrics.rb:353:in `around_perform_metrics'", "/usr/local/rvm/gems/ruby-2.2.3/gems/resque-1.25.2/lib/resque/job.rb:239:in `block (2 levels) in perform'", "/usr/local/rvm/gems/ruby-2.2.3/gems/resque-1.25.2/lib/resque/job.rb:247:in `call'", "/usr/local/rvm/gems/ruby-2.2.3/gems/resque-1.25.2/lib/resque/job.rb:247:in `perform'", "/usr/local/rvm/gems/ruby-2.2.3/gems/resque-1.25.2/lib/resque/worker.rb:250:in `perform'", "/usr/local/rvm/gems/ruby-2.2.3/gems/resque-1.25.2/lib/resque/worker.rb:189:in `block in work'", "/usr/local/rvm/gems/ruby-2.2.3/gems/resque-1.25.2/lib/resque/worker.rb:166:in `loop'", "/usr/local/rvm/gems/ruby-2.2.3/gems/resque-1.25.2/lib/resque/worker.rb:166:in `work'", "/usr/local/rvm/gems/ruby-2.2.3/gems/resque-1.25.2/lib/resque/tasks.rb:41:in `block (2 levels) in <top (required)>'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'", "/usr/local/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'", "/usr/local/rvm/gems/ruby-2.2.3/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'", "/usr/local/rvm/gems/ruby-2.2.3/bin/rake:23:in `load'", "/usr/local/rvm/gems/ruby-2.2.3/bin/rake:23:in `<main>'", "/usr/local/rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'", "/usr/local/rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'"]
true: ----------------------------------------------------
2016-03-06 11:52:57 UTC: Proceeding to register
2016-03-06 11:52:57 UTC: After importer run
2016-03-06 11:52:57 UTC: After dispatch
2016-03-06 11:52:57 UTC: ERROR!
错误 4:无法打开 EPSG 支持文件 gcs.csv。尝试将 GDAL_DATA 环境变量设置为指向包含 EPSG csv 文件的目录。错误 1:无法处理 SRS 定义:EPSG:4326
因为我得到这个错误,我手动设置GDAL_DATA
到正确的位置。现在我可以手动发出osg2osg
命令而不会出现上述错误(我之前做不到)。但是 CartoDB 仍然报错,我什至重新启动了 VM。
请帮我解决这个问题!