[Dspace-tech] Solr: Bad Request error

66 views
Skip to first unread message

Hilton Gibson

unread,
Aug 25, 2015, 2:02:26 PM8/25/15
to dspace-tech
Hi All

I keep getting this error when trying to import a solr converted log file.
Anybody had this problem before and know how to solve it.
I can connect to the local solr server using lynx at: http://localhost/solr.
See screenshot attached.

Cheers

hg

>>>>
dspace@ir2:~/log$ /home/dspace/bin/dspace stats-log-importer -i
dspace.log.1.solr
Processing file: dspace.log.1.solr
Error seeking country while seeking 2464710009
Bad Request

Bad Request

request: http://localhost/solr/update?wt=javabin&version=2.2
org.apache.solr.common.SolrException: Bad Request

Bad Request

request: http://localhost/solr/update?wt=javabin&version=2.2
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:343)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:183)
at
org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:217)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:63)
at
org.dspace.statistics.util.StatisticsImporter.load(StatisticsImporter.java:363)
at
org.dspace.statistics.util.StatisticsImporter.main(StatisticsImporter.java:501)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:212)
Processed 1 log lines
- 0 entries added to solr: 0%
- 1 errors: 100%
- 0 search engine activity skipped: 0%
About to commit data to solr...Exception: Bad Request

Bad Request

request: http://localhost/solr/update
org.apache.solr.common.SolrException: Bad Request

Bad Request

request: http://localhost/solr/update
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:343)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:183)
at
org.apache.solr.client.solrj.request.UpdateRequest.process(UpdateRequest.java:217)
at org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:85)
at org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:74)
at
org.dspace.statistics.util.StatisticsImporter.load(StatisticsImporter.java:389)
at
org.dspace.statistics.util.StatisticsImporter.main(StatisticsImporter.java:501)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:212)
>>>>

--
Hilton Gibson
Systems Administrator
JS Gericke Library Room 1025D
Stellenbosch University
Private Bag X5036
Stellenbosch
7599
South Africa

Tel: +27 21 808 4100 | Cell: +27 84 646 4758
solr.png

Mark Diggory

unread,
Aug 25, 2015, 2:02:35 PM8/25/15
to Hilton Gibson, dspace-tech
Hilton,

Look for Solr exceptions in your tomcat logs for that webapplication.
I didn't write the dspace log importer, the query looks odd, I'm not
sure why it doesn't contain more query parameters, does using that
query directly create the same error in Lynx?

Mark
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> DSpace-tech mailing list
> DSpac...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
>



--
Mark R. Diggory
Head of U.S. Operations - @mire

http://www.atmire.com - Institutional Repository Solutions
http://www.togather.eu - Before getting together, get Tog@ther

Mark Diggory

unread,
Aug 25, 2015, 2:02:37 PM8/25/15
to Hilton Gibson, dspace-tech
Actually, looking at the URL there, its wrong....

request: http://localhost/solr/update?wt=javabin&version=2.2

should be

request: http://localhost/solr/statistics/update?wt=javabin&version=2.2

Mark

On Fri, Jul 30, 2010 at 3:55 AM, Hilton Gibson <hilton...@gmail.com> wrote:

Hilton Gibson

unread,
Aug 25, 2015, 2:02:42 PM8/25/15
to dspace-tech
Thx. Fixed.
Now I get country seek errors.
But my build is a bit customised.
I removed all geolite build instructions because we are behind a very
restrictive firewall.
Is this the reason ?

Mark Diggory

unread,
Aug 25, 2015, 2:02:46 PM8/25/15
to Hilton Gibson, dspace-tech
Yes, geolite just downloads a database to lookup IP addresses in, you should let it install.  If you are behind a proxy you will want to follow those instructions as well to assure that the proxy is providing XForwardFor headers.

Mark

Hilton Gibson

unread,
Aug 25, 2015, 2:02:47 PM8/25/15
to dspace-tech
On 31/07/2010 22:53, Mark Diggory wrote:
Yes, geolite just downloads a database to lookup IP addresses in, you should let it install.  If you are behind a proxy you will want to follow those instructions as well to assure that the proxy is providing XForwardFor headers.
I manually downloaded the database and extracted it to the config folder.
What firewall rules should I request of our campus firewall administrator ?

Thanks for your help.
I intend to put up a wiki page to help others get solr working behind a firewall and proxy.

Cheers

hg
Reply all
Reply to author
Forward
0 new messages