SolrJ 5.5 won't work with any of my servers

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

SolrJ 5.5 won't work with any of my servers

Shawn Heisey-2
I'm getting this stacktrace after upgrading SolrJ to 5.5.0 in my build
client:

http://apaste.info/Vpg

This is happening with 4.x, 5.3.2-SNAPSHOT, and 5.5.0-SNAPSHOT servers.

If I configure ivy to pull solrj 5.4.1 instead of the latest version,
everything works without changing the code.

I didn't find anything useful searching Jira.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: SolrJ 5.5 won't work with any of my servers

Shawn Heisey-2
On 2/29/2016 6:42 PM, Shawn Heisey wrote:
> I'm getting this stacktrace after upgrading SolrJ to 5.5.0 in my build
> client:
>
> http://apaste.info/Vpg
>
> This is happening with 4.x, 5.3.2-SNAPSHOT, and 5.5.0-SNAPSHOT servers.

I got a little bit closer look at the server log.  Initially it looked
like this was a NSFE exception from Lucene (missing segments_XX file),
which is why I sent this message.

The closer look has revealed that it's a problem with a third-party
plugin we are using.

Apologies for the noise.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: SolrJ 5.5 won't work with any of my servers

Shawn Heisey-2
On 2/29/2016 7:01 PM, Shawn Heisey wrote:

> On 2/29/2016 6:42 PM, Shawn Heisey wrote:
>> I'm getting this stacktrace after upgrading SolrJ to 5.5.0 in my build
>> client:
>>
>> http://apaste.info/Vpg
>>
>> This is happening with 4.x, 5.3.2-SNAPSHOT, and 5.5.0-SNAPSHOT servers.
> I got a little bit closer look at the server log.  Initially it looked
> like this was a NSFE exception from Lucene (missing segments_XX file),
> which is why I sent this message.
>
> The closer look has revealed that it's a problem with a third-party
> plugin we are using.

Second followup:

Although the error came from the third-party plugin, I think there's
still something different going on with SolrJ.  The SolrJ version was
the only thing I changed in my ivy config, which made it work again.

It looks like the plugin complained about a literal string "NULL"
(uppercase) being the data that it received.  The source data comes from
MySQL.  JDBC is the only part of the program I can imagine might create
a literal string "NULL" ... but this has never happened before, and I've
been using JDBC for a long time with this program.  Also, the problem
went away by downgrading SolrJ from 5.5.0 to 5.4.1, but none of the
other separate dependencies (including the MySQL JDBC driver) were
downgraded.

The only thing that jumped out at me in CHANGES.txt is the binary
request writer changing to default in SolrJ 5.5.  I explicitly set the
writer to binary with the 5.4.1 version, and suddenly I'm having the
same problem.

How could changing the request writer cause this?

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: SolrJ 5.5 won't work with any of my servers

Shai Erera
Shawn, not sure if it's the same case as yours, but I've hit NPEs upgrading
to 5.5 too. In my case though, SolrJ talks to a proxy servlets before the
request gets routed to Solr, and that servlet didn't handle binary content
stream well.

I had to add another resource method to the servlet which handled
"appliation/javabin" and "application/octet-stream" and received the body
as an InputStream.

Again, this may not be your case, but I hope that might help you resolve
the error.

Shai

On Tue, Mar 1, 2016 at 4:42 AM Shawn Heisey <[hidden email]> wrote:

> On 2/29/2016 7:01 PM, Shawn Heisey wrote:
> > On 2/29/2016 6:42 PM, Shawn Heisey wrote:
> >> I'm getting this stacktrace after upgrading SolrJ to 5.5.0 in my build
> >> client:
> >>
> >> http://apaste.info/Vpg
> >>
> >> This is happening with 4.x, 5.3.2-SNAPSHOT, and 5.5.0-SNAPSHOT servers.
> > I got a little bit closer look at the server log.  Initially it looked
> > like this was a NSFE exception from Lucene (missing segments_XX file),
> > which is why I sent this message.
> >
> > The closer look has revealed that it's a problem with a third-party
> > plugin we are using.
>
> Second followup:
>
> Although the error came from the third-party plugin, I think there's
> still something different going on with SolrJ.  The SolrJ version was
> the only thing I changed in my ivy config, which made it work again.
>
> It looks like the plugin complained about a literal string "NULL"
> (uppercase) being the data that it received.  The source data comes from
> MySQL.  JDBC is the only part of the program I can imagine might create
> a literal string "NULL" ... but this has never happened before, and I've
> been using JDBC for a long time with this program.  Also, the problem
> went away by downgrading SolrJ from 5.5.0 to 5.4.1, but none of the
> other separate dependencies (including the MySQL JDBC driver) were
> downgraded.
>
> The only thing that jumped out at me in CHANGES.txt is the binary
> request writer changing to default in SolrJ 5.5.  I explicitly set the
> writer to binary with the 5.4.1 version, and suddenly I'm having the
> same problem.
>
> How could changing the request writer cause this?
>
> Thanks,
> Shawn
>
>
Reply | Threaded
Open this post in threaded view
|

Re: SolrJ 5.5 won't work with any of my servers

Shawn Heisey-2
On 2/29/2016 9:14 PM, Shai Erera wrote:
> Shawn, not sure if it's the same case as yours, but I've hit NPEs upgrading
> to 5.5 too. In my case though, SolrJ talks to a proxy servlets before the
> request gets routed to Solr, and that servlet didn't handle binary content
> stream well.
>
> I had to add another resource method to the servlet which handled
> "appliation/javabin" and "application/octet-stream" and received the body
> as an InputStream.

I wish this was an NPE.  It would be easier to track down.

There is no proxy.  Although I do have a load balancer (haproxy) in
place for queries, this program doesn't use it.

It looks to me like SolrJ 5.5 behaves in a way that changes what gets
sent when talking to an existing Solr install using the default Jetty
config.  This seems like a bug to me.

I need to investigate what happens in my code when MySQL returns NULL
values.  I suspect that the object assigned to the SolrInputDocument
field is null.  Whatever it is that happens, SolrJ 5.4.1 works correctly
and 5.5.0 doesn't.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: SolrJ 5.5 won't work with any of my servers

Shai Erera
Ah ok, in my case even 5.4.1 didn't work with binary request writer, so
probably we don't face the same issue.

Shai

On Tue, Mar 1, 2016, 17:07 Shawn Heisey <[hidden email]> wrote:

> On 2/29/2016 9:14 PM, Shai Erera wrote:
> > Shawn, not sure if it's the same case as yours, but I've hit NPEs
> upgrading
> > to 5.5 too. In my case though, SolrJ talks to a proxy servlets before the
> > request gets routed to Solr, and that servlet didn't handle binary
> content
> > stream well.
> >
> > I had to add another resource method to the servlet which handled
> > "appliation/javabin" and "application/octet-stream" and received the body
> > as an InputStream.
>
> I wish this was an NPE.  It would be easier to track down.
>
> There is no proxy.  Although I do have a load balancer (haproxy) in
> place for queries, this program doesn't use it.
>
> It looks to me like SolrJ 5.5 behaves in a way that changes what gets
> sent when talking to an existing Solr install using the default Jetty
> config.  This seems like a bug to me.
>
> I need to investigate what happens in my code when MySQL returns NULL
> values.  I suspect that the object assigned to the SolrInputDocument
> field is null.  Whatever it is that happens, SolrJ 5.4.1 works correctly
> and 5.5.0 doesn't.
>
> Thanks,
> Shawn
>
>
Reply | Threaded
Open this post in threaded view
|

Re: SolrJ 5.5 won't work with any of my servers

Shawn Heisey-2
On 3/1/2016 9:30 AM, Shai Erera wrote:
> Ah ok, in my case even 5.4.1 didn't work with binary request writer, so
> probably we don't face the same issue.

If I set the writer to binary on 5.4.1, it fails too.

My intent when I wrote the program was to use the binary writer, but
apparently I didn't actually implement that.  5.4.1 works with the
default (xml) writer.  I have not tried 5.5 with the xml writer, but I
bet that would work.

I just added a null check to the part of my code that does doc.addField,
skipping the add if the object is null.  This appears to have fixed the
problem when using SolrJ 5.5.  This is also a good idea for my program
in general, so I'm not really unhappy about needing it.

So, I believe what happens with the binary writer is that when the field
contains a null object, the writer is adding the literal string "NULL"
(in uppercase) as the field value.  The XML writer apparently handles
this situation by not including the field.

Thanks,
Shawn