Docker instance failing - Non-resolvable parent POM for org.heigit.ors:openrouteservice:6.1.1

Hi All,

I’ve tried to build through docker-compose in centos7 and get the following error - anyone know how to resolve? Links have been removed from below due to posting restrictions. Hitting URL at port 8080 shows a Tomcat server congratulations message.

Package openrouteservice and deploy to Tomcat ###,

83838 [ERROR] [ERROR] Some problems were encountered while processing the POMs:,
[FATAL] Non-resolvable parent POM for org.heigit.ors:openrouteservice:6.1.1: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.4.RELEASE from/to HeiGIT main: No route to host (Host unreachable) and 'parent.relativePath' points at wrong local POM @ line 53, column 13,
 @ ,
83845 [ERROR] The build could not read 1 project -> [Help 1],
[ERROR]   ,
83846 [ERROR]   The project org.heigit.ors:openrouteservice:6.1.1 (/ors-core/openrouteservice/pom.xml) has 1 error,
83847 [ERROR]     Non-resolvable parent POM for org.heigit.ors:openrouteservice:6.1.1: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.4.RELEASE from/to HeiGIT main: No route to host (Host unreachable) and 'parent.relativePath' points at wrong local POM @ line 53, column 13 -> [Help 2],
83854 [ERROR] ,
83854 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.,
83854 [ERROR] Re-run Maven using the -X switch to enable full debug logging.,
83855 [ERROR] ,
83855 [ERROR] For more information about the errors and possible solutions, please read the following articles:,
83855 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException,
83856 [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException,
26-Jun-2020 04:36:26.300 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.32,
26-Jun-2020 04:36:26.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Feb 2 2016 19:34:53 UTC,
26-Jun-2020 04:36:26.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.32.0,
26-Jun-2020 04:36:26.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux,
26-Jun-2020 04:36:26.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.10.0-1127.13.1.el7.x86_64,
26-Jun-2020 04:36:26.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64,
26-Jun-2020 04:36:26.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/local/openjdk-8/jre,
26-Jun-2020 04:36:26.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_252-b09,
26-Jun-2020 04:36:26.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation,
26-Jun-2020 04:36:26.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat,
26-Jun-2020 04:36:26.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat,
26-Jun-2020 04:36:26.301 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:TargetSurvivorRatio=75,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:SurvivorRatio=64,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxTenuringThreshold=3,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseConcMarkSweepGC,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseParNewGC,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:ParallelGCThreads=4,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1g,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx2g,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=9001,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.rmi.port=9001,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=localhost,
26-Jun-2020 04:36:26.302 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/usr/local/tomcat/endorsed,
26-Jun-2020 04:36:26.303 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat,
26-Jun-2020 04:36:26.303 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat,
26-Jun-2020 04:36:26.303 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp,
26-Jun-2020 04:36:26.303 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib,
26-Jun-2020 04:36:26.368 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"],
26-Jun-2020 04:36:26.380 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read,
26-Jun-2020 04:36:26.382 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"],
26-Jun-2020 04:36:26.383 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read,
26-Jun-2020 04:36:26.385 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 301 ms,
26-Jun-2020 04:36:26.404 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina,
26-Jun-2020 04:36:26.405 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.32,
26-Jun-2020 04:36:26.418 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/ROOT,
26-Jun-2020 04:36:26.610 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/ROOT has finished in 195 ms,
26-Jun-2020 04:36:26.611 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/docs,
26-Jun-2020 04:36:26.627 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/docs has finished in 16 ms,
26-Jun-2020 04:36:26.628 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/examples,
26-Jun-2020 04:36:26.804 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/examples has finished in 176 ms,
26-Jun-2020 04:36:26.804 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/host-manager,
26-Jun-2020 04:36:26.824 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/host-manager has finished in 20 ms,
26-Jun-2020 04:36:26.824 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/manager,
26-Jun-2020 04:36:26.840 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat/webapps/manager has finished in 16 ms,
26-Jun-2020 04:36:26.842 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"],
26-Jun-2020 04:36:26.848 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"],
26-Jun-2020 04:36:26.859 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 472 ms,

Hi @rsou ,

I just built a clean docker image here and it got through the maven part (handling the POM) without any problems. Can you try it again now as it might just be a case that the repo it was pulling the dependency from was down.

Also, to reach the openrouteservice endpoints you would need to add /ors to your query url (so http://localhost:8080/ors)

Hi Adam,

Just tried again and it’s still doing the same thing. Your suggestion of a repo being down made me realise I need to use a proxy so I’ve tried using the -e HTTP_PROXY and HTTPS_PROXY args with docker run but that doesn’t make a difference. Seems that it’s not working due to not being able to access the repo - just not sure how to get it to use my proxy

Can you go into the container and do a wget http://repo.heigit.org/artifactory/main/org/springframework/boot/spring-boot-starter-parent/2.0.4.RELEASE/spring-boot-starter-parent-2.0.4.RELEASE.pom to see if it can get the parent pom that is needed outside of maven? Docker can be a bit tricky to get running when proxy servers are involved

@nils - have you seen this before?

Yes that works, wget returns the pom in the container and I can see it is connecting through the proxy which means maybe it isn’t a proxy issue?

Actually no sorry I made a silly mistake I was in a normal terminal not the container. When trying in the container it’s stuck with this:
Resolving repo.heigit.org ()… 129.206.7.121
Connecting to repo.heigit.org ()|129.206.7.121|:80…

EDIT: It’s on the second try and still not resolving. I guess this is a proxy issue. failed: No route to host.

OK, so it definitely seems something to do with the docker and the proxy or dns settings then. Can you ping/wget other addresses inside the container, though I assume that you won’t be able to.

I have just built here with the same docker configuration as on github and it manages to contact the repo.

I’m not sure really what to suggest as docker and proxies can be a pain to get working and it really is porbably going to just be a case of trying things that come up from google until it works

The container can’t access anything externally but if I export http_proxy= and export https_proxy= then it can. I have changed the dockerfile to have env http_proxy set, have followed this guide and have tried adding env variables in Portainer but alas I can’t find a way for docker to use a proxy as part of the build process. I’m going to try the non-docker route and just deploy to a tomcat server instead.

If anyone ever has this issue in future then the fix I got to work, which isn’t elegant but works, is to access the cli of the docker container (I use Portainer) and add a proxy entry to /usr/share/maven/conf/settings.xml. That did the trick for me in the end. I couldn’t get the maven_opts to pass in the proxy settings which I think is the more elegant solution.