openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.17k stars 911 forks source link

Internal Server Error on upload GPS trace to api06.dev.openstreetmap.org #1209

Closed westnordost closed 8 years ago

westnordost commented 8 years ago

Currently it is not possible to upload a GPS trace to the dev api server. The API call returns i.e. error code 500: Errno::ENOENT: No such file or directory @ sys_fail2 - (/tmp/0.1109884814850981, /home/osm/traces/793.gpx)

I tested this by using this simple HTML form to upload each a minimal GPX file to http://api.openstreetmap.org/api/0.6/gpx/create and to http://api06.dev.openstreetmap.org/api/0.6/gpx/create. The live API correcly returns simply the trace ID in plain text, the dev API returns the mentioned error.

<html>
<body>
    <form  enctype="multipart/form-data" action="http://api06.dev.openstreetmap.org/api/0.6/gpx/create"  method="post">
        <input name="file" type="file" />
        <input value="test case desc" name="description" />
        <input value="a tag" name="tags" />
        <input value="private" name="visibility" />
        <input type="submit"/>
    </form>
</body>
</html>
westnordost commented 8 years ago

I can reproduce this with this minimal GPX file:

<?xml version='1.0' encoding='UTF-8' ?>
<gpx
    version="1.0"
    creator="osmapi unit test"
    xmlns="http://www.topografix.com/GPX/1/0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
    <trk>
        <trkseg>
            <trkpt lat="1.23" lon="3.45"/>
        </trkseg>
    </trk>
</gpx>
tomhughes commented 8 years ago

Yes GPX uploads are not supported on the dev server currently. That's not a rails code issue though, so not something for this tracker, it's just an operational issues with the configuration of that instance.

westnordost commented 8 years ago

Is there another place where I should report this issue to or is this definitely a will-not-fix? I wouldn't like my unit tests to work with live data.

tomhughes commented 8 years ago

Well both https://github.com/openstreetmap/chef/issues and https://github.com/openstreetmap/operations/issues would be more appropriate than here.

It's non-trivial though so I wouldn't expect any quick fixes - there is a PR at https://github.com/openstreetmap/chef/pull/31 that attempted it but it needs quite a but of work to make it usable.

westnordost commented 8 years ago

Thank you for the infos :-)