Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7F55E19E88 for ; Tue, 12 Apr 2016 14:46:10 +0000 (UTC) Received: (qmail 9047 invoked by uid 500); 12 Apr 2016 14:46:06 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 8988 invoked by uid 500); 12 Apr 2016 14:46:06 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 8976 invoked by uid 99); 12 Apr 2016 14:46:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2016 14:46:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 581C71A0577 for ; Tue, 12 Apr 2016 14:46:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=opensourceconnections.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 4tV0mH0JunND for ; Tue, 12 Apr 2016 14:46:03 +0000 (UTC) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id A288B5F1E9 for ; Tue, 12 Apr 2016 14:46:02 +0000 (UTC) Received: by mail-io0-f174.google.com with SMTP id g185so30962945ioa.2 for ; Tue, 12 Apr 2016 07:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=opensourceconnections.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=T73+G0KUzJ2g90v5V49kZ0AoWljVmoaIaUlJ1KdqSxA=; b=Il5Rkn5m7D1kf65aarECYV0poVd4XyJRbWN/HCHYrFS7KVCTTvG5/956pIVMXUDCe7 4hv/3uJsEhn/8bFnNTJ26snfB1pCYCdmG/A+txc4Wzs2w/PixUsxkn3+l8cLv34e9QNW bAZBHsbhAVP0fByhoXDfEZfyjxUfcResPJ/AU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=T73+G0KUzJ2g90v5V49kZ0AoWljVmoaIaUlJ1KdqSxA=; b=UoC37L57HTFegJzcPejXX0fNwcq/uZHiCR6niVEqWZITcvO/ObSqBeu0o3lBPYpNo2 tJmEiKwyp7PNHhU2nxoNyzWgVJdEeLwMTO5hLlQI0ZpBtoEHW+PK4OfvVdfyIWYDOsQ3 9sYkeUNL/oeM6xuZ4Naa7SM9kF33LZPc+oeP42CGCZeFG1nD0IpDQCSc7224qRN7G4hd Kn4P+8r8pzGDxn13pt0KTPTj/zP3Whlx1UjT2WHJ0U+0FErJAqLir4Wv5VzulkGgsJ1w f5AWCLpYtzjRTYvfYcXJrWi6VnYnlfJoesSkfgZwtTwYTO/0s4auZAIGLY6rWc0/PMgX AzfA== X-Gm-Message-State: AOPr4FVGrb9VhSULHWh/Nr/LES/+6C2dpYXXItbRIxX4V9ZIwJZZvcKqL6+hG4I7Xm+YFC42ZPRcSYvYcZia2w== MIME-Version: 1.0 X-Received: by 10.107.158.134 with SMTP id h128mr4394126ioe.153.1460472355976; Tue, 12 Apr 2016 07:45:55 -0700 (PDT) Received: by 10.79.131.3 with HTTP; Tue, 12 Apr 2016 07:45:55 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 Apr 2016 10:45:55 -0400 Message-ID: Subject: Re: Solr 6 - AbstractSolrTestCase Error Unable to build KeyStore from file: null From: Joe Lawson To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001a1141b23efb90b305304ab7fc --001a1141b23efb90b305304ab7fc Content-Type: text/plain; charset=UTF-8 Adding @SolrTestCaseJ4.SuppressSSL to my abstract class extended the AbstractSolrTestCase worked. Thanks! https://github.com/healthonnet/hon-lucene-synonyms/blob/cedb3cbb56b01cd6480c257c04999cdce433f53e/src/test/java/org/apache/solr/search/HonLuceneSynonymTestCase.java#L21-L21 On Mon, Apr 11, 2016 at 8:45 PM, Chris Hostetter wrote: > > https://issues.apache.org/jira/browse/SOLR-8970 > https://issues.apache.org/jira/browse/SOLR-8971 > > : Date: Mon, 11 Apr 2016 20:35:22 -0400 > : From: Joe Lawson > : Reply-To: solr-user@lucene.apache.org > : To: solr-user@lucene.apache.org > : Subject: Re: Solr 6 - AbstractSolrTestCase Error Unable to build > KeyStore from > : file: null > : > : Thanks for the insight. I figured that it was something like that and > : perhaps I has thread contention on a resource that wasn't really thread > : safe. > : > : I'll give your suggestions a shot tomorrow. > : > : Regards, > : > : Joe Lawson > : On Apr 11, 2016 8:24 PM, "Chris Hostetter" > wrote: > : > : > > : > : I'm upgrading a plugin and use the AbstractSolrTestCase for tests. My > : > tests > : > : work fine in 5.X but when I upgraded to 6.X the tests sometimes > throw an > : > : error during initialization. Basically it says, > : > : "org.apache.solr.common.SolrException: Error instantiating > : > : shardHandlerFactory class > : > : [org.apache.solr.handler.component.HttpShardHandlerFactory]: Unable > to > : > : build KeyStore from file: null" > : > > : > Ugh. and of course there are no other details to troubleshoot that > : > because the stupid error handling doesn't wrap the original exception > -- > : > it just throws it away. > : > > : > I'm pretty sure the problem you are seeing (unfortunately manifested in > : > a really confusing way) is that SolrTestCaseJ4 (and > AbstractSolrTestCase > : > which subclasses it) has randomized the use of SSL for a while, but at > : > some point it also started randomizing the use of client auth -- but > this > : > randomization happens very infrequently. > : > > : > (for details, check out the SSLTestConfig and it's usage in > : > SolrTestCaseJ4) > : > > : > The bottom line is, in order for the (randomized) clientAuth stuff to > : > work, SolrTestCaseJ4 assumes it can find an > : > "../etc/test/solrtest.keystore" realtive to ExternalPaths.SERVER_HOME. > : > > : > If you don't have that in your test setup, bad things happen. > : > > : > I believe the quickest way for you to resolve this failure in your own > : > usage of AbstractSolrTestCase is to just add the @SupressSSL > annotation to > : > your tests -- assuming you don't care about randomly testing your > plugin > : > with SSL authentication (for 99.999% of solr plugins, wether solr is > being > : > used over http or https shouldn't matter for test purposes) > : > > : > If you do want to include randomized SSL testing, then you need to make > : > sure your that when/how you run your tests, ExternalPaths.SERVER_HOME > : > resolves to the correct place, and "../etc/test/solrtest.keystore" > : > resolves to a real file solr can use as the keystore. > : > > : > I'll file some Jiras to try and improve the error handline in these > : > situations. > : > > : > > : > > : > -Hoss > : > http://www.lucidworks.com/ > : > > : > > -Hoss > http://www.lucidworks.com/ > --001a1141b23efb90b305304ab7fc--