NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi all,

I've just built an OSM server as per the instructions on www.switch2osm.org using the package method. Everything seems to be working ok. I am able to browse the map on localhost the ubuntu server. The only problem is when I use an browser on the external IP address, all the tiles appear in pink.

I have read that this maybe a cross domain browsing issue with apache. If anyone else has experienced this issue can they let me know and what solution you found.

Thanks in advance,

Dave

asked 13 Sep '12, 22:09

Davieg's gravatar image

Davieg
1111
accept rate: 0%

1

If you don't get any reply on this help site, you might better contact the OSM developers community through its mailing list at dev@openstreetmap.org. (subscription required, see the mailing list doc)

(14 Sep '12, 11:41) Pieren

Based on the other information (socket bind failures etc.) I'm not sure that what you're seeing a purely a cross-site-scripting issue. As Pieren says, you'll probably get more response on the "dev" mailing list or perhaps on one of the IRC channels (e.g. #osm or #osm-dev).

Is the Ubuntu server a physical box or a VM, and if a VM how is networking set up?

When you say "I can browse the map" does that mean that you've got an OL or Leaflet-based map on the same Ubuntu server as well? If so, when you browse to the root of the webserver from your remote browser do you get an "It works!" page?

(18 Sep '12, 16:48) SomeoneElse ♦

I just found an answer to the pink tile problem. Just edit your /var/www/osm/slippymap.html file and change "localhost" to the external IP address of your map server. For me, this was the IP address of the bridged network virtual card on VirtualBox. Maps now show up.

I tracked this problem by right clicking the broken image and trying to open it in a new browser window. The URL contained "localhost" rather than the IP of the map server.

Geoff

permanent link

answered 08 Aug '13, 07:50

Snowpaddler's gravatar image

Snowpaddler
3112
accept rate: 0%

1

In order to prevent this confusion the upstream slippymap.html file has been changed to use relative URLs. However, this hasn't yet made it into the packages linked to from switch2osm.org.

However, I have now added a comment regarding this issue to switch2osm.org which hopefully clarifies this and prevents people of running into this issue in the future.

(08 Aug '13, 20:48) apmon

Hi datendelphin,

Thanks for your help. I think I made too mank changes to the config files which caused the binding error. I rolled back the PC to a previous configuration ( I'm using vmware) and started to troubleshoot again. I realised I made a schoolboy error. I never changed the IP address for the map server in the slippymap.html file. That explains why it worked on the local host and not on a remote PC. Once I made that change everything worked fine. Maybe this post may help others avoid my mistake.

Thanks again.

Dave

permanent link

answered 21 Sep '12, 23:16

davieg's gravatar image

davieg
161
accept rate: 0%

You should include

Header set Access-Control-Allow-Origin "*"

in your apache config, next to the lines where you configure mod-tile (look for the LoadTileConfigFile keyword). It should be inside the virtual host you have your tile server running in.

permanent link

answered 15 Sep '12, 13:52

datendelphin's gravatar image

datendelphin
23446
accept rate: 14%

edited 18 Sep '12, 20:34

Hi datendelphin,

Thanks for responding to my question. I built the server using the instructions on this page (http://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/) so I didn't have too much configuration to do. I'm new enough to Linux and am just working my way around it. Which apache config file do I edit is it httpd.conf or httpd-vhosts.conf. There is no mention of mod-tile in http-vhosts.conf and httpd.conf is blank,

Thanks for your help on this ,

Dave

(18 Sep '12, 14:06) Davieg

I just checked the errors that appear when apache restarts and here's what I get: /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted) [Tue Sep 18 13:43:03 2012] [notice] Committing tile config default [Tue Sep 18 13:43:03 2012] [notice] Loading tile config default at /osm/ for zooms 0 - 18 from tile directory /var/lib/mod_tile with extension .png and mime type image/png apache2: apr_sockaddr_info_get() failed for NT-LIS-SR-05.nettronics apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

(18 Sep '12, 14:46) Davieg

/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted) [Tue Sep 18 13:43:03 2012] [notice] Committing tile config default [Tue Sep 18 13:43:03 2012] [notice] Loading tile config default at /osm/ for zooms 0 - 18 from tile directory /var/lib/mod_tile with extension .png and mime type image/png apache2: apr_sockaddr_info_get() failed for NT-LIS-SR-05.nettronics apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available

(18 Sep '12, 14:46) Davieg
1

, shutting down Unable to open logs Action 'start' failed. The Apache error log may have more information.

I dont know if this helps with the problem,

Dave

(18 Sep '12, 14:47) Davieg
1

You might have other problems as well. "Permission denied: make_sock: could not bind to address 0.0.0.0:80" does not look good.

As to where to add the line I suggested:

grep -rn LoadTileConfigFile /etc/apache2/

should tell you which file to edit.

(18 Sep '12, 20:37) datendelphin

http://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/

"If you are not opening slippymap.html on localhost and you are seeing only pink tiles, you will need to edit the html page and replace localhost with the correct server name in ‘new OpenLayers.Layer.OSM(“Local Tiles”…’ or change it to a relative URL."

you need to restart the rendering daemon --> sudo /etc/init.d/renderd restart

It worked for me.

permanent link

answered 03 May '14, 18:26

gisAnal's gravatar image

gisAnal
1
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×535
×287
×8
×5

question asked: 13 Sep '12, 22:09

question was seen: 17,000 times

last updated: 03 May '14, 18:26

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum