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

Dockerfile JAVA_OPTS casing needs update? #1930

Closed
maar-moyo opened this issue Feb 25, 2020 · 1 comment
Closed

Dockerfile JAVA_OPTS casing needs update? #1930

maar-moyo opened this issue Feb 25, 2020 · 1 comment
Milestone

Comments

@maar-moyo
Copy link

maar-moyo commented Feb 25, 2020

Describe the bug

When freshly building an docker image with the latest master, the snake casing updates have caused an error since the dockerfile uses the previous camel casing.

This is remedied by changing the casing in the Dockerfile:

ENV JAVA_OPTS "-server -Xconcurrentio -Xmx1g -Xms1g -XX:+UseG1GC -Ddw.server.applicationConnectors[0].bindHost=0.0.0.0 -Ddw.server.applicationConnectors[0].port=8989"

to

ENV JAVA_OPTS "-server -Xconcurrentio -Xmx1g -Xms1g -XX:+UseG1GC -Ddw.server.application_connectors[0].bind_host=0.0.0.0 -Ddw.server.application_connectors[0].port=8989"

To Reproduce

  • docker build --no-cache -t graphhopper:latest .
  • ./graphhopper.sh import -i ./data/us-pacific-latest.osm.pbf
  • docker run --name graphhopper -p 8989:8989 graphhopper /data/us-pacific-latest.osm.pbf

Screenshots & Logs

docker run --name graphhopper -v ~/Data/osm:/srv/app/data -p 8989:8989 graphhopper /srv/app/data/us-pacific-latest.osm.pbf
## using java 1.8.0_242 (64bit) from /usr/local/openjdk-8
## using existing osm file /srv/app/data/us-pacific-latest.osm.pbf
## existing jar found web/target/graphhopper-web-1.0-SNAPSHOT.jar
## now web. JAVA_OPTS=-server -Xconcurrentio -Xmx1g -Xms1g -XX:+UseG1GC -Ddw.server.applicationConnectors[0].bindHost=0.0.0.0 -Ddw.server.applicationConnectors[0].port=8989
java.lang.IllegalArgumentException: Unable to override server.applicationConnectors[0].bindHost; node with index not found.
	at io.dropwizard.configuration.BaseConfigurationFactory.addOverride(BaseConfigurationFactory.java:189)
	at io.dropwizard.configuration.BaseConfigurationFactory.build(BaseConfigurationFactory.java:122)
	at io.dropwizard.configuration.BaseConfigurationFactory.build(BaseConfigurationFactory.java:89)
	at io.dropwizard.cli.ConfiguredCommand.parseConfiguration(ConfiguredCommand.java:126)
	at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:74)
	at io.dropwizard.cli.Cli.run(Cli.java:78)
	at io.dropwizard.Application.run(Application.java:93)
	at com.graphhopper.http.GraphHopperApplication.main(GraphHopperApplication.java:36)

I'm pretty sure this is an issue, let me know otherwise. It's quite easy to miss this if your docker images are not updated - unless I'm missing/misinterpreting something.

Thanks!

@karussell
Copy link
Member

karussell commented Feb 25, 2020

Indeed, thanks! Fixed.

@karussell karussell added this to the 1.0 milestone Feb 25, 2020
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