Opened 4 years ago

Closed 5 weeks ago

#5314 closed defect (fixed)

Internal error when uploading a GPX trace on DEV API server

Reported by: don-vip Owned by: Tom Hughes
Priority: minor Milestone:
Component: admin Version:
Keywords: gpx upload Cc:

Description

Hi, I face an HTTP 500 when trying to upload a GPX file to:

http://api06.dev.openstreetmap.org/api/0.6/gpx/create

with new JOSM code (not committed yet). I think my request is correct, but I cannot tell for sure. Can you please tell me what's the reason of the error?

Here's my debug output:

INFO: POST http://api06.dev.openstreetmap.org/api/0.6/gpx/create... 
DEBUG: --57482f97af80015157b18b8558285ad1
Content-Disposition: form-data; name="file"; filename="2011-08-20 0831 - edit3.gpx"
Content-Type: application/octet-stream

<?xml version='1.0' encoding='UTF-8'?>
<gpx version="1.1" creator="JOSM GPX export" xmlns="http://www.topografix.com/GPX/1/1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">

	(snip...)
</gpx>
--57482f97af80015157b18b8558285ad1
Content-Disposition: form-data; name="description"

test description
--57482f97af80015157b18b8558285ad1
Content-Disposition: form-data; name="tags"

test, gavarnie
--57482f97af80015157b18b8558285ad1
Content-Disposition: form-data; name="visibility"

private
--57482f97af80015157b18b8558285ad1--

DEBUG: Opening HTTP connection to http://api06.dev.openstreetmap.org/api/0.6/gpx/create
DEBUG: REQUEST: {Connection=[close], User-Agent=[JOSM/1.5 (8400 SVN en) Windows 8.1 64-Bit Java/1.8.0_45]}
INFO: Internal Server Error
WARNING: java.io.IOException: Server returned HTTP response code: 500 for URL: http://api06.dev.openstreetmap.org/api/0.6/gpx/create. Cause: java.io.IOException: Server returned HTTP response code: 500 for URL: http://api06.dev.openstreetmap.org/api/0.6/gpx/create
java.io.IOException: Server returned HTTP response code: 500 for URL: http://api06.dev.openstreetmap.org/api/0.6/gpx/create
...
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://api06.dev.openstreetmap.org/api/0.6/gpx/create
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1839)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
	at java.net.HttpURLConnection.getResponseMessage(HttpURLConnection.java:546)
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:675)
	... 9 more
ERROR: Error header: Errno::ENOENT: No such file or directory @ sys_fail2 - (/tmp/0.9949734825597144, /home/osm/traces/725.gpx)
DEBUG: RESPONSE: {Transfer-Encoding=[chunked], Status=[500 Internal Server Error], x-request-id=[0a2f5ae5-48a4-46bb-9393-2d8d0c5017e6], null=[HTTP/1.1 500 Internal Server Error], Server=[Apache/2.4.7 (Ubuntu)], vary=[Accept-Language,Origin], x-frame-options=[SAMEORIGIN], Connection=[close], error=[Errno::ENOENT: No such file or directory @ sys_fail2 - (/tmp/0.9949734825597144, /home/osm/traces/725.gpx)], Date=[Tue, 19 May 2015 23:47:51 GMT], x-content-type-options=[nosniff], x-xss-protection=[1; mode=block], x-runtime=[0.047028], cache-control=[no-cache], Content-Type=[text/plain; charset=utf-8], X-Powered-By=[Phusion Passenger 5.0.7], content-language=[en]}
ERROR: org.openstreetmap.josm.io.OsmApiException: ResponseCode=500, Error Header=<Errno::ENOENT: No such file or directory @ sys_fail2 - (/tmp/0.9949734825597144, /home/osm/traces/725.gpx)>
org.openstreetmap.josm.io.OsmApiException: ResponseCode=500, Error Header=<Errno::ENOENT: No such file or directory @ sys_fail2 - (/tmp/0.9949734825597144, /home/osm/traces/725.gpx)>
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:736)
	at org.openstreetmap.josm.io.OsmApi.uploadGpx(OsmApi.java:946)

Thanks.

Change History (5)

comment:1 Changed 4 years ago by Tom Hughes

I don't think any of the dev instances are setup to handle trace uploads.

comment:2 Changed 4 years ago by Tom Hughes

Component: apiadmin
Owner: changed from rails-dev@… to Tom Hughes

This is an operations issue, not a code bug.

comment:3 Changed 4 years ago by don-vip

is it possible to setup one? I'd like to test my code against a dev instance, not the production server :)

comment:4 Changed 5 weeks ago by mmd

GPX upload is also available on the dev instance meanwhile -> closing.

comment:5 Changed 5 weeks ago by mmd

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.