Solr DataImport Hangs

1.8k Views Asked by At

I am trying to load from SQLServer to Solr. Everytime I run the dataimport, the process just hangs after connecting to the database and never finishes. I'm not seeing anything helpful in the logs -- any ideas would be great. Here's my data-config.xml

     <dataConfig> <dataSource type="JdbcDataSource"
            driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
  url="jdbc:sqlserver://localhost\MSSQLSERVER2;databaseName=db_name;responseBuffering=adaptive;selectMethod=cursor"
            user="username"
            password="password" /> 
    <document name="profiles">
        <entity name="profile" query="SELECT * FROM dbo.tmp_SolrImport">
            <field column="ID" name="id" />
            <field column="type" name="type" />
            <field column="firstname" name="firstname" />
            <field column="lastname" name="lastname" />
            <field column="fullname" name="fullname" />
            <field column="interests" splitBy="|" sourceColName="interests"/>
            <field column="skill" splitBy="|" sourceColName="skills"/>
        </entity>
      </document>
    </dataConfig>

And here's what I see in the log file:

Jan 26, 2012 5:12:22 PM org.apache.solr.handler.dataimport.DataImportHandler processConfiguration
INFO: Processing configuration from solrconfig.xml: {config=data-config.xml}
Jan 26, 2012 5:12:22 PM org.apache.solr.handler.dataimport.DataImporter loadDataConfig
INFO: Data Configuration loaded successfully
Jan 26, 2012 5:12:22 PM org.apache.solr.handler.dataimport.DataImporter doFullImport
INFO: Starting Full Import
Jan 26, 2012 5:12:22 PM org.apache.solr.handler.dataimport.SolrWriter readIndexerProperties
WARNING: Unable to read: dataimport.properties
Jan 26, 2012 5:12:22 PM org.apache.solr.update.DirectUpdateHandler2 deleteAll
INFO: [] REMOVING ALL DOCUMENTS FROM INDEX
Jan 26, 2012 5:12:22 PM org.apache.solr.core.SolrDeletionPolicy onInit
INFO: SolrDeletionPolicy.onInit: commits:num=1
    commit{dir=C:\Program Files\Apache Software Foundation\Tomcat 7.0\solr\data\index,segFN=segments_5,version=1327527444614,generation=5,filenames=[_1.prx, _1.fdx, _1.tis, _1.frq, _1.fdt, _1.tii, segments_5, _1.fnm, _1.nrm]
Jan 26, 2012 5:12:22 PM org.apache.solr.core.SolrDeletionPolicy updateCommits
INFO: newest commit = 1327527444614
Jan 26, 2012 5:12:22 PM org.apache.solr.handler.dataimport.JdbcDataSource$1 call
INFO: Creating a connection for entity profile with URL: jdbc:sqlserver://localhost\MSSQLSERVER2;databaseName=db_name;responseBuffering=adaptive;selectMethod=cursor

The handler and config files seem to load correctly and I've made sure the SQL Server Browser is running and TCP/IP is enabled. If I run in the dataimport UI, the only message I get is that the command is still running, and one request made to the datasource.

Is there a problem with the connection string? Any place I can look for more logging detail?

1

There are 1 best solutions below

1
On

Did you check with DataImportHandler Development Console to see if there is data found to be imported? If so, then recheck the schema.xml to see if all the fields are present. If so, try to set batchSize to -1.

Also try url="jdbc:sqlserver://localhost:1433/MSSQLSERVER2;databaseName=dbo"