Libpostal service disabled

Hi, I got pelias UP but sope parts of it does not behave as they should?

{
  "geocoding": {
    "version": "0.2",
    "attribution": "http://localhost:4000/attribution",
    "query": {
      "text": "Pori",
      "size": 10,
      "layers": [
        "venue",
        "street",
        "country",
        "macroregion",
        "region",
        "county",
        "localadmin",
        "locality",
        "borough",
        "neighbourhood",
        "continent",
        "empire",
        "dependency",
        "macrocounty",
        "macrohood",
        "microhood",
        "disputed",
        "postalcode",
        "ocean",
        "marinearea"
      ],
      "private": false,
      "lang": {
        "name": "Finnish",
        "iso6391": "fi",
        "iso6393": "fin",
        "via": "header",
        "defaulted": false
      },
      "querySize": 20,
      "parser": "pelias",
      "parsed_text": {
        "subject": "Pori",
        "locality": "Pori"
      }
    },
    "warnings": [
      "performance optimization: excluding 'address' layer"
    ],
    "errors": [
      **"libpostal service disabled"**
    ],
    "engine": {
      "name": "Pelias",
      "author": "Mapzen",
      "version": "1.0"
    },
    "timestamp": 1717438173776
  },
  "type": "FeatureCollection",
  "features": []
}

… as you see, I got error: Libpostal service is not enabled for some reason.

For anyone else having this issue, add section ‘services’ to pelias.json.

My pelias.conf:

{
  "esclient": {
    "apiVersion": "7.x",
    "keepAlive": true,
    "requestTimeout": "120000",
    "hosts": [{
      "env": "development",
      "protocol": "http",
      "host": "localhost",
      "port": 9200
    }],
    "log": [{
      "type": "stdio",
      "json": false,
      "level": [ "error", "warning", "info", "debug" ]
    }]
  },
  "elasticsearch": {
    "settings": {
      "index": {
        "number_of_replicas": "0",
        "number_of_shards": "5",
        "refresh_interval": "1m"
      }
    }
  },
  "interpolation": {
    "client": {
      "adapter": "null"
    }
  },
  "dbclient": {
    "statFrequency": 10000,
    "batchSize": 500
  },
  "api": {
    "services": {
      "placeholder": {
        "url": "http://placeholder:4100"
      },
      "libpostal": {
        "url": "http://libpostal:4400"
      },
      "pip": {
        "url": "http://pip-service:4200"
      },
      "elasticsearch": {
        "url": "http://elasticsearch:9200"
      },
      "interpolation": {
        "url": "http://interpolation:4300"
      }
    },
    "accessLog": "common",
    "host": "http://pelias.mapzen.com/",
    "indexName": "pelias",
    "version": "1.0",
    "targets": {
      "auto_discover": true,
      "canonical_sources": ["whosonfirst", "openstreetmap", "openaddresses", "geonames"],
      "layers_by_source": {
        "openstreetmap": [ "address", "venue", "street" ],
        "openaddresses": [ "address" ],
        "geonames": [
          "country", "macroregion", "region", "county", "localadmin", "locality", "borough",
          "neighbourhood", "venue"
        ],
        "whosonfirst": [
          "continent", "empire", "country", "dependency", "macroregion", "region", "locality",
          "localadmin", "macrocounty", "county", "macrohood", "borough", "neighbourhood",
          "microhood", "disputed", "venue", "postalcode", "ocean", "marinearea"
        ]
      },
      "source_aliases": {
        "osm": [ "openstreetmap" ],
        "oa":  [ "openaddresses" ],
        "gn":  [ "geonames" ],
        "wof": [ "whosonfirst" ]
      },
      "layer_aliases": {
        "coarse": [
          "continent", "empire", "country", "dependency", "macroregion", "region", "locality",
          "localadmin", "macrocounty", "county", "macrohood", "borough", "neighbourhood",
          "microhood", "disputed", "postalcode", "ocean", "marinearea"
        ]
      }
    }
  },
  "schema": {
    "indexName": "pelias"
  },
  "logger": {
    "level": "info",
    "timestamp": true,
    "colorize": true
  },
  "acceptance-tests": {
    "endpoints": {
      "local": "http://localhost:3100/v1/"
    }
  },
  "imports": {
    "adminLookup": {
      "enabled": true,
      "maxConcurrentRequests": 100,
      "usePostalCities": true
    },
    "blacklist": {
      "files": []
    },
    "csv": {
    },
    "geonames": {
      "datapath": "/XXXXXXXX/docker-data/geonames",
      "countryCode": "FI"
    },
    "openstreetmap": {
      "datapath": "/XXXXXXXX/docker-data/openstreetmap",
      "leveldbpath": "/XXXXXXXX/docker-data",
      "import": [{
        "filename": "finland-latest.osm.pbf"
      }]
    },
    "openaddresses": {
      "datapath": "/XXXXXXXX/docker-data/openaddresses",
      "token": "oa.bbbcf5787bb4251445883cc417f811ba02b9fd64809fd56c5a972171fbcfb2f6",
      "files": [ "fi/countrywide-fi.csv", "fi/countrywide-sv.csv" ]
    },
    "polyline": {
      "datapath": "/XXXXXXXX/docker-data/polyline",
      "files": []
    },
    "whosonfirst": {
      "datapath": "/XXXXXXXX/docker-data/whosonfirst",
      "importPostalcodes": true
    }
  }
}

and I’ve manually made the directories & set ownership with

chown <USER>:docker -R <datadir>
chmod ug+wrx,o-wrx -R <datadir>
1 Like