Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading bike rental feed from http://digitransit-proxy:8080/out/helsinki #313

Open
saminami opened this issue Jun 23, 2019 · 1 comment

Comments

@saminami
Copy link

When I try to run the docker image I get the following:
Error reading bike rental feed from http://digitransit-proxy:8080/out/helsinki-fi.smoove.pro/api-public/stations
java.net.UnknownHostException: digitransit-proxy

Steps to reproduce the problem

docker run --rm --name otp-hsl -p 9080:8080 -e ROUTER_NAME=hsl -e JAVA_OPTS=-Xmx5g -e ROUTER_DATA_CONTAINER_URL=https://api.digitransit.fi/routing-data/v2/hsl hsldevcom/opentripplanner

@optionsome
Copy link
Member

optionsome commented Aug 15, 2019

Sorry for the late response and lack of documentation for properly configuring these things. We use https://github.com/HSLdevcom/digitransit-proxy inside our environment to cache responses from external sources such as https://helsinki-fi.smoove.pro/api-public/stations. However, if you want to be able to fetch the data about helsinki/espoo citybikes, you can edit the router-config.json found in https://api.digitransit.fi/routing-data/v2/graph-hsl-.zip and host the zip yourself (keep the name of the zip as it is) and just change the ROUTER_DATA_CONTAINER_URL point to where you have the zip hosted. In the router-config.json you can just replace the bikerental URL with https://helsinki-fi.smoove.pro/api-public/stations. However, you might get similar errors from other sources now which can't all be circumvented because the proxy adds required authentication headers but you can just remove those from router-config.json which you don't need or you cant access without giving auth credentials.

Another thing, you might have to allocate slightly more memory for java (Xmx7g should be enough and you might get away with less than that). Also, you should use hsldevcom/opentripplanner:prod if you want to use the production data found in api.digitransit.fi. Alternatively, you can fetch the data from dev-api.digitransit.fi and keep using the no-tag docker image which defaults to latest tag, which we use in our development environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants