Solr导入什么都不做

时间:2012-01-28 01:09:36

标签: java apache solr

我启动了Solr并运行了以下查询:

curl "http://localhost:8983/solr/dataimport?command=full-import&commit=true"

然后我检查了Solr日志缓冲区中的输出:

  

2012年1月27日下午5:08:23   org.apache.solr.handler.dataimport.DataImporter doFullImport INFO:   开始全面导入2012年1月27日下午5:08:23   org.apache.solr.core.SolrCore执行INFO:[] webapp = / solr   path = / dataimport params = {command = full-import& commit = true} status = 0   QTime = 2012年1月27日下午5:08:23   org.apache.solr.handler.dataimport.SolrWriter readIndexerProperties   信息:读取dataimport.properties 2012年1月27日下午5:08:23   org.apache.solr.update.DirectUpdateHandler2 deleteAll INFO:[]   从索引中删除所有文档2012年1月27日下午5:08:23   org.apache.solr.core.SolrDeletionPolicy onInit INFO:   SolrDeletionPolicy.onInit:提交:num = 1     承诺{DIR = /私人/无功/网络/ HTML / internsolr / solr的/示例/ solr的/数据/索引,segFN = segments_2b,版本= 1320251100997,代= 83,文件名= [segments_2b]   2012年1月27日下午5:08:23 org.apache.solr.core.SolrDeletionPolicy   updateCommits INFO:最新提交= 1320251100997 2012年1月27日5:08:23   PM org.apache.solr.handler.dataimport.JdbcDataSource $ 1调用INFO:   使用URL为实体ID创建连接:   JDBC:MySQL的://本地主机:8983 / internshipsearch

此外,XML输出:

<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int name="QTime">7</int></lst><lst name="initArgs"><lst name="defaults"><str name="config">data-config.xml</str></lst></lst><str name="command">full-import</str><str name="status">idle</str><str name="importResponse"/><lst name="statusMessages"/><str name="WARNING">This response format is experimental.  It is likely to change in the future.</str>
</response>

请注意,statusMessages节点为空。我猜这意味着什么都没有导入,因为当我运行我的应用程序来查看数据时,什么都没有加载......

以下是正确的statusMessages块的示例: http://digitalpbk.com/apachesolr/apache-solr-mysql-sample-data-config

更新 * 大约80秒后出现异常 *

Jan 27, 2012 5:18:23 PM org.apache.solr.common.SolrException log
SEVERE: Exception while processing: id document : SolrInputDocument[{}]:org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: select respondentid,                           first_name,                           last_name,                           cmc_email_address,                           graduation_year,                           first_major,                           additional_major,                           sequence,                           other_major,                           organization_name,                           organization_website,                           organization_desc,                           industry,                           job_title,                           department,                           city,                           state,                           country,                           region,                           internship_paid,                           hourly_salary,                           year_undertaken,                           recommend_again,                           employer_supervisor,                           employer_phone,                           employer_email,                           not_recommended_desc,                           full_time_offer,                           full_time_accept,                           attend_summer_classes,                           summer_classes_institution,                           summer_classes_desc,                           summer_travel,                           summer_travel_city,                           summer_travel_state,                           summer_travel_country,                           summer_other_activity,                           summer_other_activity_desc,                           how_discovered,                           doe_start_month,                           doe_start_day,                           doe_end_month,                           doe_end_day             from interndata Processing Document # 1
    at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:72)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:253)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:210)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
    at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:238)
    at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:596)
    at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:268)
    at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:187)
    at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:359)
    at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:427)
    at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408)
Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: 

** BEGIN NESTED EXCEPTION ** 

com.mysql.jdbc.CommunicationsException
MESSAGE: Communications link failure due to underlying exception: 

** BEGIN NESTED EXCEPTION ** 

java.io.EOFException

STACKTRACE:

java.io.EOFException
    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1913)
    at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:501)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:971)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2670)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:161)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:128)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSource.java:363)
    at org.apache.solr.handler.dataimport.JdbcDataSource.access$200(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:240)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:210)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
    at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:238)
    at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:596)
    at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:268)
    at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:187)
    at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:359)
    at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:427)
    at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.

STACKTRACE:

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: 

** BEGIN NESTED EXCEPTION ** 

java.io.EOFException

STACKTRACE:

java.io.EOFException
    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1913)
    at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:501)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:971)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2670)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:161)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:128)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSource.java:363)
    at org.apache.solr.handler.dataimport.JdbcDataSource.access$200(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:240)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:210)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
    at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:238)
    at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:596)
    at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:268)
    at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:187)
    at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:359)
    at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:427)
    at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
    at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:569)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:971)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2670)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:161)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:128)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSource.java:363)
    at org.apache.solr.handler.dataimport.JdbcDataSource.access$200(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:240)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:210)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
    at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:238)
    at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:596)
    at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:268)
    at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:187)
    at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:359)
    at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:427)
    at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2741)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:161)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:128)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSource.java:363)
    at org.apache.solr.handler.dataimport.JdbcDataSource.access$200(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:240)
    ... 11 more

Jan 27, 2012 5:18:23 PM org.apache.solr.common.SolrException log
SEVERE: Full Import failed:org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: select respondentid,                           first_name,                           last_name,                           cmc_email_address,                           graduation_year,                           first_major,                           additional_major,                           sequence,                           other_major,                           organization_name,                           organization_website,                           organization_desc,                           industry,                           job_title,                           department,                           city,                           state,                           country,                           region,                           internship_paid,                           hourly_salary,                           year_undertaken,                           recommend_again,                           employer_supervisor,                           employer_phone,                           employer_email,                           not_recommended_desc,                           full_time_offer,                           full_time_accept,                           attend_summer_classes,                           summer_classes_institution,                           summer_classes_desc,                           summer_travel,                           summer_travel_city,                           summer_travel_state,                           summer_travel_country,                           summer_other_activity,                           summer_other_activity_desc,                           how_discovered,                           doe_start_month,                           doe_start_day,                           doe_end_month,                           doe_end_day             from interndata Processing Document # 1
    at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:72)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:253)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:210)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
    at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:238)
    at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:596)
    at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:268)
    at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:187)
    at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:359)
    at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:427)
    at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408)
Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: 

** BEGIN NESTED EXCEPTION ** 

com.mysql.jdbc.CommunicationsException
MESSAGE: Communications link failure due to underlying exception: 

** BEGIN NESTED EXCEPTION ** 

java.io.EOFException

STACKTRACE:

java.io.EOFException
    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1913)
    at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:501)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:971)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2670)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:161)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:128)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSource.java:363)
    at org.apache.solr.handler.dataimport.JdbcDataSource.access$200(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:240)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:210)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
    at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:238)
    at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:596)
    at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:268)
    at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:187)
    at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:359)
    at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:427)
    at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.

STACKTRACE:

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: 

** BEGIN NESTED EXCEPTION ** 

java.io.EOFException

STACKTRACE:

java.io.EOFException
    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1913)
    at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:501)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:971)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2670)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:161)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:128)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSource.java:363)
    at org.apache.solr.handler.dataimport.JdbcDataSource.access$200(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:240)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:210)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
    at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:238)
    at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:596)
    at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:268)
    at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:187)
    at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:359)
    at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:427)
    at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
    at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:569)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:971)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2670)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:161)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:128)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSource.java:363)
    at org.apache.solr.handler.dataimport.JdbcDataSource.access$200(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:240)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:210)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
    at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
    at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:238)
    at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:596)
    at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:268)
    at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:187)
    at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:359)
    at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:427)
    at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2741)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:161)
    at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:128)
    at org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSource.java:363)
    at org.apache.solr.handler.dataimport.JdbcDataSource.access$200(JdbcDataSource.java:39)
    at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:240)
    ... 11 more

Jan 27, 2012 5:18:23 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
Jan 27, 2012 5:18:23 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback

1 个答案:

答案 0 :(得分:0)

我的问题是我的AjaxSolr.Manager设置不正确。默认情况下,Solr侦听端口8983,但我在1024上监听。这是正确的代码段:

Manager = new AjaxSolr.Manager({solrUrl: 'http://localhost:8983/solr/'});