I see, thanks for sharing your findings :)

On 09/29/2017 02:24 PM, Steve Omondi wrote:
Hi Nuno,

So I just found a solution thanks to Andrea and Darell van der Voort. Precisely 
as you've pointed out it all about the **

    *GeoServer \ GeoWebCache security mechanism,*


​So apparently is you are having rules in Geofence or the Geoserver Data 
Security Subsystem that prevent access to that workspace or layer Geowebcache 
administrative task does not run.​

I just removed the rules and it worked.

Solution: With this it means every time someone wants to Seed a Tile Layer you 
have to create a temporary rule that allows access to the Layer and remove the 
rule after the task is complete.

Works on *Geoserver 2.11.2* with integrated Geowebcache.​


Kind regards,
Steve Omondi

On Fri, Sep 29, 2017 at 12:10 PM, Nuno Oliveira <nuno.olive...@geo-solutions.it 
<mailto:nuno.olive...@geo-solutions.it>> wrote:

    Hi,
    there was some recent changes in GeoServer \ GeoWebCache security 
mechanism, I was not involved in that work
    so I don't know the details ... could you precise which version of 
GeoServer you are using ? This may help the involved
    developers to give you some feedback.

    That said, based on your description it looks to me that you find a bug, I 
mean if you can start a mass truncate for all the
    layers you should for sure be able to truncate a specific layer unless 
there is some specific rule that forbids you to do it
    for that layer (which would be very strange IMHO).

    If you don't get any other feedback, I would suggest you to open a JIRA 
ticket about this, providing the necessary steps to
    reproduce this with a default (vanilla) GeoServer.

    Regards,

    Nuno Oliveira

    On 05/25/2017 11:26 AM, Alberto CD wrote:

        Hi list,

        I am spent a couple of days try to find a solution for this so If only I
        could find help here that would be great.

        Problem specification:

        I am using GeoServer rest to truncate and seed layers after upload 
process
        (done using the rest too).

        Weird thing is /rest/truncate/masstruncate works fine but
        rest/seed/workspace:layer.xml does not.

        I am a bit lost about rest security and at the moment I have kept the
        rest.properties file using default configuration.
        /**;GET=ADMIN
        /**;POST,DELETE,PUT=ADMIN

        Using the curl command like so:
        curl -v -u admin:passwd -XPOST -H "Content-type: text/xml" -d
        
"<seedRequest><name>tests:field_id_test_uavngb_products-uavngb_20150130_120502_GNDVI_test</name><srs><number>3857</number></srs><zoomStart>0</zoomStart><zoomStop>20</zoomStop><format>image/png8</format><type>seed</type><threadCount>02</threadCount></seedRequest>"
        
"http://IP:8080/geoserver/gwc/rest/seed/tests:field_id_test_uavngb_products-uavngb_20150130_120502_GNDVI_test.xml
 
<http://IP:8080/geoserver/gwc/rest/seed/tests:field_id_test_uavngb_products-uavngb_20150130_120502_GNDVI_test.xml>"

        I get this *200 response*:
        Note: Unnecessary use of -X or --request, POST is already inferred.
        *   Trying IP...
        * TCP_NODELAY set
        * Connected to IP (IP) port 8080 (#0)
        * Server auth using Basic with user 'admin'

            POST
            
/geoserver/gwc/rest/seed/tests:field_id_test_uavngb_products-uavngb_20150130_120502_GNDVI_test.xml
            HTTP/1.1
            Host: IP:8080
            Authorization: Basic DEyMzQ=
            User-Agent: curl/7.51.0
            Accept: */*
            Content-type: text/xml
            Content-Length: 261

        * upload completely sent off: 261 out of 261 bytes
        < HTTP/1.1 200 OK
        < Date: Thu, 25 May 2017 10:03:29 GMT
        < Server: Noelios-Restlet-Engine/1.0..8
        < Transfer-Encoding: chunked
        <
        * Curl_http_done: called premature == 0
        * Connection #0 to host IP left intact


        When I check the *log in debug mode* I see:

        2017-05-25 11:03:29,804 ERROR [org.geoserver.ows] -
        org.geoserver.platform.ServiceException: Could not find layer
        tests:field_id_test_uavngb_products-uavngb_20150130_120502_GNDVI_test
                at
        
org.geoserver.wms.map.GetMapKvpRequestReader.parseLayers(GetMapKvpRequestReader.java:1325)
                at
        
org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:231)
                at
        
org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:84)
                at 
org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1489)
                at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:677)
                at 
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:265)
                at
        
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
                at org.geoserver.gwc.GWC.dispatchOwsRequest(GWC.java:1207)
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.dispatchGetMap(GeoServerTileLayer.java:618)
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.getMetatilingReponse(GeoServerTileLayer.java:563)
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.seedTile(GeoServerTileLayer.java:757)
                at 
org.geowebcache.seed.SeedTask.doActionInternal(SeedTask.java:136)
                at org.geowebcache.seed.GWCTask.doAction(GWCTask.java:76)
                at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:36)
                at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:25)
                at java.util.concurrent.FutureTask.run(FutureTask.java:262)
                at
        
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                at
        
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                at java.lang.Thread.run(Thread.java:745)
        2017-05-25 11:03:29,797 DEBUG [org.geotools.util] -
        InterpolationConverterFactory can be applied from Strings to 
Interpolation
        only.
        2017-05-25 11:03:29,806 DEBUG [org.geotools.util] - CRSConverterFactory 
can
        be applied from Strings to CRS  only.
        2017-05-25 11:03:29,806 DEBUG [org.geotools.util] -
        InterpolationConverterFactory can be applied from Strings to 
Interpolation
        only.
        2017-05-25 11:03:29,806 DEBUG [org.geotools.util] - CRSConverterFactory 
can
        be applied from Strings to CRS  only.
        2017-05-25 11:03:29,806 ERROR [org.geoserver.ows] -
        org.geoserver.platform.ServiceException: Could not find layer
        tests:field_id_test_uavngb_products-uavngb_20150130_120502_GNDVI_test
                at
        
org.geoserver.wms.map.GetMapKvpRequestReader.parseLayers(GetMapKvpRequestReader.java:1325)
                at
        
org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:231)
                at
        
org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:84)
                at 
org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1489)
                at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:677)
                at 
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:265)
                at
        
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
                at org.geoserver.gwc.GWC.dispatchOwsRequest(GWC.java:1207)
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.dispatchGetMap(GeoServerTileLayer.java:618)
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.getMetatilingReponse(GeoServerTileLayer.java:563)
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.seedTile(GeoServerTileLayer.java:757)
                at 
org.geowebcache.seed.SeedTask.doActionInternal(SeedTask.java:136)
                at org.geowebcache.seed.GWCTask.doAction(GWCTask.java:76)
                at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:36)
                at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:25)
                at java.util.concurrent.FutureTask.run(FutureTask.java:262)
                at
        
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                at
        
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                at java.lang.Thread.run(Thread.java:745)
        2017-05-25 11:03:29,816 ERROR [org.geowebcache.seed.MTSeeder] -* Problem
        communicating with GeoServer*
        org.geowebcache.GeoWebCacheException: Problem communicating with 
GeoServer
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.getMetatilingReponse(GeoServerTileLayer.java:568)
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.seedTile(GeoServerTileLayer.java:757)
                at 
org.geowebcache.seed.SeedTask.doActionInternal(SeedTask.java:136)
                at org.geowebcache.seed.GWCTask.doAction(GWCTask.java:76)
                at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:36)
                at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:25)
                at java.util.concurrent.FutureTask.run(FutureTask.java:262)
                at
        
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                at
        
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                at java.lang.Thread.run(Thread.java:745)
        *Caused by: java.lang.IllegalStateException: Expected: 
RenderedImageMap, got
        null*
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.dispatchGetMap(GeoServerTileLayer.java:621)
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.getMetatilingReponse(GeoServerTileLayer.java:563)
                ... 9 more
        2017-05-25 11:03:29,816 ERROR [org.geowebcache.seed.MTSeeder] - Problem
        communicating with GeoServer
        org.geowebcache.GeoWebCacheException: Problem communicating with 
GeoServer
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.getMetatilingReponse(GeoServerTileLayer.java:568)
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.seedTile(GeoServerTileLayer.java:757)
                at 
org.geowebcache.seed.SeedTask.doActionInternal(SeedTask.java:136)
                at org.geowebcache.seed.GWCTask.doAction(GWCTask.java:76)
                at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:36)
                at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:25)
                at java.util.concurrent.FutureTask.run(FutureTask.java:262)
                at
        
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                at
        
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                at java.lang.Thread.run(Thread.java:745)
        Caused by: java.lang.IllegalStateException: Expected: RenderedImageMap, 
got
        null
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.dispatchGetMap(GeoServerTileLayer.java:621)
                at
        
org.geoserver.gwc.layer.GeoServerTileLayer.getMetatilingReponse(GeoServerTileLayer.java:563)
                ... 9 more



        *It's only works* when I set data security read access available to all
        roles: *.*.r  Roles: *

        Any help would be much appreciated.

        Thanks in advanced




        --
        View this message in context: 
http://osgeo-org.1560.x6.nabble.com/rest-seed-workspace-layername-Problem-communicating-with-GeoServer-tp5321799.html
 
<http://osgeo-org.1560.x6.nabble.com/rest-seed-workspace-layername-Problem-communicating-with-GeoServer-tp5321799.html>
        Sent from the GeoServer - User mailing list archive at Nabble.com.

        
------------------------------------------------------------------------------
        Check out the vibrant tech community on one of the world's most
        engaging tech sites, Slashdot.org! http://sdm.link/slashdot
        _______________________________________________
        Geoserver-users mailing list
        Geoserver-users@lists.sourceforge.net 
<mailto:Geoserver-users@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/geoserver-users 
<https://lists.sourceforge.net/lists/listinfo/geoserver-users>


-- Regards,
    Nuno Oliveira
    ==
    GeoServer Professional Services from the experts! Visit 
http://goo.gl/it488V for more information.
    ==

    Nuno Miguel Carvalho Oliveira
    @nmcoliveira
    Software Engineer

    GeoSolutions S.A.S.
    Via di Montramito 3/A
    55054  Massarosa (LU)
    Italy
    phone: +39 0584 962313
    fax:      +39 0584 1660272

    http://www.geo-solutions.it
    http://twitter.com/geosolutions_it <http://twitter.com/geosolutions_it>

    -------------------------------------------------------
    AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
    Le informazioni contenute in questo messaggio di posta elettronica e/o 
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro 
utilizzo è consentito esclusivamente al destinatario del messaggio, per le 
finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio 
senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via 
e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal 
Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, 
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, 
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
     The information in this message and/or attachments, is intended solely for 
the attention and use of the named addressee(s) and may be confidential or 
proprietary in nature or covered by the provisions of privacy act (Legislative 
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in 
accord with its purpose, any disclosure, reproduction, copying, distribution, 
or either dissemination, either whole or partial, is strictly forbidden except 
previous formal approval of the named addressee(s). If you are not the intended 
recipient, please contact immediately the sender by telephone, fax or e-mail 
and delete the information in this message that has been received in error. The 
sender does not give any warranty or accept liability as the content, accuracy 
or completeness of sent messages and accepts no responsibility  for changes 
made after they were sent or for other risks which arise as a result of e-mail 
transmission, viruses, etc.


    
------------------------------------------------------------------------------
    Check out the vibrant tech community on one of the world's most
    engaging tech sites, Slashdot.org! http://sdm.link/slashdot
    _______________________________________________
    Geoserver-users mailing list

    Please make sure you read the following two resources before posting to 
this list:
    - Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/ 
<http://www.ianturton.com/talks/foss4g.html#/>
    - The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html 
<http://geoserver.org/comm/userlist-guidelines.html>

    Geoserver-users@lists.sourceforge.net 
<mailto:Geoserver-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/geoserver-users 
<https://lists.sourceforge.net/lists/listinfo/geoserver-users>



--
Regards,
Nuno Oliveira
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V 
for more information.
==

Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i 
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo 
è consentito esclusivamente al destinatario del messaggio, per le finalità 
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne 
il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di 
procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro 
sistema. Conservare il messaggio stesso, divulgarlo anche in parte, 
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, 
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to