1

I have implemented mapserver in Ubuntu 14.04 with postgresql 9.3, postgis and imposm using GitHub tutorial. After completing the tutorial all map services display pink tiles not map info. i was not encounter with any issues during the tutorial run. any reason to this?

Following screenshots for your reference.

enter image description here enter image description here enter image description here

When I check network I saw some errors as follows it shows as bad gate way and internal server error enter image description here

here's my basemap makefile and mapcache.xml file

basemap/makefile

UNAME := $(shell uname)

ifeq ($(UNAME), Darwin)
SED=sed -i ""
else
SED=sed -i
endif

CPP=gcc -E -x c
#if the preprocessor fails for some reason, try replacing this with "cpp" on linux, or "cpp-4.2" on darwin (not available starting with mountain lion)


OSM_PREFIX=osm_new_
OSM_NAME_COLUMN=name
OSM_SRID=4326
OSM_UNITS=dd
OSM_EXTENT=-180 -90 180 90
OSM_SRID=3857
OSM_UNITS=meters
OSM_DB_CONNECTION=host=localhost dbname=osm user=osm password=osm port=5432
OSM_EXTENT=-20000000 -20000000 20000000 20000000
OSM_WMS_SRS=EPSG:900913 EPSG:4326 EPSG:3857 EPSG:2154 EPSG:310642901 EPSG:4171 EPSG:310024802 EPSG:310915814 EPSG:310486805 EPSG:310702807 EPSG:310700806 EPSG:310547809 EPSG:310706808 EPSG:310642810 EPSG:310642801 EPSG:310642812 EPSG:310032811 EPSG:310642813 EPSG:2986
DEBUG=1
LAYERDEBUG=1
STYLE=google
#can also use google or bing

mapcache-osm.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- see the accompanying https://github.com/mapserver/mapcache/blob/master/mapcache.xml.sample for a fully commented configuration file -->
<mapcache>
<cache name="disk" type="disk">
    <base>/home/sithila/osm-demo/mapcache/cache</base> <!-- Change Path here -->
    <symlink_blank/>
</cache>

<source name="osm" type="wms">
    <getmap>
        <params>
            <FORMAT>image/png</FORMAT>
            <LAYERS>default</LAYERS>
            <MAP>/home/sithila/osm-demo/basemaps/osm-google.map</MAP> <!-- Change Path here -->
        </params>
    </getmap>
    <http>
        <url>http://localhost/cgi-bin/mapserv?</url> <!-- Change server here -->
    </http>
</source>
<tileset name="osm">
    <metadata>
        <title>OSM MapServer served map</title>
        <abstract>see https://github.com/mapserver/mapserver/wiki/RenderingOsmDataUbuntuv2</abstract>
    </metadata>
    <source>osm</source>
    <cache>disk</cache>
    <grid>WGS84</grid>
    <grid>g</grid>
    <format>PNG</format>
    <metatile>5 5</metatile>
    <metabuffer>10</metabuffer>
    <expires>10000</expires>
    <auto_expire>86400</auto_expire>  
</tileset>

<default_format>JPEG</default_format>

<service type="wms" enabled="true">
    <full_wms>assemble</full_wms>
    <resample_mode>bilinear</resample_mode>
    <format>JPEG</format>
    <maxsize>4096</maxsize>
</service>

<service type="wmts" enabled="true"/>
<service type="tms" enabled="true"/>
<service type="kml" enabled="true"/>
<service type="gmaps" enabled="true"/>
<service type="ve" enabled="true"/>
<service type="demo" enabled="true"/>

<errors>report</errors>
<lock_dir>/tmp</lock_dir>
</mapcache>

In my further troubleshooting i have execute curl command with a url of a pink tile and received as follows.

<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException>
<![CDATA[
wms request for tileset osm returned an unsupported format:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /cgi-bin/mapserv was not found on this server.</p>
<hr>
<address>Apache/2.4.7 (Ubuntu) Server at localhost Port 80</address>
</body></html>

]]>
</ServiceException>
3
  • 1
    Look at the network tab of your browser's developer console, ctrl+shift+i in Chrome and FF to see what is being requested. You will likely have some errors in the console too. Commented Sep 30, 2014 at 17:43
  • 1
    Please don't cross post. stackoverflow.com/questions/26124917/…. And provide a bit more information. Commented Sep 30, 2014 at 19:08
  • This kind of error is usually due to a problem with a proxy, checkupdown.com/status/E502.html. Do you have a proxy set up. And do you definitely have a server running on localhost? Commented Oct 1, 2014 at 10:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.