You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Phill Campbell <si...@yahoo.com.INVALID> on 2021/04/15 16:38:28 UTC

Building on Mac OS X Catalina

Is there a guide or recommendations for building on Mac OS Catalina?

Which JDK do you use?



This is one of the errors I currently get running the tests.

   [junit4]   2> 7123 WARN  (SUITE-TestCircuitBreaker-seed#[597FF1CD7ECC0E37]-worker) [     ] o.a.s.c.CoreContainer Unable to create [.../solr/core/src/test-files/solr/userfiles].  Features requiring this directory may fail.
   [junit4]   2>           => java.security.AccessControlException: access denied ("java.io.FilePermission” “.../solr/core/src/test-files/solr/userfiles" "write")
   [junit4]   2> 	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)

Re: Building on Mac OS X Catalina

Posted by Phill Campbell <si...@yahoo.com.INVALID>.
Mike,
I think you are on to it.
I am building Solr 8.2.1 using OpenJDK 

openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-bre_2021_01_20_16_37-b00)


How is a security policy used in the ANT build? I am unfamiliar with ANT. I will gladly change something to see if it works. (I have been using Maven and Gradle).

I am willing to try any suggestions.

Thanks you.




> On Apr 15, 2021, at 3:44 PM, Mike Drob <md...@mdrob.com> wrote:
> 
> OpenJDK 11 is fine for building the main (9x) branch.
> 
> This is probably https://issues.apache.org/jira/browse/SOLR-14084 or
> https://issues.apache.org/jira/browse/SOLR-15222 and happens sometimes
> when the test randomization includes the security policy.
> 
> It's something I've been wanting to look at but keeps getting pushed
> for other priorities.
> 
> On Thu, Apr 15, 2021 at 11:39 AM Phill Campbell
> <si...@yahoo.com.invalid> wrote:
>> 
>> Is there a guide or recommendations for building on Mac OS Catalina?
>> 
>> Which JDK do you use?
>> 
>> 
>> 
>> This is one of the errors I currently get running the tests.
>> 
>>   [junit4]   2> 7123 WARN  (SUITE-TestCircuitBreaker-seed#[597FF1CD7ECC0E37]-worker) [     ] o.a.s.c.CoreContainer Unable to create [.../solr/core/src/test-files/solr/userfiles].  Features requiring this directory may fail.
>>   [junit4]   2>           => java.security.AccessControlException: access denied ("java.io.FilePermission” “.../solr/core/src/test-files/solr/userfiles" "write")
>>   [junit4]   2>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)


Re: Building on Mac OS X Catalina

Posted by Phill Campbell <si...@yahoo.com.INVALID>.
Sorry, meant to say 8.8.2 Solr.

I read those JIRA reports, and found in common-build.xml:

<property name="tests.useSecurityManager"  value="true" />


I set that to be false and the exception is gone from the output of the tests.



> On Apr 15, 2021, at 3:44 PM, Mike Drob <md...@mdrob.com> wrote:
> 
> OpenJDK 11 is fine for building the main (9x) branch.
> 
> This is probably https://issues.apache.org/jira/browse/SOLR-14084 or
> https://issues.apache.org/jira/browse/SOLR-15222 and happens sometimes
> when the test randomization includes the security policy.
> 
> It's something I've been wanting to look at but keeps getting pushed
> for other priorities.
> 
> On Thu, Apr 15, 2021 at 11:39 AM Phill Campbell
> <si...@yahoo.com.invalid> wrote:
>> 
>> Is there a guide or recommendations for building on Mac OS Catalina?
>> 
>> Which JDK do you use?
>> 
>> 
>> 
>> This is one of the errors I currently get running the tests.
>> 
>>   [junit4]   2> 7123 WARN  (SUITE-TestCircuitBreaker-seed#[597FF1CD7ECC0E37]-worker) [     ] o.a.s.c.CoreContainer Unable to create [.../solr/core/src/test-files/solr/userfiles].  Features requiring this directory may fail.
>>   [junit4]   2>           => java.security.AccessControlException: access denied ("java.io.FilePermission” “.../solr/core/src/test-files/solr/userfiles" "write")
>>   [junit4]   2>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)


Re: Building on Mac OS X Catalina

Posted by Mike Drob <md...@mdrob.com>.
OpenJDK 11 is fine for building the main (9x) branch.

This is probably https://issues.apache.org/jira/browse/SOLR-14084 or
https://issues.apache.org/jira/browse/SOLR-15222 and happens sometimes
when the test randomization includes the security policy.

It's something I've been wanting to look at but keeps getting pushed
for other priorities.

On Thu, Apr 15, 2021 at 11:39 AM Phill Campbell
<si...@yahoo.com.invalid> wrote:
>
> Is there a guide or recommendations for building on Mac OS Catalina?
>
> Which JDK do you use?
>
>
>
> This is one of the errors I currently get running the tests.
>
>    [junit4]   2> 7123 WARN  (SUITE-TestCircuitBreaker-seed#[597FF1CD7ECC0E37]-worker) [     ] o.a.s.c.CoreContainer Unable to create [.../solr/core/src/test-files/solr/userfiles].  Features requiring this directory may fail.
>    [junit4]   2>           => java.security.AccessControlException: access denied ("java.io.FilePermission” “.../solr/core/src/test-files/solr/userfiles" "write")
>    [junit4]   2>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)

Re: Building on Mac OS X Catalina

Posted by Phill Campbell <si...@yahoo.com.INVALID>.
Shawn,

Thank you for responding. I have “chmod’ed” the entire directory path for every directory.

[me ~/dev/mysolr/solr/core/src/test-files/solr]$ls -alh
total 160
drwxrwxrwx@ 28 me  COMPANY\Domain Users   896B Apr 15 10:06 .
drwxrwxrwx@ 15 me  COMPANY\Domain Users   480B Apr 15 09:37 ..
drwxr-xrwx@  3 me  COMPANY\Domain Users    96B Apr  6 15:36 analysisconfs
drwxr-xrwx@  4 me  COMPANY\Domain Users   128B Apr  6 15:36 collection1
drwxr-xrwx@ 28 me  COMPANY\Domain Users   896B Apr  6 15:36 configsets
-rw-r--rw-@  1 me  COMPANY\Domain Users   2.4K Apr  6 15:36 crazy-path-to-config.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   1.5K Apr  6 15:36 crazy-path-to-schema.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users    71B Apr  6 15:36 external_eff
drwxr-xrwx@  6 me  COMPANY\Domain Users   192B Apr  6 15:36 question-answer-repository
-rw-r--rw-@  1 me  COMPANY\Domain Users   497B Apr  6 15:36 question-answer-repository-private-key.pem
drwxr-xrwx@ 10 me  COMPANY\Domain Users   320B Apr  6 15:36 security
drwxr-xrwx@  8 me  COMPANY\Domain Users   256B Apr  6 15:36 simSnapshot
-rw-r--rw-@  1 me  COMPANY\Domain Users   2.5K Apr  6 15:36 solr-50-all.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   1.3K Apr  6 15:36 solr-graphitereporter.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   1.2K Apr  6 15:36 solr-hiddensysprops.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   2.1K Apr  6 15:36 solr-jmxreporter.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   2.8K Apr  6 15:36 solr-metricreporter.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   2.3K Apr  6 15:36 solr-metricsconfig.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   1.1K Apr  6 15:36 solr-metricsconfig1.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   1.1K Apr  6 15:36 solr-shardhandler-loadBalancerRequests.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   1.1K Apr  6 15:36 solr-shardhandler.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   1.8K Apr  6 15:36 solr-slf4jreporter.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   947B Apr  6 15:36 solr-solrDataHome.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   3.3K Apr  6 15:36 solr-solrreporter.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   1.3K Apr  6 15:36 solr-stress-new.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   2.5K Apr  6 15:36 solr-tracing.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   2.1K Apr  6 15:36 solr-trackingshardhandler.xml
-rw-r--rw-@  1 me  COMPANY\Domain Users   2.8K Apr  6 15:36 solr.xml

Another thing I have found. The test that fails with the creation of the userfiles using ANT works from Intellij IDEA.

Regards.

> On Apr 15, 2021, at 11:00 AM, Shawn Heisey <el...@elyograg.org> wrote:
> 
> On 4/15/2021 10:38 AM, Phill Campbell wrote:
>> Is there a guide or recommendations for building on Mac OS Catalina?
>> Which JDK do you use?
>> This is one of the errors I currently get running the tests.
>>    [junit4]   2> 7123 WARN  (SUITE-TestCircuitBreaker-seed#[597FF1CD7ECC0E37]-worker) [     ] o.a.s.c.CoreContainer Unable to create [.../solr/core/src/test-files/solr/userfiles].  Features requiring this directory may fail.
>>    [junit4]   2>           => java.security.AccessControlException: access denied ("java.io.FilePermission” “.../solr/core/src/test-files/solr/userfiles" "write")
>>    [junit4]   2> 	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
> 
> The relevant part of that as far as I can see is that it is unable to create the following directory, where ... is probably the root of the cloned repository or extracted source tarball:
> 
> .../solr/core/src/test-files/solr/userfiles
> 
> Probably what's happening here is that you're running the tests with a different user than the one that owns the extracted or cloned files.  So when that particular unit test tries to create a directory, it fails. It's a basic file permission problem.
> 
> This would likely happen with ANY jdk, and it's not a Mac-specific problem.
> 
> Thanks,
> Shawn


Re: Building on Mac OS X Catalina

Posted by Shawn Heisey <el...@elyograg.org>.
On 4/15/2021 10:38 AM, Phill Campbell wrote:
> Is there a guide or recommendations for building on Mac OS Catalina?
> 
> Which JDK do you use?
> 
> This is one of the errors I currently get running the tests.
> 
>     [junit4]   2> 7123 WARN  (SUITE-TestCircuitBreaker-seed#[597FF1CD7ECC0E37]-worker) [     ] o.a.s.c.CoreContainer Unable to create [.../solr/core/src/test-files/solr/userfiles].  Features requiring this directory may fail.
>     [junit4]   2>           => java.security.AccessControlException: access denied ("java.io.FilePermission” “.../solr/core/src/test-files/solr/userfiles" "write")
>     [junit4]   2> 	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)

The relevant part of that as far as I can see is that it is unable to 
create the following directory, where ... is probably the root of the 
cloned repository or extracted source tarball:

.../solr/core/src/test-files/solr/userfiles

Probably what's happening here is that you're running the tests with a 
different user than the one that owns the extracted or cloned files.  So 
when that particular unit test tries to create a directory, it fails. 
It's a basic file permission problem.

This would likely happen with ANY jdk, and it's not a Mac-specific problem.

Thanks,
Shawn