2

I have just built and installed Open Trip Planner. I am quite confused as to how to acess the rest api.

Following This example, it says I should be able to make a rest query on my api at

http://otp.markware.net:9090/otp-rest-servlet/ws/metadata

but I get a Grizzly Not Found.saying the path does not exist.

I can, however, get an XML Response back from

http://otp.markware.net:9090/otp

which is

<serverInfo>
<serverVersion>
<version>1.0.0-SNAPSHOT</version>
<major>1</major>
<minor>0</minor>
<incremental>0</incremental>
<qualifier>SNAPSHOT</qualifier>
<commit>c3ab14e3632d5c875d031687a8eb58bcb57f12b3</commit>
<describe>opentripplanner-0.9.1-2594-gc3ab14e</describe>
<commit_time>30.06.2014 @ 23:35:13 UTC</commit_time>
<build_time>06.07.2014 @ 04:21:20 UTC</build_time>
</serverVersion>
<cpuName>Intel(R) Xeon(R) CPU E5606 @ 2.13GHz</cpuName>
<nCores>8</nCores>
</serverInfo>

The documentation simply states to check out http://otp.markware.net:9090/ after starting the server, I just get a blank page

What is the correct URL to use for the version I have built for the Web interface?

This is the Log showing the 404

     java -Xmx6G -jar target/otp.jar -p 9090 --server
    07:33:24.405 INFO (GraphServiceImpl.java:86) attempting to automatically register routerIds []
    07:33:24.410 INFO (GraphServiceImpl.java:87) graph files will be sought in paths relative to /var/otp/graphs
    07:33:24.410 INFO (GraphServiceFileImpl.java:232) registering routerId ''
    07:33:24.411 INFO (GraphServiceFileImpl.java:172) Loading graph...
    07:33:24.421 INFO (MavenVersion.java:53) Parsed Maven artifact version: 1.0.0-SNAPSHOT => MavenVersion(1, 0, 0, SNAPSHOT, c3ab14e3632d5c875d031687a8eb58bcb57f12b3) UID=-1000000
    07:33:24.694 INFO (Graph.java:658) Graph version: MavenVersion(1, 0, 0, SNAPSHOT, c3ab14e3632d5c875d031687a8eb58bcb57f12b3)
    07:33:24.695 INFO (Graph.java:659) OTP version:   MavenVersion(1, 0, 0, SNAPSHOT, c3ab14e3632d5c875d031687a8eb58bcb57f12b3)
    07:33:24.695 INFO (Graph.java:676) This graph was built with the currently running version and commit of OTP.
    07:35:46.021 INFO (Graph.java:628) Main graph read. |V|=892461 |E|=2193825
    07:35:53.572 INFO (GraphIndex.java:88) Indexing graph...
    07:35:56.242 INFO (GraphIndex.java:137) Done indexing graph.
    07:35:56.249 INFO (GraphUpdaterConfigurator.java:69) Using configurations:
    07:35:56.249 INFO (OTPServer.java:65) Wiring up and configuring server.
    07:35:56.265 INFO (GrizzlyServer.java:48) Starting OTP Grizzly server on ports 9090 (HTTP) and 8081 (HTTPS) of interface 0.0.0.0
    07:35:56.266 INFO (GrizzlyServer.java:50) Base path is X, graphs are at /var/otp/graphs
    07:35:56.897 INFO (ApplicationHandler.java:353) Initiating Jersey application, version Jersey: 2.8 2014-04-29 01:25:26...
    07:35:58.483 WARN (PropertiesHelper.java:321) There is no way how to transform value "true" [java.lang.Boolean] to type [java.lang.String].
    07:35:59.397 INFO (NetworkListener.java:721) Started listener bound to [0.0.0.0:9090]
    07:35:59.409 INFO (NetworkListener.java:721) Started listener bound to [0.0.0.0:8081]
    07:35:59.417 INFO (HttpServer.java:298) [HttpServer] Started.
    07:35:59.417 INFO (GrizzlyServer.java:108) Grizzly server running.
    javax.ws.rs.NotFoundException: HTTP 404 Not Found
            at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:266)
            at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
            at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
            at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
            at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
            at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
            at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
            at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:252)
            at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1023)
            at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:364)
            at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:217)
            at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
            at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
            at java.lang.Thread.run(Thread.java:745)

1 Answer 1

2

Solved ..

For the map instance, you have to add the index.html after the url. it does not default to the home page

http://otp.markware.net:9090/index.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.