Modify

Opened 9 years ago

Closed 9 years ago

#12341 closed defect (fixed)

very slow opening of preferences when network is down

Reported by: richlv Owned by: richlv
Priority: normal Milestone:
Component: Core Version: tested
Keywords: Cc:

Description

if dns resolves, but actual connections time out, opening of the preferences (to enter proxy data, for example) is extremely slow. trying to open preferences makes josm freeze for a very long time

Attachments (0)

Change History (10)

comment:1 by simon04, 9 years ago

JOSM start does take a while when no connections can be established – therefore we have --offline=all.

For the preference window I cannot reproduce.

comment:2 by simon04, 9 years ago

See also #8824.

comment:3 by simon04, 9 years ago

Owner: changed from team to richlv
Status: newneedinfo

Please test whether the changes in #8824 resolved your issues, and report more details otherwise.

comment:4 by richlv, 9 years ago

not sure how to test #8824 - it seems like the last commit there is 9414, but the latest development version on https://josm.openstreetmap.de/wiki/Download#DevelopmentVersion is 9345 ?

startup is actually pretty quick for me, but after hitting f12 it takes 2 minutes for the preferences to open. after they open, the following timeouts can be seen in the console output :

INFO: GET https://api.openstreetmap.org/api/0.6/user/details -> !!!
WARNING: java.net.SocketTimeoutException: connect timed out
java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
        at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:113)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:136)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:96)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:60)
        at org.openstreetmap.josm.io.OsmServerUserInfoReader.fetchUserInfo(OsmServerUserInfoReader.java:173)
        at org.openstreetmap.josm.io.OsmServerUserInfoReader.fetchUserInfo(OsmServerUserInfoReader.java:158)
        at org.openstreetmap.josm.gui.JosmUserIdentityManager.initFromOAuth(JosmUserIdentityManager.java:217)
        at org.openstreetmap.josm.gui.JosmUserIdentityManager.getInstance(JosmUserIdentityManager.java:66)
        at org.openstreetmap.josm.io.MessageNotifier.isUserEnoughIdentified(MessageNotifier.java:128)
        at org.openstreetmap.josm.io.MessageNotifier.start(MessageNotifier.java:97)
        at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:512)
ERROR: java.net.SocketTimeoutException: connect timed out
java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
        at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:113)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:136)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:96)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:60)
        at org.openstreetmap.josm.io.OsmServerUserInfoReader.fetchUserInfo(OsmServerUserInfoReader.java:173)
        at org.openstreetmap.josm.io.OsmServerUserInfoReader.fetchUserInfo(OsmServerUserInfoReader.java:158)
        at org.openstreetmap.josm.gui.JosmUserIdentityManager.initFromOAuth(JosmUserIdentityManager.java:217)
        at org.openstreetmap.josm.gui.JosmUserIdentityManager.getInstance(JosmUserIdentityManager.java:66)
        at org.openstreetmap.josm.io.MessageNotifier.isUserEnoughIdentified(MessageNotifier.java:128)
        at org.openstreetmap.josm.io.MessageNotifier.start(MessageNotifier.java:97)
        at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:512)
ERROR: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketTimeoutException: connect timed out
org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:139)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:96)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:60)
        at org.openstreetmap.josm.io.OsmServerUserInfoReader.fetchUserInfo(OsmServerUserInfoReader.java:173)
        at org.openstreetmap.josm.io.OsmServerUserInfoReader.fetchUserInfo(OsmServerUserInfoReader.java:158)
        at org.openstreetmap.josm.gui.JosmUserIdentityManager.initFromOAuth(JosmUserIdentityManager.java:217)
        at org.openstreetmap.josm.gui.JosmUserIdentityManager.getInstance(JosmUserIdentityManager.java:66)
        at org.openstreetmap.josm.io.MessageNotifier.isUserEnoughIdentified(MessageNotifier.java:128)
        at org.openstreetmap.josm.io.MessageNotifier.start(MessageNotifier.java:97)
        at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:512)
Caused by: java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
        at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:113)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:136)
        ... 9 more
INFO: Message notifier active (checks every 5 minutes)
INFO: GET https://api.openstreetmap.org/api/0.6/user/details -> !!!
WARNING: java.net.SocketTimeoutException: connect timed out
java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
        at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:113)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:136)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:96)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:60)
        at org.openstreetmap.josm.io.OsmServerUserInfoReader.fetchUserInfo(OsmServerUserInfoReader.java:173)
        at org.openstreetmap.josm.io.MessageNotifier$Worker.run(MessageNotifier.java:63)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
WARNING: Already here java.net.SocketTimeoutException: connect timed out
ERROR: java.net.SocketTimeoutException: connect timed out
java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
        at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:113)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:136)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:96)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:60)
        at org.openstreetmap.josm.io.OsmServerUserInfoReader.fetchUserInfo(OsmServerUserInfoReader.java:173)
        at org.openstreetmap.josm.io.MessageNotifier$Worker.run(MessageNotifier.java:63)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
WARNING: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketTimeoutException: connect timed out
org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:139)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:96)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:60)
        at org.openstreetmap.josm.io.OsmServerUserInfoReader.fetchUserInfo(OsmServerUserInfoReader.java:173)
        at org.openstreetmap.josm.io.MessageNotifier$Worker.run(MessageNotifier.java:63)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
        at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:113)
        at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:136)
        ... 11 more

in reply to:  4 comment:5 by Don-vip, 9 years ago

Replying to richlv:

the last commit there is 9414, but the latest development version on https://josm.openstreetmap.de/wiki/Download#DevelopmentVersion is 9345 ?

Indeed there's a big problem here.

comment:6 by Don-vip, 9 years ago

the cron fails with:

javac -cp /tmp/josm/bin -d /tmp/josm /tmp/josm/josm/scripts/BuildProjectionDefinitions.java
touch /tmp/josm/bin/data/projection/custom-epsg
cd /tmp/josm/josm && java -cp /tmp/josm/bin:/tmp/josm BuildProjectionDefinitions
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
        at BuildProjectionDefinitions.main(BuildProjectionDefinitions.java:51)
make: *** [/tmp/josm/bin/data/projection/custom-epsg] Error 1

comment:7 by Don-vip, 9 years ago

ok it needs to be adapted to r9357.

comment:8 by Don-vip, 9 years ago

Done: r9415 is now available.

comment:9 by Don-vip, 9 years ago

is this problem still there?

comment:10 by richlv, 9 years ago

Resolution: fixed
Status: needinfoclosed

while i didn't get to detailed tests, latest version did not seem to have such a huge delay anymore - there was some slowdown, but it was a few seconds at most. closing this ticket, thanks for the reminder :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain richlv.
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.