You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Christian Schwarzinger (JIRA)" <ji...@apache.org> on 2016/05/27 10:06:12 UTC

[jira] [Created] (SOLR-9167) Unable to connect to solr via solrj jdbc driver

Christian Schwarzinger created SOLR-9167:
--------------------------------------------

             Summary: Unable to connect to solr via solrj jdbc driver 
                 Key: SOLR-9167
                 URL: https://issues.apache.org/jira/browse/SOLR-9167
             Project: Solr
          Issue Type: Bug
          Components: SolrCloud, SolrJ
    Affects Versions: 6.0
         Environment: java.version=1.8.0_77
java.vendor=Oracle Corporation
os.name=Mac OS X
os.arch=x86_64
os.version=10.11.5
            Reporter: Christian Schwarzinger
            Priority: Minor


Getting the following error, when trying to connect to solr via jdbc driver.

client error:
(ClientCnxn.java:1102) - Session 0x0 for server fe80:0:0:0:0:0:0:1%1/fe80:0:0:0:0:0:0:1%1:8983, unexpected error, closing socket connection and attempting reconnect
java.io.IOException: Packet len1213486160 is out of range!
	at org.apache.zookeeper.ClientCnxnSocket.readLength(ClientCnxnSocket.java:112) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
	at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:79) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) [zookeeper-3.4.6.jar:3.4.6-1569965]

This is imho. caused by the following server error:
Illegal character 0x0 in state=START for buffer HeapByteBuffer@5cc6fe87[p=1,&#8203;l=49,&#8203;c=8192,&#8203;r=48]={\x00<<<\x00\x00-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>>>charset=UTF-8\r\nCo...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}

Using http interface for sql via curl works however:
bin/solr start -cloud
bin/solr create -c test
curl -X POST -H 'Content-Type: application/json' 'http://localhost:8983/solr/test/update/json/docs' --data-binary '
{
  "id": "1",
  "title": "Doc 1"
}'
curl 'http://localhost:8983/solr/test/update?commit=true'
curl --data-urlencode 'stmt=SELECT count(*) FROM test' http://localhost:8983/solr/test/sql?aggregationMode=facet

This is the code, that fails:
Connection con = DriverManager.getConnection("jdbc:solr://localhost:8983?collection=test&aggregationMode=map_reduce&numWorkers=2");

taken from: https://cwiki.apache.org/confluence/display/solr/Parallel+SQL+Interface

Same error also occurs in 6.1.0-68 developer snapshot.

Background: I'm trying to write a solr sql connector for Jedox BI Suite, which should allow for better integration of solr into BI processes. Any advice / help appreciated.





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org