osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

Running osrm-routed getting error

Open billystalnaker opened this issue 9 years ago • 11 comments

Hi, I ran osrm-routed on a north-america file and received this output:

[info] Threads: 8
[info] IP address: 0.0.0.0
[info] IP port: 80
[info] http 1.1 compression handled by zlib version 1.2.8
[info] Listening on: 0.0.0.0:80
[info] load names from: "/usr/src/osrm/osrm-backend/north-america-latest.osrm.names"
[info] set checksum: 823789383
[info] running and waiting for requests
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  remote_endpoint: Transport endpoint is not connected

I'm not sure how to handle this error. exact command: osrm-routed -p 80 north-america-latest.osrm

billystalnaker avatar Feb 24 '17 17:02 billystalnaker

@billystalnaker could you give more information about your system and osrm configuration. there were some related regressions in boost 1.54

oxidase avatar Feb 24 '17 18:02 oxidase

uname -a 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Mem: 2G CPU's 1

As far as osrm configuration I'm not sure what you want. We are using the car.lua profile. Hope that helps

billystalnaker avatar Feb 24 '17 19:02 billystalnaker

for osrm configuration i mean output of cmake with an empty cache: cd build && rm CMakeCache.txt && cmake ... The output will contain configuration flags and found library versions.

EDIT: The configuration is needed to cut off possible bugs in libraries. The exception must be handled at https://github.com/Project-OSRM/osrm-backend/blob/cd1a73dde65229cbc236f07a913baf66f0b3d1fb/include/server/server.hpp#L76-L77 similar to the answer in http://stackoverflow.com/a/22427401

Don't know how reliable osrm server must be, because it is just a demo? /cc @TheMarex @daniel-j-h

oxidase avatar Feb 24 '17 19:02 oxidase

Does that cmake .. rebuild the entire project? I don't want to go through that again...

billystalnaker avatar Feb 24 '17 20:02 billystalnaker

No it will just generate the Makefile and related files again. You can also use https://hub.docker.com/r/osrm/osrm-backend/tags/ and try if you have the same issues with it.

@oxidase osrm-routed really is just a dev server for testing - nothing to prioritize there.

daniel-j-h avatar Feb 24 '17 20:02 daniel-j-h

@billystalnaker the most important is the boost version . if boost libraries are installed as deb packages and used from the system than output of dpkg -l | grep libboost-system would be enough. But any other locally installed version can be used in the osrm configuration. If the boost version is 1.54 than it can be a problem in Boost.Asio and you can try to update boost version and rebuild osrm. If the boost version >= 1.55 than problem can be on a client side, but i can not guess what could happen. The error just says that a client dropped connection for whatever reason. Probably tcpdump or wireshark can show what happened with the connection.

@daniel-j-h basically thread loop must contain try/catch around io_service::run. But handling exception will not solve the original problem :disappointed:

oxidase avatar Feb 24 '17 21:02 oxidase

@daniel-j-h what do you mean by osrm-touted being a dev server? I was under the impression that this is the command to serve all requests to the osrm package.. I will take a look into the boost library on Monday

billystalnaker avatar Feb 24 '17 21:02 billystalnaker

No, osrm-routed is a ad hoc development HTTP server it doesn't even supper HTTP KeepAlive for example. We recommend https://github.com/Project-OSRM/node-osrm for production use.

daniel-j-h avatar Feb 24 '17 21:02 daniel-j-h

ubuntu: dpkg -l | grep libboost-system

ii  libboost-system1.58-dev:amd64          1.58.0+dfsg-5ubuntu3.1            amd64        Operating system (e.g. diagnostics support) library
ii  libboost-system1.58.0:amd64            1.58.0+dfsg-5ubuntu3.1            amd64        Operating system (e.g. diagnostics support) library

In the quick start maybe it should say something like "If you're using this in production, then use node-osrm."? I was under the impression that we were good to go with just the osrm-routed command.

billystalnaker avatar Feb 27 '17 15:02 billystalnaker

Please bare with me on this. But I've installed node-osrm on my server. and used make to make the files.. What do I do now? I am supposed to be running a node server..?

billystalnaker avatar Feb 27 '17 20:02 billystalnaker

You can do npm install osrm to get the latest release. Then check binaries and profiles in node_modules/osrm and prepare your data with them. Then see

https://github.com/Project-OSRM/node-osrm/blob/master/example/server.js

daniel-j-h avatar Feb 28 '17 09:02 daniel-j-h