Cgeo: OSM online tiles stopped working

Created on 28 May 2019  路  46Comments  路  Source: cgeo/cgeo

Several user reports and I can confirm, that tiles are not loading for online OSM maps.
I assume the server either has a problem or the service is no longer available?!

Prio - High

All 46 comments

Anything in the log? Are there "access blocked" tiles? Maybe just too much traffic from c:geo. The primary osm.org tiles are not supposed to be used with high traffic apps.

No, empty tiles

I meanwhile checked the log. It simply fails, but if I request those tile URLs on my PC, it works normal.
The only thing noticeable is, that its redirected to HTTPS on my PC. Is it a problem we request HTTP only?

17:59:33.639 Error TileDownloadThread 10502  http://a.tile.openstreetmap.org:80/14/8506/5456.png
17:59:33.639 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://a.tile.openstreetmap.org:80/14/8506/5456.png
17:59:33.746 Error TileDownloadThread 10502  http://b.tile.openstreetmap.org:80/14/8506/5459.png
17:59:33.746 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://b.tile.openstreetmap.org:80/14/8506/5459.png
17:59:33.747 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/14/8506/5458.png
17:59:33.747 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/14/8506/5458.png
17:59:33.747 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/14/8509/5459.png
17:59:33.748 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/14/8509/5459.png
17:59:33.748 Error TileDownloadThread 10502  http://a.tile.openstreetmap.org:80/14/8509/5460.png
17:59:33.748 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://a.tile.openstreetmap.org:80/14/8509/5460.png
17:59:33.749 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/14/8507/5458.png
17:59:33.749 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/14/8507/5458.png
17:59:33.749 Error TileDownloadThread 10502  http://b.tile.openstreetmap.org:80/14/8507/5460.png
17:59:33.749 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://b.tile.openstreetmap.org:80/14/8507/5460.png
17:59:33.750 Error TileDownloadThread 10502  http://b.tile.openstreetmap.org:80/14/8507/5455.png
17:59:33.750 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://b.tile.openstreetmap.org:80/14/8507/5455.png
17:59:33.872 Error TileDownloadThread 10502  http://b.tile.openstreetmap.org:80/14/8511/5457.png
17:59:33.872 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://b.tile.openstreetmap.org:80/14/8511/5457.png
17:59:33.873 Error TileDownloadThread 10502  http://b.tile.openstreetmap.org:80/14/8511/5458.png
17:59:33.873 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://b.tile.openstreetmap.org:80/14/8511/5458.png
17:59:33.873 Error TileDownloadThread 10502  http://b.tile.openstreetmap.org:80/14/8505/5457.png
17:59:33.873 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://b.tile.openstreetmap.org:80/14/8505/5457.png
17:59:33.874 Error TileDownloadThread 10502  http://b.tile.openstreetmap.org:80/14/8505/5458.png
17:59:33.874 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://b.tile.openstreetmap.org:80/14/8505/5458.png
17:59:33.875 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/14/8508/5455.png
17:59:33.875 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/14/8508/5455.png
17:59:33.875 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/14/8510/5459.png
17:59:33.875 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/14/8510/5459.png
17:59:33.876 Error TileDownloadThread 10502  http://a.tile.openstreetmap.org:80/14/8510/5455.png
17:59:33.876 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://a.tile.openstreetmap.org:80/14/8510/5455.png
17:59:33.877 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/14/8510/5456.png
17:59:33.877 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/14/8510/5456.png
17:59:33.877 Error TileDownloadThread 10502  http://a.tile.openstreetmap.org:80/14/8509/5460.png
17:59:33.877 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://a.tile.openstreetmap.org:80/14/8509/5460.png
17:59:33.995 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/14/8509/5455.png
17:59:33.995 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/14/8509/5455.png
17:59:33.996 Error TileDownloadThread 10502  http://b.tile.openstreetmap.org:80/14/8509/5457.png
17:59:33.996 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://b.tile.openstreetmap.org:80/14/8509/5457.png
17:59:33.996 Error TileDownloadThread 10502  http://a.tile.openstreetmap.org:80/14/8507/5457.png
17:59:33.996 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://a.tile.openstreetmap.org:80/14/8507/5457.png
17:59:33.997 Error TileDownloadThread 10502  http://b.tile.openstreetmap.org:80/14/8507/5458.png
17:59:33.997 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://b.tile.openstreetmap.org:80/14/8507/5458.png
17:59:33.998 Error TileDownloadThread 10502  http://a.tile.openstreetmap.org:80/14/8508/5456.png
17:59:33.998 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://a.tile.openstreetmap.org:80/14/8508/5456.png
17:59:34.104 Error TileDownloadThread 10502  http://b.tile.openstreetmap.org:80/14/8509/5456.png
17:59:34.104 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://b.tile.openstreetmap.org:80/14/8509/5456.png
17:59:34.105 Error TileDownloadThread 10502  http://b.tile.openstreetmap.org:80/14/8509/5459.png
17:59:34.105 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://b.tile.openstreetmap.org:80/14/8509/5459.png
17:59:34.228 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/14/8508/5460.png
17:59:34.228 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/14/8508/5460.png
17:59:34.229 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/14/8508/5457.png
17:59:34.229 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/14/8508/5457.png
17:59:34.229 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/14/8510/5460.png
17:59:34.229 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/14/8510/5460.png
17:59:34.230 Error TileDownloadThread 10502  http://a.tile.openstreetmap.org:80/14/8510/5457.png
17:59:34.230 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://a.tile.openstreetmap.org:80/14/8510/5457.png
17:59:34.231 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/14/8509/5458.png
17:59:34.231 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/14/8509/5458.png
17:59:34.231 Error TileDownloadThread 10502  http://a.tile.openstreetmap.org:80/14/8510/5458.png
17:59:34.231 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://a.tile.openstreetmap.org:80/14/8510/5458.png
17:59:34.556 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/14/8507/5459.png
17:59:34.556 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/14/8507/5459.png

Here is the full exception:

17:59:22.950 Error TileDownloadThread 10502  http://c.tile.openstreetmap.org:80/13/4257/2730.png
17:59:22.950 Error TileDownloadThread 10502  java.io.FileNotFoundException: http://c.tile.openstreetmap.org:80/13/4257/2730.png
17:59:22.950 Error TileDownloadThread 10502     at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:197)
17:59:22.950 Error TileDownloadThread 10502     at org.mapsforge.map.layer.download.TileDownloader.getInputStream(TileDownloader.java:36)
17:59:22.950 Error TileDownloadThread 10502     at org.mapsforge.map.layer.download.TileDownloader.downloadImage(TileDownloader.java:67)
17:59:22.950 Error TileDownloadThread 10502     at org.mapsforge.map.layer.download.TileDownloadThread.downloadTile(TileDownloadThread.java:81)
17:59:22.951 Error TileDownloadThread 10502     at org.mapsforge.map.layer.download.TileDownloadThread.doWork(TileDownloadThread.java:60)
17:59:22.951 Error TileDownloadThread 10502     at org.mapsforge.map.util.PausableThread.run(PausableThread.java:147)

I raised a notification in c:geo as the problem is still there.

Anyone any idea?
AFAIR the URL for the tile download comes from the mapsforge library directly.

Why is it not working with c.geo but on my PC on the same network?

See IRC log for latest discussion on that topic:
https://irclogs.cgeo.org/?year=2019&month=5&day=28

It might be related to HSTS being used on the osm server in combination with hardcoded http request with explicit port, but might also be something totally different.

It would be interesting to know, what they changed on server side.

Or they might have finally decided to block us. I have the impression, we are not in line with their usage policy:
https://operations.osmfoundation.org/policies/tiles/

A block would show "access blocked" tiles.

If it is our app UA it should be one of those:
https://github.com/cgeo/cgeo/blob/c2457c1c81dbe010dd441dce106032bb4333f4cc/main/src/cgeo/geocaching/network/Network.java#L64

However I do not know if the mapsforge lib defines another one?

Using mf 0.10.0 did not solve the problem.
However I think @SammysHP assumption is correct:
If I use our UA Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 in my PC browser I get a "Access denied" from the server.

I think this is the culprit:
https://github.com/openstreetmap/chef/commit/fda66991c1fab58d3babb6c464129b78832c80de

We should then indeed change to a app specific UA?!

Link to #6611

@rsudev
I tried in #7651 to test a more recent UA, but tiles are still not loading.
Do we correctly handover our UA to the mapsforge code? Otherwise it might be empty or default in their tile requests AFAICS from their code.

In #6611 @pstorch wrote:

The mapsforge libraries have their own way of downloading the tiles. Mainly through simple URL.openConnection().
Mapsforge V6 has support to set the user agent, so we could set our own user agent. The V3 library would need to be extended to support this (or we hardcode it in our fork).

I don't see any references there that indicate changes at our side so I assume that we do not set a custom user agent in Mapsforge.

AFAICS we do not use the V6 feature, which means the UA is empty when loading tiles?! Can someone check that?

I would say we should append cgeo info to a static (newer) UA than we currently use (see #6611) and also set this UA to be used for mapsforge v6.

There is a high chance that even a custom user agent will not help.

OSM started to enforce the tile usage policy because all OSM servers and mirrors have reached their maximum capacity. If we roll out a version with cgeo or something unique in the UA it will be blocked at some time. It is even possible that there will be a decision that osm.org tiles can be used only from osm.org.

This means that we either have to use our own infrastructure for rendering and serving of tiles or use a paid service (with different design of course) for about $300-500 per month.

I checked with a user agent set to "cgeo" - works and is aligned with the usage policy. But before publishing it, we would need to get consent from OSM foundation. And we should improve and check our usage of the tile cache in this case (we currently use only one for on- and offlline maps and frequently discard it, espaecially on map restart).
BTW: I would not try to fix v3 in this regard...

IMHO we should set it to "c:geo" (or even also add a contact reference like mail or repo location), maybe improve the tile cache but also in parallel contact them and ask for allowance. Does anyone have a good contact possibility?

@SammysHP If we would establish a proxy on an own server, how much disc space would be needed?

In addition to the user agent we also need to add proper attribution AFAICS (perhaps some other small things as well), but that can also be addressed in a second step.
Once we have the UA change out, they can quickly tell us how much traffic the app generates.

For the user agent see my proposal in #6611.

For attribution see #6150.

Hi, just following your conversation. I am involved in another Android App where OSM tiles are used and we got the same error there. Setting the UserAgent worked.
After changing that I also asked in the OSM IRC channel for the usage of the tile server.

Interesting to know, this is the problem they are currently facing:
image

I was told to contact firefishy as well. :)

So let's try the new user agent and later ask firefishy about our traffic. He might be able to grep the logs so that we have some numbers.

I would ask him fist.

@SammysHP Can you contact him and explain about cgeo as opensource app and ask for guidance?

@rsudev Can you provide a fix for the UA being set to c:geo? Did I understand correct, that the UA for mapsforge can be independent from the UA we use elsewhere in the app and we should use only "cgeo"? That would be my preference for the first step as changing to a new UA consistently at all places needs more testing. This should be done in a second step IMHO.

The UA for downloading tiles from OSM can be different than our UA for other cases, and as I read the policies, should just uniquely denote the app in question, therefore I'd suggest just "cgeo".
I can provide a fix for that.

Based on release, I presume?

Yes, based on release would be great.Any chance for mf0.3 as many people still use it, due to missing features (circles) and bugs (leaking waypoints) on the new mf?Von Samsung-Tablet gesendet
null

Interestingly this should be possible in our fork: https://github.com/cgeo/mapsforge/commit/0848b963124824de0b2a3691d9e83e3229aea96a (again a reference to #6624).

Took me a while to really understand the history (sometimes you just don't see the obvious). Unfortunately was this version never built and included in c:geo.
Now preparing for that.

Just to summarize the discussion and conclusion from that which took place at other issues / PRs:

  • In the first step we modify the mapsforge code to send a dedicated fixed user agent to the OSM server (i.e. "cgeo") to fix the regression and allow further analysis by the OSM team, whether we are OK to use their servers directly.
  • In a second step we should implement a meaningful user agent as already discussed in #6611 and then use this user agent for all network communication. The second step should be further discussed and agreed upon in the mentioned issue.
  • Besides from the UA topic we should also add proper attribution as discussed in #6150. This can be done separately however it is long overdue.

BTW:
Tiles are loading for me right now?
Did someone contact the OSM team or just a coincidental change on their side?

@rsudev Is this fixed in V3 and V9 or only in V3 for now. I don't clearly get it from your comment in f646eae

It is fixed in both versions.

Seems to have stopped working again (current master).
Was someone already in contact with the OSM team or shall I contact them?

Sorry, false alarm. Its working now again, I suspect a network issue on my side. Also I do not see any related changes in their repo.

In case you didn't know before, cgeo made it to the top 5 on the OSM OWG's _heavy app tile users_ list with more than 1.1 mio tile downloads per day.

@mmd-osm is this list public? I couldn't find it.

Yes it鈥檚 public: issue 371 on https://github.com/openstreetmap/operations/issues

@Lineflyer we should reach out to the OSM Team to find a solution for this.

I should note that the owg team obviously didn鈥檛 take any action so far. Nevertheless I thought it would be a good idea to give you some heads up.

@Lineflyer we should reach out to the OSM Team to find a solution for this.

Thanks for the heads up @mmd-osm . I will reach out to them to see if any action is needed and in case find a solution. Otherwise we might just get blocked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonas-koeritz picture jonas-koeritz  路  4Comments

Lineflyer picture Lineflyer  路  7Comments

king-ton picture king-ton  路  7Comments

pstorch picture pstorch  路  4Comments

Lineflyer picture Lineflyer  路  5Comments