You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Shawn Heisey (Jira)" <ji...@apache.org> on 2023/04/02 21:15:00 UTC
[jira] [Comment Edited] (SOLR-16733) Solr fails to start on macOS with OpenJDK 20
[ https://issues.apache.org/jira/browse/SOLR-16733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17707720#comment-17707720 ]
Shawn Heisey edited comment on SOLR-16733 at 4/2/23 9:14 PM:
-------------------------------------------------------------
Installed Oracle JDK 20 onto Ubuntu 20.04 Server using Oracle's x64 .deb package. And noted that it depends on 32-bit libc, which is annoying.
Downloaded and extracted Solr 9.2.0.
Started Solr with SOLR_JAVA_HOME set to the jdk 20 installed path. It started without any problem.
{code:none}
elyograg@bilbo:~/solr-9.2.0$ SOLR_JAVA_HOME=/usr/lib/jvm/jdk-20 bin/solr start
elyograg@bilbo:~/solr-9.2.0$ ps auxw | grep solr
elyograg 51062 73.7 8.3 3114464 673204 pts/0 Sl 15:03 0:13 /usr/lib/jvm/jdk-20/bin/java -server -Xms512m -Xmx512m -XX:+UseG1GC -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=250 -XX:+UseLargePages -XX:+AlwaysPreTouch -XX:+ExplicitGCInvokesConcurrent -Xlog:gc*:file=/home/elyograg/solr-9.2.0/server/logs/solr_gc.log:time,uptime:filecount=9,filesize=20M -Dsolr.jetty.inetaccess.includes= -Dsolr.jetty.inetaccess.excludes= -Dsolr.log.dir=/home/elyograg/solr-9.2.0/server/logs -Djetty.port=8983 -DSTOP.PORT=7983 -DSTOP.KEY=solrrocks -Dhost=localhost -Duser.timezone=UTC -XX:-OmitStackTraceInFastThrow -XX:+CrashOnOutOfMemoryError -XX:ErrorFile=/home/elyograg/solr-9.2.0/server/logs/jvm_crash_%p.log -Djetty.home=/home/elyograg/solr-9.2.0/server -Dsolr.solr.home=/home/elyograg/solr-9.2.0/server/solr -Dsolr.install.dir=/home/elyograg/solr-9.2.0 -Dsolr.install.symDir=/home/elyograg/solr-9.2.0 -Dsolr.default.confdir=/home/elyograg/solr-9.2.0/server/solr/configsets/_default/conf -Xss256k -XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put -Djava.security.manager -Djava.security.policy=/home/elyograg/solr-9.2.0/server/etc/security.policy -Djava.security.properties=/home/elyograg/solr-9.2.0/server/etc/security.properties -Dsolr.internal.network.permission=* -DdisableAdminUI=false -Dsolr.log.muteconsole -jar start.jar --module=http --module=requestlog --module=gzip
elyograg 51146 0.0 0.0 6308 660 pts/0 S+ 15:04 0:00 grep --color=auto solr
*** [WARN] *** Your open file limit is currently 1024.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
*** [WARN] *** Your Max Processes Limit is currently 31129.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
Java 20 detected. Enabled workaround for SOLR-16463
Warning: Available entropy is low. As a result, use of the UUIDField, SSL, or any other features that require
RNG might not work properly. To check for the amount of available entropy, use 'cat /proc/sys/kernel/random/entropy_avail'.
Waiting up to 180 seconds to see Solr running on port 8983 [\]
Started Solr server on port 8983 (pid=51062). Happy searching!
{code}
{code:none}
elyograg@bilbo:~/solr-9.2.0$ ps auxw | grep solr
elyograg 51062 73.7 8.3 3114464 673204 pts/0 Sl 15:03 0:13 /usr/lib/jvm/jdk-20/bin/java -server -Xms512m -Xmx512m -XX:+UseG1GC -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=250 -XX:+UseLargePages -XX:+AlwaysPreTouch -XX:+ExplicitGCInvokesConcurrent -Xlog:gc*:file=/home/elyograg/solr-9.2.0/server/logs/solr_gc.log:time,uptime:filecount=9,filesize=20M -Dsolr.jetty.inetaccess.includes= -Dsolr.jetty.inetaccess.excludes= -Dsolr.log.dir=/home/elyograg/solr-9.2.0/server/logs -Djetty.port=8983 -DSTOP.PORT=7983 -DSTOP.KEY=solrrocks -Dhost=localhost -Duser.timezone=UTC -XX:-OmitStackTraceInFastThrow -XX:+CrashOnOutOfMemoryError -XX:ErrorFile=/home/elyograg/solr-9.2.0/server/logs/jvm_crash_%p.log -Djetty.home=/home/elyograg/solr-9.2.0/server -Dsolr.solr.home=/home/elyograg/solr-9.2.0/server/solr -Dsolr.install.dir=/home/elyograg/solr-9.2.0 -Dsolr.install.symDir=/home/elyograg/solr-9.2.0 -Dsolr.default.confdir=/home/elyograg/solr-9.2.0/server/solr/configsets/_default/conf -Xss256k -XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put -Djava.security.manager -Djava.security.policy=/home/elyograg/solr-9.2.0/server/etc/security.policy -Djava.security.properties=/home/elyograg/solr-9.2.0/server/etc/security.properties -Dsolr.internal.network.permission=* -DdisableAdminUI=false -Dsolr.log.muteconsole -jar start.jar --module=http --module=requestlog --module=gzip
elyograg 51146 0.0 0.0 6308 660 pts/0 S+ 15:04 0:00 grep --color=auto solr
{code}
Note that you should NOT run Solr as root, which is the only reason you would need the -f flag.
I don't have a Mac available to test on.
was (Author: elyograg):
Installed Oracle JDK 20 onto Ubuntu 20.04 Server using Oracle's x64 .deb package. And noted that it depends on 32-bit libc, which is annoying.
Downloaded and extracted Solr 9.2.0.
Started Solr with SOLR_JAVA_HOME set to the jdk 20 installed path. It started without any problem.
{code:none}
elyograg@bilbo:~/solr-9.2.0$ SOLR_JAVA_HOME=/usr/lib/jvm/jdk-20 bin/solr start
*** [WARN] *** Your open file limit is currently 1024.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
*** [WARN] *** Your Max Processes Limit is currently 31129.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
Java 20 detected. Enabled workaround for SOLR-16463
Warning: Available entropy is low. As a result, use of the UUIDField, SSL, or any other features that require
RNG might not work properly. To check for the amount of available entropy, use 'cat /proc/sys/kernel/random/entropy_avail'.Waiting up to 180 seconds to see Solr running on port 8983 [\]
Started Solr server on port 8983 (pid=51062). Happy searching!{code}
{code:none}
elyograg@bilbo:~/solr-9.2.0$ ps auxw | grep solr
elyograg 51062 73.7 8.3 3114464 673204 pts/0 Sl 15:03 0:13 /usr/lib/jvm/jdk-20/bin/java -server -Xms512m -Xmx512m -XX:+UseG1GC -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=250 -XX:+UseLargePages -XX:+AlwaysPreTouch -XX:+ExplicitGCInvokesConcurrent -Xlog:gc*:file=/home/elyograg/solr-9.2.0/server/logs/solr_gc.log:time,uptime:filecount=9,filesize=20M -Dsolr.jetty.inetaccess.includes= -Dsolr.jetty.inetaccess.excludes= -Dsolr.log.dir=/home/elyograg/solr-9.2.0/server/logs -Djetty.port=8983 -DSTOP.PORT=7983 -DSTOP.KEY=solrrocks -Dhost=localhost -Duser.timezone=UTC -XX:-OmitStackTraceInFastThrow -XX:+CrashOnOutOfMemoryError -XX:ErrorFile=/home/elyograg/solr-9.2.0/server/logs/jvm_crash_%p.log -Djetty.home=/home/elyograg/solr-9.2.0/server -Dsolr.solr.home=/home/elyograg/solr-9.2.0/server/solr -Dsolr.install.dir=/home/elyograg/solr-9.2.0 -Dsolr.install.symDir=/home/elyograg/solr-9.2.0 -Dsolr.default.confdir=/home/elyograg/solr-9.2.0/server/solr/configsets/_default/conf -Xss256k -XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put -Djava.security.manager -Djava.security.policy=/home/elyograg/solr-9.2.0/server/etc/security.policy -Djava.security.properties=/home/elyograg/solr-9.2.0/server/etc/security.properties -Dsolr.internal.network.permission=* -DdisableAdminUI=false -Dsolr.log.muteconsole -jar start.jar --module=http --module=requestlog --module=gzip
elyograg 51146 0.0 0.0 6308 660 pts/0 S+ 15:04 0:00 grep --color=auto solr
{code}
Note that you should NOT run Solr as root, which is the only reason you would need the -f flag.
I don't have a Mac available to test on.
> Solr fails to start on macOS with OpenJDK 20
> --------------------------------------------
>
> Key: SOLR-16733
> URL: https://issues.apache.org/jira/browse/SOLR-16733
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: cli
> Affects Versions: 9.2
> Environment: OS: macOS 13 (Ventura), on x86_64
> (Note: this issue occurred on all combinations of macOS \{11, 12, 13} and \{x86_64, arm64})
> Java:
>
> {code:java}
> $ java -version
> openjdk version "20" 2023-03-21
> OpenJDK Runtime Environment (build 20+36-2344)
> OpenJDK 64-Bit Server VM (build 20+36-2344, mixed mode, sharing) {code}
>
>
> Reporter: Ruoyu Zhong
> Priority: Minor
> Attachments: solr.log
>
>
> Solr failed to start on macOS (versions: 11, 12, 13; archs: x86_64, arm64) with OpenJDK 20. The following error was observed:
>
> {code:java}
> $ solr-9.2.0/bin/solr start -f
> *** [WARN] *** Your open file limit is currently 256.
> It should be set to 65000 to avoid operational disruption.
> If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
> *** [WARN] *** Your Max Processes Limit is currently 1392.
> It should be set to 65000 to avoid operational disruption.
> If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
> Java 20 detected. Enabled workaround for SOLR-16463
> OpenJDK 64-Bit Server VM warning: -XX:+UseLargePages not supported in this VM
> CompileCommand: exclude com/github/benmanes/caffeine/cache/BoundedLocalCache.put bool exclude = true
> WARNING: A command line option has enabled the Security Manager
> WARNING: The Security Manager is deprecated and will be removed in a future release
> 2023-04-02 16:19:52.700 WARN (main) [] o.e.j.x.XmlConfiguration Unable to execute XmlConfiguration => java.security.AccessControlException: access denied ("java.io.FilePermission" "/" "read")
> at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:488)
> java.security.AccessControlException: access denied ("java.io.FilePermission" "/" "read")
> at java.security.AccessControlContext.checkPermission(AccessControlContext.java:488) ~[?:?]
> at java.security.AccessController.checkPermission(AccessController.java:1071) ~[?:?]
> at java.lang.SecurityManager.checkPermission(SecurityManager.java:411) ~[?:?]
> at java.lang.SecurityManager.checkRead(SecurityManager.java:742) ~[?:?]
> at sun.nio.fs.UnixPath.checkRead(UnixPath.java:788) ~[?:?]
> at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:448) ~[?:?]
> at sun.nio.fs.UnixPath.toRealPath(UnixPath.java:912) ~[?:?]
> at org.eclipse.jetty.util.resource.PathResource.<init>(PathResource.java:226) ~[jetty-util-10.0.13.jar:10.0.13]
> at org.eclipse.jetty.util.resource.Resource.newResource(Resource.java:204) ~[jetty-util-10.0.13.jar:10.0.13]
> at org.eclipse.jetty.util.resource.Resource.newResource(Resource.java:178) ~[jetty-util-10.0.13.jar:10.0.13]
> at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$4(XmlConfiguration.java:1835) ~[jetty-xml-10.0.13.jar:10.0.13]
> at java.security.AccessController.doPrivileged(AccessController.java:571) ~[?:?]
> at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1818) ~[jetty-xml-10.0.13.jar:10.0.13]
> at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
> at java.lang.reflect.Method.invoke(Method.java:578) ~[?:?]
> at org.eclipse.jetty.start.Main.invokeMain(Main.java:229) ~[start.jar:10.0.13]
> at org.eclipse.jetty.start.Main.start(Main.java:527) ~[start.jar:10.0.13]
> at org.eclipse.jetty.start.Main.main(Main.java:76) ~[start.jar:10.0.13]
> java.lang.reflect.InvocationTargetException
> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
> at java.base/java.lang.reflect.Method.invoke(Method.java:578)
> at org.eclipse.jetty.start.Main.invokeMain(Main.java:229)
> at org.eclipse.jetty.start.Main.start(Main.java:527)
> at org.eclipse.jetty.start.Main.main(Main.java:76)
> Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/" "read")
> at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:488)
> at java.base/java.security.AccessController.checkPermission(AccessController.java:1071)
> at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:411)
> at java.base/java.lang.SecurityManager.checkRead(SecurityManager.java:742)
> at java.base/sun.nio.fs.UnixPath.checkRead(UnixPath.java:788)
> at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:448)
> at java.base/sun.nio.fs.UnixPath.toRealPath(UnixPath.java:912)
> at org.eclipse.jetty.util.resource.PathResource.<init>(PathResource.java:226)
> at org.eclipse.jetty.util.resource.Resource.newResource(Resource.java:204)
> at org.eclipse.jetty.util.resource.Resource.newResource(Resource.java:178)
> at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$4(XmlConfiguration.java:1835)
> at java.base/java.security.AccessController.doPrivileged(AccessController.java:571)
> at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1818)
> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
> ... 4 more
> java.lang.reflect.InvocationTargetException
> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
> at java.base/java.lang.reflect.Method.invoke(Method.java:578)
> at org.eclipse.jetty.start.Main.invokeMain(Main.java:229)
> at org.eclipse.jetty.start.Main.start(Main.java:527)
> at org.eclipse.jetty.start.Main.main(Main.java:76)
> Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/" "read")
> at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:488)
> at java.base/java.security.AccessController.checkPermission(AccessController.java:1071)
> at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:411)
> at java.base/java.lang.SecurityManager.checkRead(SecurityManager.java:742)
> at java.base/sun.nio.fs.UnixPath.checkRead(UnixPath.java:788)
> at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:448)
> at java.base/sun.nio.fs.UnixPath.toRealPath(UnixPath.java:912)
> at org.eclipse.jetty.util.resource.PathResource.<init>(PathResource.java:226)
> at org.eclipse.jetty.util.resource.Resource.newResource(Resource.java:204)
> at org.eclipse.jetty.util.resource.Resource.newResource(Resource.java:178)
> at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$4(XmlConfiguration.java:1835)
> at java.base/java.security.AccessController.doPrivileged(AccessController.java:571)
> at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1818)
> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
> ... 4 moreUsage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs]
> java -jar $JETTY_HOME/start.jar --help # for more information {code}
>
> Note: the warnings on open file limit and max processes limit do not seem related; the error still remains after {{ulimit -n 65000}} and {{{}ulimit -u 2088{}}}. {{ulimit -u 2088}} is macOS's hard limit.
> I have attached a full output log ({{{}solr.log{}}}) with {{_JAVA_OPTIONS}} set to {{{}-Djava.security.debug=access,failure,policy{}}}. I was running that on x86_64 macOS 13.3 (Ventura). (Note: [https://github.com/apache/solr/commit/f7fe594cdadeadd1e0061075a55a529793e72462] was applied.)
> A minimum reproducer:
> # Download and extract pre-built OpenJDK 20 binaries from [https://jdk.java.net/20/] (macOS / AArch64 or macOS / x64).
> # Download and extract Solr 9.2 binary release from [https://www.apache.org/dyn/closer.lua/solr/solr/9.2.0/solr-9.2.0.tgz?action=download] .
> #
> {code:java}
> export PATH="$PWD/jdk-20.jdk/Contents/Home/bin:$PATH"{code}
> #
> {code:java}
> ./solr-9.2.0/bin/solr start -f{code}
> # See error.
> This failure was observed while packaging OpenJDK 20 for Homebrew at [https://github.com/Homebrew/homebrew-core/pull/126319] . At the time of testing, Solr 9.1.1 was used. So I believe this error occurred on earlier versions, too.
> Thank you! Please let me know if any additional information is needed.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org