Hi,

Just did a quick test with a GeoServer 2.11.2 running inside a tomcat instance and everything worked as expected:

   curl -u 'admin:geoserver' -v --data-urlencode -POST 
http://localhost:8080/geoserver/rest/reload

   *   Trying 127.0.0.1...

   * Connected to localhost (127.0.0.1) port 8080 (#0)

   * Server auth using Basic with user 'admin'

   > POST /geoserver/rest/reload HTTP/1.1

   > Host: localhost:8080

   > Authorization: Basic YWRtaW46Z2Vvc2VydmVy

   > User-Agent: curl/7.47.0

   > Accept: */*

   > Content-Length: 5

   > Content-Type: application/x-www-form-urlencoded

>
   * upload completely sent off: 5 out of 5 bytes

   < HTTP/1.1 200 OK

   < Date: Thu, 25 Jan 2018 18:24:29 GMT

   < Server: Noelios-Restlet-Engine/1.0..8

   < Transfer-Encoding: chunked

   <

   * Connection #0 to host localhost left intact

The error you are getting suggests indeed that you are using a login that doesn't have enough permissions to use that REST endpoint. I would double check that user configuration and give it a try with an administrator login.

Are you using any specific configuration for the security system ?

Kind regards,

Nuno Oliveira

On 01/25/2018 08:23 AM, Steve Omondi wrote:
Hey guys,
I'm trying to reload Geoserver configuration via a POST Request using CURL Utility but it fails with the following error;

administrator@host:/media/config$ curl -u "admin:password" -v --data-urlencode -POST http://host:8380/geoserver/rest/reload
*  Trying 127.0.1.1...
* Connected to ros-gs3 (127.0.1.1) port 8380 (#0)
* Server auth using Basic with user 'admin'
> POST /geoserver/rest/reload HTTP/1.1
> Host: host:8380
> Authorization: Basic YWRtaW46UjRtYW5pdGFpbCAtbjIwMCAtZiAvbW50L3Jvcy1jb25maWcvcm9zLWxvZ3MvZ3MzMy9HUzMzYWRtaW4ubG9nIA==
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Length: 5
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 5 out of 5 bytes
< HTTP/1.1 401
< Set-Cookie: remember-me=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; 
Path=/geoserver
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="GeoServer Realm"
< Content-Type: text/html;charset=utf-8
< Content-Language: en
< Content-Length: 1171
< Date: Thu, 25 Jan 2018 08:16:20 GMT
<
<!doctype html><html lang="en"><head><title>_HTTP Status 401 – Unauthorized_</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name <http://a.name> {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> No AuthenticationProvider found for org.springframework.security.authentication.UsernamePasswordAuthenticationToken</p><p><b>Description</b> The request has not been a* Connection #0 to host <host> left intact pplied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/8.5.13</h3></body></html>


The provided user and password are correct.

I'm not able to access http://host:8381/geoserver/rest/reload on the web as well while I can access http://host:8381/geoserver/rest/all the/other/endpoints

I have tried to do the same with Apache Jmeter, and this 
(/geoserver/rest/reload) is not available.

Happens for Geoserver *2.11.2 running on Tomcat 8 as well as Geoserver 2.9 
running o Jetty.*
*
*
*I'm sure this is not normal, so anyone help me figure out what I'm missing 
please.*

Kind regards,
Steve Omondi

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>



------------------------------------------------------------------------------
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

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]
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

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to