Modify

Opened 2 years ago

Closed 22 months ago

#22052 closed defect (needinfo)

"Nominatim" search is inhibited from the 2nd launch of JOSM onwards

Reported by: n34s@… Owned by: n34s@…
Priority: normal Milestone:
Component: Core Version: latest
Keywords: template_report, windows Cc:

Description

What steps will reproduce the problem?

  1. Install the latest build of JOSM for Windows (by josm-setup.exe) or any other Java 16-17 build from scratch, then launch it.
  2. Go to "Download map data from a server of your choice (Ctrl+Shift+Down) > Areas around places > Enter a place name to search for: > Search...". Initially, "Nominatim" search will work normally.
  3. Restart JOSM by closing and reopening it or by pressing "Ctrl+Alt+Shift+J".
  4. Repeat Step 2 then draw the conclusions.

What is the expected result?

"Nominatim" server should remain available even after the very first launch of JOSM.

What happens instead?

JOSM is no longer able to reach "Nominatim" server from its 2nd launch onwards. Search process stalls on "Querying name server..." for a couple of seconds and finally ends with the following message: "Failed to upload data to or download data from 'https://nominatim.openstreetmap.org/search?format=xml&q=' due to a problem with transferring data. Details (untranslated): Connect timed out".

Please provide any additional information below. Attach a screenshot if possible.

It basically happens with each Java 16-17 build of JOSM for Windows (18191 onwards). It works flawlessly on 1st launch of JOSM right after a fresh installation, but from the 2nd start onwards the "Nominatim" search will no longer work (except by uninstalling and reinstalling JOSM from scratch).

https://prnt.sc/_5UqMsJc2b0c

Revision:18427
Build-Date:2022-04-05 19:23:14

Identification: JOSM/1.5 (18427 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19044)
Memory Usage: 320 MB / 4078 MB (155 MB allocated, but free)
Java version: 17.0.2+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 3840×2160 (scaling 1.50×1.50)
Maximum Screen Size: 3840×2160
Best cursor sizes: 16×16→48×48, 32×32→48×48
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_IT
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18427, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]

Last errors/warnings:
- 00000.329 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.332 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00002.335 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available
- 00033.471 W: java.net.SocketTimeoutException: Connect timed out
- 00033.473 E: org.openstreetmap.josm.io.OsmTransferException: java.net.SocketTimeoutException: Connect timed out. Cause: java.net.SocketTimeoutException: Connect timed out
- 00033.486 E: IO Exception - <html>Failed to upload data to or download data from<br>'https://nominatim.openstreetmap.org/search?format=xml&q=roma'<br>due to a problem with transferring data.<br>Details (untranslated): Connect timed out</html>

Attachments (1)

josm-java1617-windows-nominatim-search-bug.jpg (516.3 KB ) - added by n34s@… 2 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by taylor.smock, 2 years ago

Keywords: windows added
Priority: majornormal

I've been unable to reproduce on Mac with Java 17. Unfortunately I do not have a Windows machine to test with.

Stupid question: Are you rate limited on Nominatim? (Next time this happens, does https://nominatim.openstreetmap.org/search?format=xml&q=roma work properly?)

If you are rate limited, please see where you may be violating the OSM Nominatim usage policy.

Also a possibility: something is changing the socket.timeout.connect preference from 15 seconds to something much less. From wiki:Help/Preferences/Advanced , JOSM Preferences -> enable Expert Mode -> Advanced Preferences -> Search for and select socket.timeout.connect -> Reset the preference (there is a button at the bottom of the list for this).

comment:2 by anonymous, 2 years ago

I tried Nominatim search on build 18118 and it works as expected, so i guess not to be rate limited on Nominatim. The same applies on Firefox browser (https://nominatim.openstreetmap.org/ui/search.html?q=roma). I checked "socket.timeout.connect" value in Advanced Preferences and is always on 15.

comment:3 by taylor.smock, 2 years ago

Thanks for getting back on this.
Like I said, I don't have a windows machine, so this is (unfortunately) going to have to wait for a dev with a windows machine. I was really hoping it was one of the other potential problems.

comment:4 by GerdP, 2 years ago

I cannot reproduce on Winodws. I installed with latest josm-setup.exe and start JOSM with a double click on the icon JOSM. No problems with Nominatim after restart.

Version 0, edited 2 years ago by GerdP (next)

comment:5 by taylor.smock, 2 years ago

@n34s: I'm now wondering if this is a configuration problem somewhere.

Can you do the following:

  1. JOSM Preferences -> Advanced Preferences -> Search for oauth -> Select oauth.access-token.key and oauth.access-token.secret -> Reset -- this will log you out of OSM. (I've got a patch somewhere that will remove the need to do this, but I don't think I've applied it yet)
  2. Clear the search field (oauth -> )
  3. Select everything (ctrl + a)
  4. Export selected items
  5. More... -> Reset preferences

If that does not fix the problem, then you can reload your preferences from the file saved in step 4. If it does fix the problem, then it is a configuration setting somewhere.

in reply to:  5 comment:6 by n34s@…, 2 years ago

<Replying to taylor.smock:

@n34s: I'm now wondering if this is a configuration problem somewhere.

Can you do the following:

  1. JOSM Preferences -> Advanced Preferences -> Search for oauth -> Select oauth.access-token.key and oauth.access-token.secret -> Reset -- this will log you out of OSM. (I've got a patch somewhere that will remove the need to do this, but I don't think I've applied it yet)
  2. Clear the search field (oauth -> )
  3. Select everything (ctrl + a)
  4. Export selected items
  5. More... -> Reset preferences

If that does not fix the problem, then you can reload your preferences from the file saved in step 4. If it does fix the problem, then it is a configuration setting somewhere.

Sorry for the delay

@taylor.smock i confirm the issue may be caused by some configuration setting. A preference reset got me back to step 2. Nominatim search does work on the 1st run, but then the issue returns when restarting JOSM. Resetted both oauth.access-token.key and oauth.access-token.secret in Advanced Preferences with the faulty configuration profile (2nd run onwards) and nothing has changed.

I tried to reproduce the issue on another physical machine, on both Windows 11 and Windows 7, and the same thing happens. I hadn't installed JOSM on Windows 7 yet. Logs here.

comment:7 by taylor.smock, 2 years ago

You are getting connection timeout errors. Best guess: flaky internet.

Try increasing the timeout from 15s to 30s or more.

comment:8 by taylor.smock, 2 years ago

Owner: changed from team to n34s@…
Status: newneedinfo

comment:9 by taylor.smock, 22 months ago

Resolution: needinfo
Status: needinfoclosed

I'm assuming that the timeout increase I mentioned in comment:7 fixed the issue. If that is wrong, feel free to correct me.

Modify Ticket

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