lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yury Kartsev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-9493) uniqueKey generation fails if content POSTed as "application/javabin".
Date Mon, 12 Sep 2016 18:16:20 GMT

    [ https://issues.apache.org/jira/browse/SOLR-9493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15484855#comment-15484855
] 

Yury Kartsev commented on SOLR-9493:
------------------------------------

Thanks for your time. I've retried with TRACE log level with the following code: {code}  
             CloudSolrClient cloudSolrClient = new CloudSolrClient(getSolrServerURL());
                cloudSolrClient.setZkClientTimeout(getReadTimeout());
                cloudSolrClient.setZkConnectTimeout(getConnectionTimeout());
                cloudSolrClient.setDefaultCollection(getCollectionName());
                // setting basic authentication in HTTP client
                DefaultHttpClient httpClient = (DefaultHttpClient) cloudSolrClient.getLbClient().getHttpClient();
                HttpClientUtil.setBasicAuth(httpClient, authUserName, authPassword);
                // setting preemptive authentication in HTTP client to prevent "NonRepeatableRequestException"
                httpClient.addRequestInterceptor(getPreemptiveBasicAuthInterceptor(authUserName,
authPassword));

                 solrClient.addBeans(beans); // called from different class (beans is Collection
of my Serializable Solr entities with "org.apache.solr.client.solrj.beans.Field" annotations){code}
Yes, I am using basic authentication because my SOLR instances are secured with that. Also
I'm not using multiple entries in this particular example. Well, yes, I'm passing Collection,
but it consists of only one element.

The log looks like this:{code}2016-09-12 17:57:46.841 DEBUG (qtp1989972246-80) [c:xxx-collection
s:shard1 r:core_node4 x:xxx-collection] o.e.j.s.HttpConnection HttpConnection@49800692[SelectChannelEndPoint@1af89b5d{/10.100.210.241:51788<->8983,Open,in,out,-,-,1/50000,HttpConnection}{io=0/0,kio=0,kro=1}][p=HttpParser{s=CHUNKED_CONTENT,0
of -1},g=HttpGenerator@177c5e8c{s=START},c=HttpChannelOverHttp@1313573b{r=7,c=false,a=IDLE,uri=//10.100.210.241:8983/solr/xxx-collection/update?wt=javabin&version=2}]
parsed true HttpParser{s=CHUNKED_CONTENT,0 of -1}
2016-09-12 17:57:46.841 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.HttpChannel HttpChannelOverHttp@1313573b{r=7,c=false,a=IDLE,uri=//10.100.210.241:8983/solr/xxx-collection/update?wt=javabin&version=2}
handle //10.100.210.241:8983/solr/xxx-collection/update?wt=javabin&version=2 
2016-09-12 17:57:46.841 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.HttpChannelState HttpChannelState@2bb68922{s=IDLE a=null i=true r=!P!U w=false} handling
IDLE
2016-09-12 17:57:46.841 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.HttpChannel HttpChannelOverHttp@1313573b{r=7,c=false,a=DISPATCHED,uri=//10.100.210.241:8983/solr/xxx-collection/update?wt=javabin&version=2}
action DISPATCH
2016-09-12 17:57:46.841 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.Server REQUEST on HttpChannelOverHttp@1313573b{r=7,c=false,a=DISPATCHED,uri=//10.100.210.241:8983/solr/xxx-collection/update?wt=javabin&version=2}
POST /solr/xxx-collection/update HTTP/1.1
User-Agent: Solr[org.apache.solr.client.solrj.impl.HttpSolrClient] 1.0
Transfer-Encoding: chunked
Content-Type: application/javabin
Host: 10.100.210.241:8983
Authorization: Basic *****
2016-09-12 17:57:46.841 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.h.ContextHandler scope null||/solr/xxx-collection/update @ o.e.j.w.WebAppContext@2ac273d3{/solr,file:///Users/yury/Library/Solr/solr-6.2.0/server/solr-webapp/webapp/,AVAILABLE}{/Users/yury/Library/Solr/solr-6.2.0/server/solr-webapp/webapp}
2016-09-12 17:57:46.841 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.h.ContextHandler context=/solr||/xxx-collection/update @ o.e.j.w.WebAppContext@2ac273d3{/solr,file:///Users/yury/Library/Solr/solr-6.2.0/server/solr-webapp/webapp/,AVAILABLE}{/Users/yury/Library/Solr/solr-6.2.0/server/solr-webapp/webapp}
2016-09-12 17:57:46.841 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.session sessionManager=org.eclipse.jetty.server.session.HashSessionManager@33723e30
2016-09-12 17:57:46.841 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.session session=null
2016-09-12 17:57:46.841 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.ServletHandler servlet /solr|/xxx-collection/update|null -> default@5c13d641==org.eclipse.jetty.servlet.DefaultServlet,0,true
2016-09-12 17:57:46.842 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.ServletHandler chain=SolrRequestFilter->default@5c13d641==org.eclipse.jetty.servlet.DefaultServlet,0,true
2016-09-12 17:57:46.842 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.ServletHandler call filter SolrRequestFilter
2016-09-12 17:57:46.842 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.commons.fileupload.servlet.ServletFileUpload)
system=false server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.842 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.commons.fileupload.FileUpload) system=false
server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.843 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.commons.fileupload.FileUploadBase) system=false
server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.844 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.commons.fileupload.FileUploadBase)==class
org.apache.commons.fileupload.FileUploadBase from=WebAppClassLoader=989938643@3b0143d3 tried_parent=false
2016-09-12 17:57:46.844 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.commons.fileupload.FileUpload)==class org.apache.commons.fileupload.FileUpload
from=WebAppClassLoader=989938643@3b0143d3 tried_parent=false
2016-09-12 17:57:46.845 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.commons.fileupload.servlet.ServletFileUpload)==class
org.apache.commons.fileupload.servlet.ServletFileUpload from=WebAppClassLoader=989938643@3b0143d3
tried_parent=false
2016-09-12 17:57:46.845 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.commons.fileupload.FileItemHeaders) system=false
server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.845 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.commons.fileupload.FileItemHeaders)==interface
org.apache.commons.fileupload.FileItemHeaders from=WebAppClassLoader=989938643@3b0143d3 tried_parent=false
2016-09-12 17:57:46.845 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.commons.fileupload.RequestContext) system=false
server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.845 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.commons.fileupload.RequestContext)==interface
org.apache.commons.fileupload.RequestContext from=WebAppClassLoader=989938643@3b0143d3 tried_parent=false
2016-09-12 17:57:46.845 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.commons.fileupload.FileUploadBase$FileUploadIOException)
system=false server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.846 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.commons.fileupload.FileUploadBase$FileUploadIOException)==class
org.apache.commons.fileupload.FileUploadBase$FileUploadIOException from=WebAppClassLoader=989938643@3b0143d3
tried_parent=false
2016-09-12 17:57:46.846 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.commons.fileupload.FileUploadException) system=false
server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.846 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.commons.fileupload.FileUploadException)==class
org.apache.commons.fileupload.FileUploadException from=WebAppClassLoader=989938643@3b0143d3
tried_parent=false
2016-09-12 17:57:46.846 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.commons.fileupload.FileUploadBase$IOFileUploadException)
system=false server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.846 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.commons.fileupload.FileUploadBase$IOFileUploadException)==class
org.apache.commons.fileupload.FileUploadBase$IOFileUploadException from=WebAppClassLoader=989938643@3b0143d3
tried_parent=false
2016-09-12 17:57:46.846 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.commons.fileupload.FileItemIterator) system=false
server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.846 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.commons.fileupload.FileItemIterator)==interface
org.apache.commons.fileupload.FileItemIterator from=WebAppClassLoader=989938643@3b0143d3 tried_parent=false
2016-09-12 17:57:46.847 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.commons.fileupload.servlet.ServletRequestContext)
system=false server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.847 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.commons.fileupload.UploadContext) system=false
server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.847 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.commons.fileupload.UploadContext)==interface
org.apache.commons.fileupload.UploadContext from=WebAppClassLoader=989938643@3b0143d3 tried_parent=false
2016-09-12 17:57:46.847 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.commons.fileupload.servlet.ServletRequestContext)==class
org.apache.commons.fileupload.servlet.ServletRequestContext from=WebAppClassLoader=989938643@3b0143d3
tried_parent=false
2016-09-12 17:57:46.848 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.solr.servlet.SolrRequestParsers$HttpRequestContentStream)
system=false server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.848 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.solr.servlet.SolrRequestParsers$HttpRequestContentStream)==class
org.apache.solr.servlet.SolrRequestParsers$HttpRequestContentStream from=WebAppClassLoader=989938643@3b0143d3
tried_parent=false
2016-09-12 17:57:46.848 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.a.s.c.S.Request [xxx-collection]  webapp=/solr path=/update params={wt=javabin&version=2}
2016-09-12 17:57:46.849 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.solr.handler.loader.JavabinLoader$1) system=false
server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.849 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.solr.handler.loader.JavabinLoader$1)==class
org.apache.solr.handler.loader.JavabinLoader$1 from=WebAppClassLoader=989938643@3b0143d3 tried_parent=false
2016-09-12 17:57:46.849 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec)
system=false server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.850 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec)==class
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec from=WebAppClassLoader=989938643@3b0143d3
tried_parent=false
2016-09-12 17:57:46.850 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1)
system=false server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.850 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1)==class
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1 from=WebAppClassLoader=989938643@3b0143d3
tried_parent=false
2016-09-12 17:57:46.851 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.HttpConnection HttpConnection@49800692[SelectChannelEndPoint@1af89b5d{/10.100.210.241:51788<->8983,Open,in,out,-,-,11/50000,HttpConnection}{io=0/0,kio=0,kro=1}][p=HttpParser{s=CHUNKED_CONTENT,0
of -1},g=HttpGenerator@177c5e8c{s=START},c=HttpChannelOverHttp@1313573b{r=7,c=false,a=DISPATCHED,uri=//10.100.210.241:8983/solr/xxx-collection/update?wt=javabin&version=2}]
parse HeapByteBuffer@55e4fe05[p=276,l=737,c=8192,r=461]={POST /solr/xxx-c...2VsbDEwMjQh\r\n\r\n<<<1c1\r\n\x02\xC3\xE0&params\xC0\xE0...\x00\x00\x00\x00\x00\x00\x00\x0f\r\n0\r\n\r\n>>>\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}
{}
2016-09-12 17:57:46.851 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.h.HttpParser parseNext s=CHUNKED_CONTENT HeapByteBuffer@55e4fe05[p=276,l=737,c=8192,r=461]={POST
/solr/xxx-c...2VsbDEwMjQh\r\n\r\n<<<1c1\r\n\x02\xC3\xE0&params\xC0\xE0...\x00\x00\x00\x00\x00\x00\x00\x0f\r\n0\r\n\r\n>>>\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}
2016-09-12 17:57:46.851 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.h.HttpParser CHUNKED_CONTENT --> CHUNK_SIZE
2016-09-12 17:57:46.851 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.h.HttpParser CHUNK_SIZE --> CHUNK
2016-09-12 17:57:46.851 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.HttpChannel HttpChannelOverHttp@1313573b{r=7,c=false,a=DISPATCHED,uri=//10.100.210.241:8983/solr/xxx-collection/update?wt=javabin&version=2}
content Content@52737de8{HeapByteBufferR@19f96491[p=281,l=730,c=8192,r=449]={POST /solr/xxx-c...EwMjQh\r\n\r\n1c1\r\n<<<\x02\xC3\xE0&params\xC0\xE0&delB...Name\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f>>>\r\n0\r\n\r\n\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}}
2016-09-12 17:57:46.851 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.HttpInput HttpInputOverHTTP@3c06f5d6[c=0,s=STREAM] addContent Content@52737de8{HeapByteBufferR@19f96491[p=281,l=730,c=8192,r=449]={POST
/solr/xxx-c...EwMjQh\r\n\r\n1c1\r\n<<<\x02\xC3\xE0&params\xC0\xE0&delB...Name\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f>>>\r\n0\r\n\r\n\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}}
2016-09-12 17:57:46.851 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.h.HttpParser CHUNK --> CHUNKED_CONTENT
2016-09-12 17:57:46.851 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.h.HttpParser CHUNKED_CONTENT --> CHUNK_SIZE
2016-09-12 17:57:46.851 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.h.HttpParser CHUNK_SIZE --> CHUNK_END
2016-09-12 17:57:46.851 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.h.HttpParser CHUNK_END --> END
2016-09-12 17:57:46.851 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.HttpChannel HttpChannelOverHttp@1313573b{r=7,c=false,a=DISPATCHED,uri=//10.100.210.241:8983/solr/xxx-collection/update?wt=javabin&version=2}
onRequestComplete
2016-09-12 17:57:46.851 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.HttpInput HttpInputOverHTTP@3c06f5d6[c=0,s=STREAM] addContent EOF
2016-09-12 17:57:46.852 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.HttpConnection HttpConnection@49800692[SelectChannelEndPoint@1af89b5d{/10.100.210.241:51788<->8983,Open,in,out,-,-,12/50000,HttpConnection}{io=0/0,kio=0,kro=1}][p=HttpParser{s=END,449
of -1},g=HttpGenerator@177c5e8c{s=START},c=HttpChannelOverHttp@1313573b{r=7,c=false,a=DISPATCHED,uri=//10.100.210.241:8983/solr/xxx-collection/update?wt=javabin&version=2}]
parsed false HttpParser{s=END,449 of -1}
2016-09-12 17:57:46.852 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.HttpInput HttpInputOverHTTP@3c06f5d6[c=0,s=STREAM] read 8192 from Content@52737de8{HeapByteBufferR@19f96491[p=281,l=730,c=8192,r=449]={POST
/solr/xxx-c...EwMjQh\r\n\r\n1c1\r\n<<<\x02\xC3\xE0&params\xC0\xE0&delB...Name\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f>>>\r\n0\r\n\r\n\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}}
2016-09-12 17:57:46.852 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.HttpConnection releaseRequestBuffer HttpConnection@49800692[SelectChannelEndPoint@1af89b5d{/10.100.210.241:51788<->8983,Open,in,out,-,-,12/50000,HttpConnection}{io=0/0,kio=0,kro=1}][p=HttpParser{s=END,449
of -1},g=HttpGenerator@177c5e8c{s=START},c=HttpChannelOverHttp@1313573b{r=7,c=false,a=DISPATCHED,uri=//10.100.210.241:8983/solr/xxx-collection/update?wt=javabin&version=2}]
2016-09-12 17:57:46.852 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.s.HttpInput HttpInputOverHTTP@3c06f5d6[c=449,s=STREAM] consumed Content@52737de8{HeapByteBufferR@19f96491[p=730,l=730,c=8192,r=0]={POST
/solr/xxx-c...Name\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f<<<>>>\r\n0\r\n\r\n\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}}
2016-09-12 17:57:46.852 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.solr.common.SolrInputField) system=false server=false
cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.852 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.solr.common.SolrInputField)==class org.apache.solr.common.SolrInputField
from=WebAppClassLoader=989938643@3b0143d3 tried_parent=false
2016-09-12 17:57:46.853 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.solr.common.util.JavaBinCodec$1) system=false
server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.853 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.solr.common.util.JavaBinCodec$1)==class org.apache.solr.common.util.JavaBinCodec$1
from=WebAppClassLoader=989938643@3b0143d3 tried_parent=false
2016-09-12 17:57:46.854 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadClass(org.apache.solr.common.SolrException$ErrorCode) system=false
server=false cl=WebAppClassLoader=989938643@3b0143d3
2016-09-12 17:57:46.854 DEBUG (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.e.j.w.WebAppClassLoader loadedClass(org.apache.solr.common.SolrException$ErrorCode)==class
org.apache.solr.common.SolrException$ErrorCode from=WebAppClassLoader=989938643@3b0143d3 tried_parent=false
2016-09-12 17:57:46.856 ERROR (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: Document is missing mandatory
uniqueKey field: id
    at org.apache.solr.update.AddUpdateCommand.getHashableId(AddUpdateCommand.java:146)
    at org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:679)
    at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:48)
    at org.apache.solr.update.processor.AbstractDefaultValueUpdateProcessorFactory$DefaultValueUpdateProcessor.processAdd(AbstractDefaultValueUpdateProcessorFactory.java:91)
    at org.apache.solr.handler.loader.JavabinLoader$1.update(JavabinLoader.java:97)
    at org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readOuterMostDocIterator(JavaBinUpdateRequestCodec.java:179)
    at org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readIterator(JavaBinUpdateRequestCodec.java:135)
    at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:274)
    at org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readNamedList(JavaBinUpdateRequestCodec.java:121)
    at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:239)
    at org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:157)
    at org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec.unmarshal(JavaBinUpdateRequestCodec.java:186)
    at org.apache.solr.handler.loader.JavabinLoader.parseAndLoadDocs(JavabinLoader.java:107)
    at org.apache.solr.handler.loader.JavabinLoader.load(JavabinLoader.java:54)
    at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:97)
    at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:68)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:154)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:2089)
    at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:652)
    at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:459)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
    at org.eclipse.jetty.server.Server.handle(Server.java:518)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
    at java.lang.Thread.run(Thread.java:745)

2016-09-12 17:57:46.856 INFO  (qtp1989972246-80) [c:xxx-collection s:shard1 r:core_node4 x:xxx-collection]
o.a.s.c.S.Request [xxx-collection]  webapp=/solr path=/update params={wt=javabin&version=2}
status=400 QTime=14{code}

> uniqueKey generation fails if content POSTed as "application/javabin".
> ----------------------------------------------------------------------
>
>                 Key: SOLR-9493
>                 URL: https://issues.apache.org/jira/browse/SOLR-9493
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Yury Kartsev
>         Attachments: 200.png, 400.png, Screen Shot 2016-09-11 at 16.29.50 .png
>
>
> I have faced a weird issue when the same application code (using SolrJ) fails indexing
a document without a unique key (should be auto-generated by SOLR) in SolrCloud and succeeds
indexing it in standalone SOLR instance (or even in cloud mode, but from web interface of
one of the replicas). Difference is obviously only between clients (CloudSolrClient vs HttpSolrClient)
and SOLR URLs (Zokeeper hostname+port vs standalone SOLR instance hostname and port). Failure
is seen as "org.apache.solr.client.solrj.SolrServerException: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:
Document is missing mandatory uniqueKey field: id".
> I am using SOLR 5.1. In cloud mode I have 1 shard and 3 replicas.
> After lot of debugging and investigation (see below as well as my [StackOverflow post|http://stackoverflow.com/questions/39401792/uniquekey-generation-does-not-work-in-solrcloud-but-works-if-standalone])
I came to a conclusion that the difference in failing and succeeding calls is simply content
type of the POSTing requests. Local proxy clearly shows that the request fails if content
is sent as "application/javabin" (see attached screenshot with sensitive data removed) and
succeeds if content sent as "application/xml; charset=UTF-8"  (see attached screenshot with
sensitive data removed).
> Would you be able to please assist?
> Thank you very much in advance!
> ------------------------
> Copying whole description and investigation here as well:
> ------------------------
> [Documentation|https://cwiki.apache.org/confluence/display/solr/Other+Schema+Elements]
states:{quote}Schema defaults and copyFields cannot be used to populate the uniqueKey field.
You can use UUIDUpdateProcessorFactory to have uniqueKey values generated automatically.{quote}
> Therefore I have added my uniqueKey field to the schema:{code}<fieldType name="uuid"
class="solr.UUIDField" indexed="true" />
> ...
> <field name="id" type="uuid" indexed="true" stored="true" required="true" />
> ...
> <uniqueKey>id</uniqueKey>{code}Then I have added updateRequestProcessorChain
to my solrconfig:{code}<updateRequestProcessorChain name="uuid">
>     <processor class="solr.UUIDUpdateProcessorFactory">
>         <str name="fieldName">id</str>
>     </processor>
>     <processor class="solr.RunUpdateProcessorFactory" />
> </updateRequestProcessorChain>{code}And made it the default for the UpdateRequestHandler:{code}<initParams
path="/update/**">
>  <lst name="defaults">
>   <str name="update.chain">uuid</str>
>  </lst>
> </initParams>{code}
> Adding new documents with null/absent id works fine as from web-interface of one of the
replicas, as when using SOLR in standalone mode (non-cloud) from my application. Although
when only I'm using SolrCloud and add document from my application (using CloudSolrClient
from SolrJ) it fails with "org.apache.solr.client.solrj.SolrServerException: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:
Document is missing mandatory uniqueKey field: id"
> All other operations like ping or search for documents work fine in either mode (standalone
or cloud).
> INVESTIGATION (i.e. more details):
> In standalone mode obviously update request is:{code}POST standalone_host:port/solr/collection_name/update?wt=json{code}
> In SOLR cloud mode, when adding document from one replica's web interface, update request
is (found through inspecting the call made by web interface): {code}POST replica_host:port/solr/collection_name_shard1_replica_1/update?wt=json{code}
> In both these cases payload is something like:{code}{
>     "add": {
>         "doc": {
>                  .....
>         },
>         "boost": 1.0,
>         "overwrite": true,
>         "commitWithin": 1000
>     }
> }{code}
> In case when CloudSolrClient is used, the following happens (found through debugging):
> Using ZK and some logic, URL list of replicas is constructed that looks like this:{code}[http://replica_1_host:port/solr/collection_name/,
>  http://replica_2_host:port/solr/collection_name/,
>  http://replica_3_host:port/solr/collection_name/]{code}
> This code is called:{code}LBHttpSolrClient.Req req = new LBHttpSolrClient.Req(request,
theUrlList);
> LBHttpSolrClient.Rsp rsp = lbClient.request(req);
> return rsp.getResponse();{code}
> Where the second line fails with the exception.
> If to debug the second line further, it ends up calling HttpClient.execute (from HttpSolrClient.executeMethod)
for:{code}POST http://replica_1_host:port/solr/collection_name/update?wt=javabin&version=2
HTTP/1.1
> POST http://replica_2_host:port/solr/collection_name/update?wt=javabin&version=2
HTTP/1.1
> POST http://replica_3_host:port/solr/collection_name/update?wt=javabin&version=2
HTTP/1.1{code}
> And the very first request returns 400 Bad Request with replica 1 logging "Document is
missing mandatory uniqueKey field: id" in the logs.
> The funny thing is that when I execute the same request using POSTMAN (but with JSON
instead of binary payload), it works! Am I doing something wrong here? I assume it's definitely
something in the way of how the request is made...
> UPDATE:
> I have used local proxy in order to see the difference in these 2 requests sent by my
application in order to understand what is different there. Looks like the only difference
is content type. In case of cloud mode the payload for POSTing document is sent as "application/javabin"
while in standalone mode it's sent as "application/xml; charset=UTF-8". Everything else is
the same. First request results in 400 while second is 200.



--
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


Mime
View raw message