Re: Authenticated Indexing Not working

2009-05-04 Thread Allahbaksh Asadullah
Hi,
My error is as below. If authentication error while indexing with
authentication enable (Basic GET/POST)
org.apache.solr.client.solrj.SolrServerException:
org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing
request can not be repeated.
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:470)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:242)
at
org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:259)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:48)
at
com.infy.icode.SolrAuthenticationTest.index(SolrAuthenticationTest.java:84)



http://blog.comtaste.com/2009/02/securing_your_solr_server_on_t.html

If I am indexing without authentication it works fine. I followed procedure
listed in above blog.

Regards,
Allahbaksh

On Wed, Apr 29, 2009 at 9:44 PM, Allahbaksh Asadullah <
allahbaks...@gmail.com> wrote:

> Hi,
> I followed the procedure given at
> http://blog.comtaste.com/2009/02/securing_your_solr_server_on_t.html
> Regards,
> Allahbaksh
>
> On 4/28/09, Shalin Shekhar Mangar  wrote:
> > On Sun, Apr 26, 2009 at 11:04 AM, Allahbaksh Asadullah <
> > allahbaks...@gmail.com> wrote:
> >
> >> HI Otis,
> >> I am using HTTPClient for authentication. When I use the server with
> >> Authentication for searching it works fine. But when I use it for
> >> indexing it throws error.
> >>
> >
> > What is the error? Is it thrown by Solr or your servlet container?
> >
> > One difference between a search request and update request with Solrj is
> > that a search request uses HTTP GET by default but an update request uses
> > an
> > HTTP POST by default. Perhaps your authentication scheme is not
> configured
> > correctly for POST requests?
> >
> > --
> > Regards,
> > Shalin Shekhar Mangar.
> >
>
>
> --
> Allahbaksh Mohammedali Asadullah,
> Software Engineering & Technology Labs,
> Infosys Technolgies Limited, Electronic City,
> Hosur Road, Bangalore 560 100, India.
> (Board: 91-80-28520261 | Extn: 73927 | Direct: 41173927.
> Fax: 91-80-28520362 | Mobile: 91-9845505322.
>



-- 
Allahbaksh Mohammedali Asadullah,
Software Engineering & Technology Labs,
Infosys Technolgies Limited, Electronic City,
Hosur Road, Bangalore 560 100, India.
(Board: 91-80-28520261 | Extn: 73927 | Direct: 41173927.
Fax: 91-80-28520362 | Mobile: 91-9845505322.


Re: Authenticated Indexing Not working

2009-04-29 Thread Allahbaksh Asadullah
Hi,
I followed the procedure given at
http://blog.comtaste.com/2009/02/securing_your_solr_server_on_t.html
Regards,
Allahbaksh

On 4/28/09, Shalin Shekhar Mangar  wrote:
> On Sun, Apr 26, 2009 at 11:04 AM, Allahbaksh Asadullah <
> allahbaks...@gmail.com> wrote:
>
>> HI Otis,
>> I am using HTTPClient for authentication. When I use the server with
>> Authentication for searching it works fine. But when I use it for
>> indexing it throws error.
>>
>
> What is the error? Is it thrown by Solr or your servlet container?
>
> One difference between a search request and update request with Solrj is
> that a search request uses HTTP GET by default but an update request uses
> an
> HTTP POST by default. Perhaps your authentication scheme is not configured
> correctly for POST requests?
>
> --
> Regards,
> Shalin Shekhar Mangar.
>


-- 
Allahbaksh Mohammedali Asadullah,
Software Engineering & Technology Labs,
Infosys Technolgies Limited, Electronic City,
Hosur Road, Bangalore 560 100, India.
(Board: 91-80-28520261 | Extn: 73927 | Direct: 41173927.
Fax: 91-80-28520362 | Mobile: 91-9845505322.


Re: Authenticated Indexing Not working

2009-04-27 Thread Shalin Shekhar Mangar
On Sun, Apr 26, 2009 at 11:04 AM, Allahbaksh Asadullah <
allahbaks...@gmail.com> wrote:

> HI Otis,
> I am using HTTPClient for authentication. When I use the server with
> Authentication for searching it works fine. But when I use it for
> indexing it throws error.
>

What is the error? Is it thrown by Solr or your servlet container?

One difference between a search request and update request with Solrj is
that a search request uses HTTP GET by default but an update request uses an
HTTP POST by default. Perhaps your authentication scheme is not configured
correctly for POST requests?

-- 
Regards,
Shalin Shekhar Mangar.


Re: Authenticated Indexing Not working

2009-04-25 Thread Allahbaksh Asadullah
HI Otis,
I am using HTTPClient for authentication. When I use the server with
Authentication for searching it works fine. But when I use it for
indexing it throws error.
Regards,
Allahbaksh

On 4/25/09, Otis Gospodnetic  wrote:
>
> My guess is you could provide the credentials to the underlying HttpClient
> (used by SolrJ), and let it do the authentication.  I don't have the API
> handy, sorry.
> But this may slow things down and I have to wonder if you really really need
> authentication there or whether using HTTP authentication is the best way to
> do it.
>
>
> Otis --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
>
>
> - Original Message 
>> From: Allahbaksh Asadullah 
>> To: solr-user@lucene.apache.org
>> Sent: Saturday, April 25, 2009 9:31:35 AM
>> Subject: Authenticated Indexing Not working
>>
>> Hi, I have configured basic authentication in Solr using web.xml. It is
>> working fine when I search using SolrJ. But when I try to index with
>> Authentication enabled using SolrJ it is throwing exception.
>>
>> Is secured indexing is not enabled? How I am suppose to use secured
>> indexing.
>>
>> Regards,
>> Allahbaksh
>
>


-- 
Allahbaksh Mohammedali Asadullah,
Software Engineering & Technology Labs,
Infosys Technolgies Limited, Electronic City,
Hosur Road, Bangalore 560 100, India.
(Board: 91-80-28520261 | Extn: 73927 | Direct: 41173927.
Fax: 91-80-28520362 | Mobile: 91-9845505322.


Re: Authenticated Indexing Not working

2009-04-25 Thread Otis Gospodnetic

My guess is you could provide the credentials to the underlying HttpClient 
(used by SolrJ), and let it do the authentication.  I don't have the API handy, 
sorry.
But this may slow things down and I have to wonder if you really really need 
authentication there or whether using HTTP authentication is the best way to do 
it.


Otis --
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



- Original Message 
> From: Allahbaksh Asadullah 
> To: solr-user@lucene.apache.org
> Sent: Saturday, April 25, 2009 9:31:35 AM
> Subject: Authenticated Indexing Not working
> 
> Hi, I have configured basic authentication in Solr using web.xml. It is
> working fine when I search using SolrJ. But when I try to index with
> Authentication enabled using SolrJ it is throwing exception.
> 
> Is secured indexing is not enabled? How I am suppose to use secured
> indexing.
> 
> Regards,
> Allahbaksh



Authenticated Indexing Not working

2009-04-25 Thread Allahbaksh Asadullah
Hi, I have configured basic authentication in Solr using web.xml. It is
working fine when I search using SolrJ. But when I try to index with
Authentication enabled using SolrJ it is throwing exception.

Is secured indexing is not enabled? How I am suppose to use secured
indexing.

Regards,
Allahbaksh