Closed NikitaMears closed 1 year ago
Hello, I'm using pelias docker and when I run the command pelias elastic create i get
http: invalid Host header
this is my pelias.json
{ "logger": { "level": "info", "timestamp": false }, "esclient": { "apiVersion": "7.x", "hosts": [ { "host": "elasticsearch", "port": 9200 } ] }, "elasticsearch": { "settings": { "index": { "refresh_interval": "10s", "number_of_replicas": "0", "number_of_shards": "1" } } }, "acceptance-tests": { "endpoints": { "docker": "http://api:4000/v1/" } }, "api": { "services": { "placeholder": { "url": "http://placeholder:4100" }, "pip": { "url": "http://pip:4200" }, "interpolation": { "url": "http://interpolation:4300" }, "libpostal": { "url": "http://libpostal:4400" } }, "defaultParameters": { "focus.point.lat": 45.52, "focus.point.lon": -122.67 } }, "imports": { "adminLookup": { "enabled": true }, "blacklist": { "files": [ "/data/blacklist/osm.txt" ] }, "csv": { "datapath": "/data/csv", "files": [], "download": [ "https://raw.githubusercontent.com/pelias/csv-importer/master/data/example.csv" ] }, "geonames": { "datapath": "/data/geonames", "countryCode": "ALL" }, "openstreetmap": { "download": [ { "sourceURL": "https://data.geocode.earth/archive/portland-metro/2022-06-20/portland_oregon.osm.pbf" } ], "leveldbpath": "/tmp", "datapath": "/data/openstreetmap", "import": [{ "filename": "portland_oregon.osm.pbf" }] }, "openaddresses": { "datapath": "/data/openaddresses", "files": [ "us/or/portland_metro.csv", "us/or/city_of_salem.csv", "us/or/marion_and_polk.csv", "us/or/marion.csv", "us/or/hood_river.csv", "us/wa/city_of_richland.csv", "us/wa/clark.csv" ] }, "polyline": { "datapath": "/data/polylines", "files": [ "extract.0sv" ] }, "whosonfirst": { "datapath": "/data/whosonfirst", "importPostalcodes": true, "countryCode": "US", "importPlace": [ "85688513", "85688623" ] }, "transit": { "datapath": "/data/transit", "feeds": [ { "layerId": "bikeshare", "url": "https://gbfs.biketownpdx.com/gbfs/en/station_information.json", "filename": "BIKETOWN-hubs.json", "agencyId": "BIKETOWN", "agencyName": "BIKETOWN", "layerName": "bikeshare" }, { "layerId": "stops", "url": "http://developer.trimet.org/schedule/gtfs.zip", "filename": "TRIMET-stops.txt", "agencyId": "TRIMET", "agencyName": "TriMet", "layerName": "Stop" }, { "layerId": "stops", "url": "https://data.geocode.earth/archive/portland-metro/2022-06-20/C-TRAN.zip", "filename": "C-TRAN-stops.txt", "agencyId": "C-TRAN", "agencyName": "C-TRAN", "layerName": "Stop" }, { "layerId": "stops", "url": "http://oregon-gtfs.com/gtfs_data/rideconnection-or-us/rideconnection-or-us.zip", "filename": "RIDECONNECTION-stops.txt", "agencyId": "RIDECONNECTION", "agencyName": "Ride Connection", "layerName": "Stop" }, { "layerId": "stops", "url": "http://oregon-gtfs.com/gtfs_data/sandy-or-us/sandy-or-us.zip", "filename": "SAM-stops.txt", "agencyId": "SAM", "agencyName": "SAM", "layerName": "Stop" }, { "layerId": "stops", "url": "http://data.trilliumtransit.com/gtfs/wilsonville-or-us/wilsonville-or-us.zip", "filename": "SMART-stops.txt", "agencyId": "SMART", "agencyName": "SMART", "layerName": "Stop" }, { "layerId": "stops", "url": "http://oregon-gtfs.com/gtfs_data/swanisland-or-us/swanisland-or-us.zip", "filename": "SWAN-stops.txt", "agencyId": "SWAN", "agencyName": "Swan Island", "layerName": "Stop" } ] }, "interpolation": { "download": { "tiger": { "datapath": "/data/tiger", "states": [ { "state_code": 41, "county_code": 67, "name": "Washington County, OR" }, { "state_code": 41, "county_code": 51, "name": "Multnomah County, OR" }, { "state_code": 41, "county_code": 5, "name": "Clackamas County, OR" }, { "state_code": 41, "county_code": 71, "name": "Yamhill County, OR" }, { "state_code": 41, "county_code": 47, "name": "Marion County, OR" }, { "state_code": 41, "county_code": 53, "name": "Polk County, OR" }, { "state_code": 53, "county_code": 11, "name": "Clark County, WA" } ] } } } } }
this is my yaml
version: '3' networks: default: driver: bridge services: libpostal: image: pelias/libpostal-service container_name: pelias_libpostal user: "${DOCKER_USER}" restart: always ports: [ "127.0.0.1:4400:4400" ] schema: image: pelias/schema:master container_name: pelias_schema user: "${DOCKER_USER}" volumes: - "./pelias.json:/code/pelias.json" api: image: pelias/api:master container_name: pelias_api user: "${DOCKER_USER}" restart: always environment: [ "PORT=4000" ] ports: [ "0.0.0.0:4000:4000" ] volumes: - "./pelias.json:/code/pelias.json" placeholder: image: pelias/placeholder:master container_name: pelias_placeholder user: "${DOCKER_USER}" restart: always environment: [ "PORT=4100" ] ports: [ "127.0.0.1:4100:4100" ] volumes: - "./pelias.json:/code/pelias.json" - "${DATA_DIR}:/data" - "./blacklist/:/data/blacklist" whosonfirst: image: pelias/whosonfirst:master container_name: pelias_whosonfirst user: "${DOCKER_USER}" volumes: - "./pelias.json:/code/pelias.json" - "${DATA_DIR}:/data" - "./blacklist/:/data/blacklist" openstreetmap: image: pelias/openstreetmap:master container_name: pelias_openstreetmap user: "${DOCKER_USER}" volumes: - "./pelias.json:/code/pelias.json" - "${DATA_DIR}:/data" - "./blacklist/:/data/blacklist" openaddresses: image: pelias/openaddresses:master container_name: pelias_openaddresses user: "${DOCKER_USER}" volumes: - "./pelias.json:/code/pelias.json" - "${DATA_DIR}:/data" - "./blacklist/:/data/blacklist" transit: image: pelias/transit:master container_name: pelias_transit user: "${DOCKER_USER}" volumes: - "./pelias.json:/code/pelias.json" - "${DATA_DIR}:/data" csv-importer: image: pelias/csv-importer:master container_name: pelias_csv_importer user: "${DOCKER_USER}" volumes: - "./pelias.json:/code/pelias.json" - "${DATA_DIR}:/data" - "./blacklist/:/data/blacklist" polylines: image: pelias/polylines:master container_name: pelias_polylines user: "${DOCKER_USER}" volumes: - "./pelias.json:/code/pelias.json" - "${DATA_DIR}:/data" interpolation: image: pelias/interpolation:master container_name: pelias_interpolation user: "${DOCKER_USER}" restart: always environment: [ "PORT=4300" ] ports: [ "127.0.0.1:4300:4300" ] volumes: - "./pelias.json:/code/pelias.json" - "${DATA_DIR}:/data" pip: image: pelias/pip-service:master container_name: pelias_pip-service user: "${DOCKER_USER}" restart: always environment: [ "PORT=4200" ] ports: [ "127.0.0.1:4200:4200" ] volumes: - "./pelias.json:/code/pelias.json" - "${DATA_DIR}:/data" elasticsearch: image: pelias/elasticsearch:7.16.1 container_name: pelias_elasticsearch user: "${DOCKER_USER}" restart: always ports: [ "127.0.0.1:9200:9200", "127.0.0.1:9300:9300" ] volumes: - "${DATA_DIR}/elasticsearch:/usr/share/elasticsearch/data" ulimits: memlock: soft: -1 hard: -1 nofile: soft: 65536 hard: 65536 cap_add: [ "IPC_LOCK" ] fuzzy-tester: image: pelias/fuzzy-tester:master container_name: pelias_fuzzy_tester user: "${DOCKER_USER}" restart: "no" command: "--help" volumes: - "./pelias.json:/code/pelias.json" - "./test_cases:/code/pelias/fuzzy-tester/test_cases"
Are you possibly running Docker 20.10.24 (dated 2023-10-30)?
https://stackoverflow.com/a/77396079
This works. Thanks.
Hello, I'm using pelias docker and when I run the command pelias elastic create i get
http: invalid Host header
this is my pelias.json
this is my yaml