Modify

Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#601 closed defect (fixed)

Auto-retry of uploads doesn't catch all timeouts

Reported by: jrreid@… Owned by:
Priority: minor Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

Since auto-retrying of uploads was implemented in [529] it seems to work some of the time, however it only handles exceptions of type SocketTimeoutException, when a large number of timeouts result in ConnectionException being thrown [the Java API documentation is incomplete in this regard as it doesn't mention that this exception can be thrown from connect()]

Attachments (0)

Change History (6)

comment:1 by hansendc, 17 years ago

Owner: changed from framm to anonymous
Priority: majorminor
Status: newassigned

Could you give us an actual stack trace of this occurring? I google'd for ConnectionException and can't find it in the java documentation at all, so I'm wondering where the heck the exception is actually coming from.

comment:2 by jrreid@…, 17 years ago

upload to: http://www.openstreetmap.org/api/0.5/node/240675932...java.lang.RuntimeException: Connection timed out: connect java.net.ConnectException

at org.openstreetmap.josm.io.OsmServerWriter.sendRequestRetry(OsmServerWriter.java:246)
at org.openstreetmap.josm.io.OsmServerWriter.sendRequest(OsmServerWriter.java:251)
at org.openstreetmap.josm.io.OsmServerWriter.visit(OsmServerWriter.java:119)
at org.openstreetmap.josm.data.osm.Node.visit(Node.java:41)
at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:99)
at org.openstreetmap.josm.actions.UploadAction$2.realRun(UploadAction.java:151)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:84)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Caused by: java.net.ConnectException: Connection timed out: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at org.openstreetmap.josm.io.OsmServerWriter.sendRequestRetry(OsmServerWriter.java:196)
... 9 more

org.xml.sax.SAXException: An error occoured: Connection timed out: connect java.net.ConnectException

at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:105)
at org.openstreetmap.josm.actions.UploadAction$2.realRun(UploadAction.java:151)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:84)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

This was captured against build 529 using Java 1.6.0_02 (Win32)

comment:3 by anonymous, 16 years ago

Owner: anonymous removed
Status: assignednew

Does this still occur in new versions?

comment:4 by jrreid@…, 16 years ago

Yep. Build 757 threw this:

got return: 200 with id 286135152
upload to: http://www.openstreetmap.org/api/0.5/node/create...java.lang.RuntimeE
xception: Connection timed out: connect java.net.ConnectException

at org.openstreetmap.josm.io.OsmServerWriter.sendRequestRetry(OsmServerW

riter.java:440)

at org.openstreetmap.josm.io.OsmServerWriter.sendRequest(OsmServerWriter

.java:449)

at org.openstreetmap.josm.io.OsmServerWriter.visit(OsmServerWriter.java:

308)

at org.openstreetmap.josm.data.osm.Node.visit(Node.java:47)
at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.j

ava:124)

at org.openstreetmap.josm.actions.UploadAction$2.realRun(UploadAction.ja

va:151)

at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.

java:84)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source

)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Caused by: java.net.ConnectException: Connection timed out: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown

Source)

at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour

ce)

at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown S

ource)

at org.openstreetmap.josm.io.MyHttpURLConnection.getOutputStream(MyHttpU

RLConnection.java:19)

at org.openstreetmap.josm.io.OsmServerWriter.sendRequestRetry(OsmServerW

riter.java:380)

... 9 more

org.xml.sax.SAXException: An error occoured: Connection timed out: connect java.
net.ConnectException

at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.j

ava:132)

at org.openstreetmap.josm.actions.UploadAction$2.realRun(UploadAction.ja

va:151)

at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.

java:84)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source

)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

comment:5 by anonymous, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in r874.

comment:6 by anonymous, 16 years ago

Fixed in r784. Sorry.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.