javapriyan / solr-data-import-scheduler

Automatically exported from code.google.com/p/solr-data-import-scheduler
0 stars 0 forks source link

HttpPostScheduler gave 415 code #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I followed every steps listed in the [wiki][1] 
2. started tomcat and waited until the timer kicked off and it did
3. saw 415 code in console and no data retrieved from DB. Solr wasn't updated.

What is the expected output? What do you see instead?
I expected to see code 200 and Solr got updated, but it didn't

What version of the product are you using? On what operating system?
I download the scheduler from google just now (so i assume the latest). Solr 
4.81, on Windows 7 and tomcat 7.039 and java 7

Please provide any additional information below

I only have one core. and I modified the param in dateimport.properties since 
the original one also gave me 415. The entire console message is as below. 
However, before diving into the console message, I want to mention that I tried 
the Full URL below in Firefox RESTClient tester, it gave good results with both 
GET or POST. I could see that Solr was updated.

So here is the full message, please help.
Thank you

    4200409 [Timer-0] INFO  org.apache.solr.handler.dataimport.scheduler.HttpPostScheduler  û <index update process> Process started at .............. 03.07.2014 15:11:56 385
    4200411 [Timer-0] INFO  org.apache.solr.handler.dataimport.scheduler.HttpPostScheduler  û <index update process> Request method                 
    POST
    4200412 [Timer-0] INFO  org.apache.solr.handler.dataimport.scheduler.HttpPostScheduler  û <index update process> Succesfully connected to server
    localhost
    4200414 [Timer-0] INFO  org.apache.solr.handler.dataimport.scheduler.HttpPostScheduler  û <index update process> Using port                     
    58080
    4200416 [Timer-0] INFO  org.apache.solr.handler.dataimport.scheduler.HttpPostScheduler  û <index update process> Application name
    solr
    4200424 [Timer-0] INFO  org.apache.solr.handler.dataimport.scheduler.HttpPostScheduler  û <index update process> URL params                     
    /dataimport?command=delta-import&clean=false&commit=true
    4200426 [Timer-0] INFO  org.apache.solr.handler.dataimport.scheduler.HttpPostScheduler  û <index update process> Full URL
    http://localhost:58080/solr/dataimport?command=delta-import&clean=false&commit=true
    4200430 [Timer-0] INFO  org.apache.solr.handler.dataimport.scheduler.HttpPostScheduler  û <index update process> Response message
    Unsupported Media Type
    4200431 [Timer-0] INFO  org.apache.solr.handler.dataimport.scheduler.HttpPostScheduler  û <index update process> Response code                  415
    4200433 [Timer-0] INFO  org.apache.solr.core.SolrResourceLoader  û No /solr/home in JNDI
    4200440 [Timer-0] INFO  org.apache.solr.core.SolrResourceLoader  û using system property solr.solr.home: C:/Users/Greg/Servers/solr_greg
    4200442 [Timer-0] INFO  org.apache.solr.core.SolrResourceLoader  û new SolrResourceLoader for deduced Solr Home: 'C:/Users/Greg/Servers/solr_greg\'
    4200465 [Timer-0] INFO  org.apache.solr.handler.dataimport.scheduler.SolrDataImportProperties  û Instance dir = C:/Users/Greg/Servers/solr_greg\
    4200467 [Timer-0] INFO  org.apache.solr.handler.dataimport.scheduler.HttpPostScheduler  û <index update process> Disconnected from server
    localhost
    4200468 [Timer-0] INFO  org.apache.solr.handler.dataimport.scheduler.HttpPostScheduler  û <index update process> Process ended at ................ 03.07.2014 15:11:56 444

  [1]: http://wiki.apache.org/solr/DataImportHandler#Scheduling

Original issue reported on code.google.com by miste...@gmail.com on 3 Jul 2014 at 8:37

GoogleCodeExporter commented 8 years ago
Any updates on this?? I'm getting the exact same error..any help would be much 
appreciated. Thanks.

Tulio

Original comment by tulio.do...@gmail.com on 19 Aug 2014 at 2:10

GoogleCodeExporter commented 8 years ago
I just went in and corrected it myself. What I did was to add following line to 
sendHttpPost() of HttpPostScheduler.java:
  ...
  conn.setRequestProperty("Content-Type","application/html");
  ...

Original comment by miste...@gmail.com on 20 Aug 2014 at 1:50

GoogleCodeExporter commented 8 years ago
Cheers!!

Original comment by tulio.do...@gmail.com on 20 Aug 2014 at 8:20

GoogleCodeExporter commented 8 years ago
Sorry guys, I never received any notifications regarding these problems. Good 
thing you figured it out yourself. I'm transfering repo to GitHub and I'll make 
sure to incorporate your fix.

Thanks

Original comment by mbon...@gmail.com on 30 Mar 2015 at 7:21