For one thing Your mapcache.xml is requesting an image type agg_qn and that is not defined in your mapfile. It can be defined like:

    OUTPUTFORMAT
        NAME "agg_qn"
        DRIVER "AGG/PNG"
        EXTENSION "png"
        MIMETYPE "image/png"
        IMAGEMODE RGB
        FORMATOPTION "INTERLACE=false"
        FORMATOPTION "QUANTIZE_NEW=ON"
        FORMATOPTION "QUANTIZE_FORCE=ON"
        FORMATOPTION "QUANTIZE_DITHER=OFF"
        FORMATOPTION "QUANTIZE_COLORS=256"
        #TRANSPARENT ON
        #FORMATOPTION "TRANSPARENT=ON"
    END

Have you checked /var/log/apache2/error.log for error messages and checked your /tmp/ms_tmp/ms_error files?

/tmp/mapcache. is where you will be putting your tiles, this needs to be read/writable by the apache2 service and it needs to have enough space for all your tiles. Also I believe you HAVE to make the top level cache directory so in your case:

mkdir /tmp/mapcache/ms-base
chmod 777 /tmp/mapcache/ms-base

-Steve W

On 5/26/2013 3:14 AM, Hishan Melanga wrote:
Can you take a look at my mapcache.xml
<https://docs.google.com/document/d/1yiwhofPOHDtKaFynhXdH0SPbQhojXZGnd5cw9dBNH7A/edit?usp=sharing>
and my osm-google.map
<https://docs.google.com/document/d/1jjdKjJ1kxMFRGTJAstAJ5qk8zUo6MWsYLxW827bC2LM/edit?usp=sharing>
file? I don't know what I have done wrong. It's not producing the tiles.


On Sun, May 26, 2013 at 9:21 AM, Stephen Woodbridge
<[email protected] <mailto:[email protected]>> wrote:

    On 5/25/2013 11:08 PM, Hishan Melanga wrote:

        What is the link to access the tiles in web browser if I used
        your .xml
        as the configuration? Is it still
        http://example.com/mapcache/__demo
        <http://example.com/mapcache/demo> or
        something else.


    You would replace example.com <http://example.com> with your host name.

    Also note the blue (+] buttom in the upper right of the demo map
    page, open this is you have multiple services or tilesets defined
    and you can select that one you want to view.

    Here is my demo page that has data for the US and is pulling tiles
    from my mapcache instance.

    http://imaptools.com:8080/__demo/tiger-demo2.html
    <http://imaptools.com:8080/demo/tiger-demo2.html>

    -Steve


        On Sat, May 25, 2013 at 7:47 PM, Stephen Woodbridge
        <[email protected] <mailto:[email protected]>
        <mailto:woodbri@swoodbridge.__com
        <mailto:[email protected]>>> wrote:

             So the way this works is:

             browser <----> mapcache <----> mapserver_wms

             So look at the demo page if you have mapcache.xml
        configured then
             you should see a simple OpenLayers application that pulls
        tiles from
             mapcache.

             your mapcache.xml needs look something like this. The
        referrences in
             the source block are explicit references to names in my
        mapfile.
             Obviously parameter values need to be change for your
        server and
             mapfile.

             -Steve

             <?xml version="1.0" encoding="UTF-8"?>
             <mapcache>
                <metadata>
                  <title>iMaptools mapcache service</title>
                  <abstract>Contains various services for iMaptools
        maps</abstract>
                </metadata>

                <cache name="disk" type="disk">
                  <base>/u/mapcache</base>
                  <symlink_blank/>
                </cache>

                <source name="tiger2011" type="wms">
                  <getmap>
                    <params>
                      <FORMAT>image/png</FORMAT>
                      <MAP_IMAGETYPE>agg_qn</MAP_____IMAGETYPE>
                      <LAYERS>Tiger_2011</LAYERS>
                      <MAP>/u/data/tiger2011-maps/____tiger2011-mc.map</MAP>
                    </params>
                  </getmap>

                  <http>
                    <url>http://localhost/cgi-bin/____mapserv-60
        <http://localhost/cgi-bin/__mapserv-60>

             <http://localhost/cgi-bin/__mapserv-60
        <http://localhost/cgi-bin/mapserv-60>></url>
                  </http>
                </source>

                <format name="PNGQ_FAST" type="PNG">
                  <compression>fast</____compression>

                  <colors>256</colors>
                </format>

                <tileset name="tiger-base">
                  <source>tiger2011</source>
                  <cache>disk</cache>
                  <grid>WGS84</grid>
                  <grid>g</grid>
                  <format>PNGQ_FAST</format>
                  <metatile>5 5</metatile>
                  <!-- metabuffer must be the abs() of what is in the
        mapfile -->
                  <metabuffer>20</metabuffer>
                  <expires>3600</expires>
                </tileset>

                <default_format>PNGQ_FAST</____default_format>


                <service type="wms" enabled="true">
                  <full_wms>assemble</full_wms>
                  <resample_mode>bilinear</____resample_mode>

                  <format>PNGQ_FAST</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>



             On 5/25/2013 9:47 AM, Hishan Melanga wrote:

                 ok. Now I have http://example.com/mapcache/____demo
        <http://example.com/mapcache/__demo>

                 <http://example.com/mapcache/__demo
        <http://example.com/mapcache/demo>> working. But how can I
                 get my mapserver's wms connect to it.


                 On Sat, May 25, 2013 at 10:42 AM, Hishan Melanga
                 <[email protected] <mailto:[email protected]>
        <mailto:[email protected] <mailto:[email protected]>>
                 <mailto:[email protected] <mailto:[email protected]>
        <mailto:[email protected] <mailto:[email protected]>>>> wrote:

                      Thanks. I installed mapcahe and started to learn
        about the xml
                      configuration file. Reading
        http://mapserver.org/mapcache/____config.html
        <http://mapserver.org/mapcache/__config.html>

                 <http://mapserver.org/__mapcache/config.html
        <http://mapserver.org/mapcache/config.html>> as a start. Hope it
                 is the
                      first thing that I should do.


                      On Sat, May 25, 2013 at 8:07 AM, Stephen Woodbridge
                      <[email protected]
        <mailto:[email protected]>
        <mailto:woodbri@swoodbridge.__com <mailto:[email protected]>>
                 <mailto:woodbri@swoodbridge.
        <mailto:woodbri@swoodbridge.>____com

                 <mailto:woodbri@swoodbridge.__com
        <mailto:[email protected]>>>> wrote:

                          On 5/24/2013 10:06 PM, Hishan Melanga wrote:

                              I have a working mapserver and I can view
        my map using
        
http://localhost/cgi-bin/______mapserv?map=/path/to/map&mode=______browse&template=__openlayers&____layers=all
        
<http://localhost/cgi-bin/____mapserv?map=/path/to/map&mode=____browse&template=openlayers&____layers=all>

        
<http://localhost/cgi-bin/____mapserv?map=/path/to/map&mode=____browse&template=openlayers&____layers=all
        
<http://localhost/cgi-bin/__mapserv?map=/path/to/map&mode=__browse&template=openlayers&__layers=all>>



        
<http://localhost/cgi-bin/____mapserv?map=/path/to/map&mode=____browse&template=openlayers&____layers=all
        
<http://localhost/cgi-bin/__mapserv?map=/path/to/map&mode=__browse&template=openlayers&__layers=all>

        
<http://localhost/cgi-bin/__mapserv?map=/path/to/map&mode=__browse&template=openlayers&__layers=all
        
<http://localhost/cgi-bin/mapserv?map=/path/to/map&mode=browse&template=openlayers&layers=all>>>.

                              Now I want to give out those data to public as
                 tiles giving
                              a single URL
                              such as tile.myserver.org
        <http://tile.myserver.org>
                 <http://tile.myserver.org> <http://tile.myserver.org>


                              <http://tile.myproxy.org/>. How can I achieve

                              this using Mapserver? What is the place to
        start? What
                              tutorials I have
                              to read? I've read that Mapserver has a
        tile mode

          <http://mapserver.org/output/______tile_mode.html
        <http://mapserver.org/output/____tile_mode.html>
                 <http://mapserver.org/output/____tile_mode.html
        <http://mapserver.org/output/__tile_mode.html>>



          <http://mapserver.org/output/____tile_mode.html
        <http://mapserver.org/output/__tile_mode.html>
                 <http://mapserver.org/output/__tile_mode.html
        <http://mapserver.org/output/tile_mode.html>>>>.
                              Thanks in advance.


                          mapcache it the tile server for mapserver. So
        you will
                 want to
                          look at that. The basic scenario is this:

                          1. setup mapserver as a WMS server
                          2. build and install mapcache as an apache module
                          3. setup a mapcache.xml to describe you WMS
        server, and
                 your cache.
                              make sure you configure the demo service
        initially
                 for testing
                              you can disable it later if you want
                          4. restart apache
                          5. http://example.com/mapcache/______demo
        <http://example.com/mapcache/____demo>
                 <http://example.com/mapcache/____demo
        <http://example.com/mapcache/__demo>>


                          <http://example.com/mapcache/____demo
        <http://example.com/mapcache/__demo>
                 <http://example.com/mapcache/__demo
        <http://example.com/mapcache/demo>>>

                          whenever you change your mapcache.xml you need
        to start
                 apache
                          so it reads your changes.

                          -Steve W

          _____________________________________________________
                          mapserver-users mailing list
                          [email protected].______org
                          <mailto:mapserver-users@lists.
        <mailto:mapserver-users@lists.>____osgeo.org <http://osgeo.org>
                 <mailto:mapserver-users@lists.__osgeo.org
        <mailto:[email protected]>>>
        http://lists.osgeo.org/______mailman/listinfo/mapserver-______users
        <http://lists.osgeo.org/____mailman/listinfo/mapserver-____users>

        <http://lists.osgeo.org/____mailman/listinfo/mapserver-____users
        <http://lists.osgeo.org/__mailman/listinfo/mapserver-__users>>



        <http://lists.osgeo.org/____mailman/listinfo/mapserver-____users
        <http://lists.osgeo.org/__mailman/listinfo/mapserver-__users>

        <http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
        <http://lists.osgeo.org/mailman/listinfo/mapserver-users>>>




                      --
                      හිෂාන් මෙලංග | Hishan Melanga
                 <http://hishanmelanga.__blogsp__ot.com/
        <http://blogspot.com/>

                 <http://hishanmelanga.__blogspot.com/
        <http://hishanmelanga.blogspot.com/>>>




                 --
                 හිෂාන් මෙලංග | Hishan Melanga
                 <http://hishanmelanga.__blogsp__ot.com/
        <http://blogspot.com/>
                 <http://hishanmelanga.__blogspot.com/
        <http://hishanmelanga.blogspot.com/>>>




                 ___________________________________________________
                 mapserver-users mailing list
                 [email protected].____org
                 <mailto:mapserver-users@lists.__osgeo.org
        <mailto:[email protected]>>
        http://lists.osgeo.org/____mailman/listinfo/mapserver-____users
        <http://lists.osgeo.org/__mailman/listinfo/mapserver-__users>

        <http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
        <http://lists.osgeo.org/mailman/listinfo/mapserver-users>>


             ___________________________________________________
             mapserver-users mailing list
             [email protected].____org
             <mailto:mapserver-users@lists.__osgeo.org
        <mailto:[email protected]>>
        http://lists.osgeo.org/____mailman/listinfo/mapserver-____users
        <http://lists.osgeo.org/__mailman/listinfo/mapserver-__users>

        <http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
        <http://lists.osgeo.org/mailman/listinfo/mapserver-users>>




        --
        හිෂාන් මෙලංග | Hishan Melanga
        <http://hishanmelanga.__blogspot.com/
        <http://hishanmelanga.blogspot.com/>>


        _________________________________________________
        mapserver-users mailing list
        [email protected].__org
        <mailto:[email protected]>
        http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
        <http://lists.osgeo.org/mailman/listinfo/mapserver-users>


    _________________________________________________
    mapserver-users mailing list
    [email protected].__org
    <mailto:[email protected]>
    http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
    <http://lists.osgeo.org/mailman/listinfo/mapserver-users>




--
හිෂාන් මෙලංග | Hishan Melanga <http://hishanmelanga.blogspot.com/>


_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to