CUTR-at-USF / OpenTripPlanner-for-Android

An Android app for multi-modal trip planning and navigation using any OpenTripPlanner server.
Other
130 stars 91 forks source link

App unable to connect to server #493

Closed sundarkumarakella closed 5 years ago

sundarkumarakella commented 5 years ago

I hosted an OTP server following the below instructions: https://opentripplanner.readthedocs.io/en/latest/Basic-Tutorial/

Then when I am trying to connect to the server I am unable to access the API, please help, as i have perfectly done the installation and put the end point of my server as the custom url

barbeau commented 5 years ago

@sundarkumarakella What version of OTP are you running? Can you provide logs from Android Studio LogCat?

sundarkumarakella commented 5 years ago

I started the server using a opt-1.3.0 shaded jar file from maven central The Grizzly server starts working and localhost:8080 even pops open the OTP But when I perform a port forwarding of my localhost to an externally accessible address, and I enter it in the app, the following are the responses:

d1

and in the software, where i can see the requests recieved at the server, there is a NOT FOUND error at GET /serverinfo

d2

barbeau commented 5 years ago

@sundarkumarakella What URL are you entering into the app? Have you tried accessing the same URL from a normal computer browser outside the firewall? Same for any OTP API request from an external computer browser?

sundarkumarakella commented 5 years ago

java -Xmx2G -jar otp-1.3.0-shaded.jar --build "/OTP" --inMemory is the command I am using to start up the grizzly server, which loads up at http://localhost:8080 I performed a port forwarding hence making my localhost accessible publicly for testing my app.

Yes, it is working from a normal computer outside the firewall: c8

I think the app requires a web server API, but the server I am setting up doesn't look like it can satisfy the /serverinfo request. I think there is no ample doc as to set up an API server which can connect to the App.

http://dev.opentripplanner.org/apidoc/

The above is the apidoc I suppose but there is no related installation/setup related documentation

barbeau commented 5 years ago

@sundarkumarakella API should be deployed as part of the normal OTP server - see http://docs.opentripplanner.org/en/latest/Basic-Tutorial/#other-simple-requests.

Try entering those testing URLs into a browser to see if you can get them working from outside the firewall. I'd suggest posting questions about this to the OTP dev group: https://groups.google.com/forum/#!forum/opentripplanner-dev

Once you get that working, try the app again, and if it doesn't work re-open this issue.