Hello,


When starting up Solr Docker Image 9.7.0 I always get the following error
when loading my core 'places': org.apache.solr.common.SolrException:
ByteBuffersDirectory can only be used with the 'single' lock factory type.
The complete log is in the appendix.



I mount the following files to /var/solr/data

- solr.xml

- places/core.properties

- places/places.csv

- places/schema.xml

- places/solrconfig.xml



In the solrconfig.xml the locktype is set to single:



    <indexConfig>

        <lockType>single</lockType>

    </indexConfig>



Does anyone have an idea how to fix this error?

<?xml version="1.0" encoding="UTF-8" ?>

<config>

    <luceneMatchVersion>9.11.1</luceneMatchVersion>

    <dataDir>${solr.data.dir:}</dataDir>

    <!-- Solr in memory -->
    <directoryFactory name="DirectoryFactory" class="solr.ByteBuffersDirectoryFactory"/>
    <indexConfig>
        <lockType>single</lockType>
    </indexConfig>

    <codecFactory class="solr.SchemaCodecFactory"/>
    <schemaFactory class="ClassicIndexSchemaFactory"/>
    <updateHandler class="solr.DirectUpdateHandler2">

        <updateLog>
            <str name="dir">${solr.ulog.dir:}</str>
            <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>
        </updateLog>

        <autoCommit>
            <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
            <openSearcher>false</openSearcher>
        </autoCommit>

        <autoSoftCommit>
            <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
        </autoSoftCommit>

    </updateHandler>

    <query>

        <maxBooleanClauses>1024</maxBooleanClauses>

        <filterCache class="solr.FastLRUCache"
                     size="512"
                     initialSize="512"
                     autowarmCount="0"/>

        <queryResultCache class="solr.LRUCache"
                          size="512"
                          initialSize="512"
                          autowarmCount="0"/>

        <documentCache class="solr.LRUCache"
                       size="512"
                       initialSize="512"
                       autowarmCount="0"/>

        <cache name="perSegFilter"
               class="solr.search.LRUCache"
               size="10"
               initialSize="0"
               autowarmCount="10"
               regenerator="solr.NoOpRegenerator"/>

        <enableLazyFieldLoading>true</enableLazyFieldLoading>

        <queryResultWindowSize>20</queryResultWindowSize>

        <queryResultMaxDocsCached>200</queryResultMaxDocsCached>

        <listener event="newSearcher" class="solr.QuerySenderListener">
            <arr name="queries">
            </arr>
        </listener>
        <listener event="firstSearcher" class="solr.QuerySenderListener">
            <arr name="queries">
            </arr>
        </listener>

        <useColdSearcher>false</useColdSearcher>

    </query>


    <requestDispatcher>

        <httpCaching never304="true"/>

    </requestDispatcher>

    <requestHandler name="/select" class="solr.SearchHandler">
        <lst name="defaults">
            <str name="echoParams">explicit</str>
            <int name="rows">10</int>
        </lst>

    </requestHandler>

    <queryResponseWriter name="json" class="solr.JSONResponseWriter">
        <str name="content-type">text/plain; charset=UTF-8</str>
    </queryResponseWriter>

</config>
Starting Solr
Java 17 detected. Enabled workaround for SOLR-16463
[0.001s][warning][pagesize] UseLargePages disabled, no large pages configured 
and available on the system.
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
2024-10-14 05:32:18.294 INFO  (main) [c: s: r: x: t:] o.e.j.s.Server 
jetty-10.0.22; built: 2024-06-27T16:03:51.502Z; git: 
5c8471e852d377fd726ad9b1692c35ffc5febb09; jvm 17.0.12+7
2024-10-14 05:32:19.586 WARN  (main) [c: s: r: x: t:] 
o.e.j.u.DeprecationWarning Using @Deprecated Class 
org.eclipse.jetty.servlet.listener.ELContextCleaner
2024-10-14 05:32:19.691 INFO  (main) [c: s: r: x: t:] 
o.a.s.s.CoreContainerProvider Using logger factory 
org.apache.logging.slf4j.Log4jLoggerFactory
2024-10-14 05:32:19.697 INFO  (main) [c: s: r: x: t:] 
o.a.s.s.CoreContainerProvider  ___      _       Welcome to Apache Solr™ version 
9.7.0
2024-10-14 05:32:19.698 INFO  (main) [c: s: r: x: t:] 
o.a.s.s.CoreContainerProvider / __| ___| |_ _   Starting in standalone mode on 
port 8983
2024-10-14 05:32:19.698 INFO  (main) [c: s: r: x: t:] 
o.a.s.s.CoreContainerProvider \__ \/ _ \ | '_|  Install dir: /opt/solr-9.7.0
2024-10-14 05:32:19.698 INFO  (main) [c: s: r: x: t:] 
o.a.s.s.CoreContainerProvider |___/\___/_|_|    Start time: 
2024-10-14T05:32:19.698164069Z
2024-10-14 05:32:19.701 INFO  (main) [c: s: r: x: t:] 
o.a.s.s.CoreContainerProvider Solr started with "-XX:+CrashOnOutOfMemoryError" 
that will crash on any OutOfMemoryError exception. The cause of the OOME will 
be logged in the crash file at the following path: 
/var/solr/logs/jvm_crash_13.log
2024-10-14 05:32:19.795 INFO  (main) [c: s: r: x: t:] 
o.a.s.s.CoreContainerProvider Solr Home: /var/solr/data (source: system 
property: solr.solr.home)
2024-10-14 05:32:19.806 INFO  (main) [c: s: r: x: t:] o.a.s.c.SolrXmlConfig 
Loading solr.xml from /var/solr/data/solr.xml
2024-10-14 05:32:19.992 INFO  (main) [c: s: r: x: t:] 
o.a.s.c.SolrResourceLoader Added 1 libs to classloader, from paths: 
[/opt/solr-9.7.0/lib]
2024-10-14 05:32:23.207 INFO  (main) [c: s: r: x: t:] 
o.a.s.u.t.SimplePropagator Always-on trace id generation enabled.
2024-10-14 05:32:24.291 WARN  (main) [c: s: r: x: t:] 
o.a.s.u.StartupLoggingUtils Jetty request logging enabled. Will retain logs for 
last 3 days. See chapter "Configuring Logging" in reference guide for how to 
configure.
2024-10-14 05:32:24.292 WARN  (main) [c: s: r: x: t:] o.a.s.c.CoreContainer Not 
all security plugins configured!  authentication=disabled 
authorization=disabled.  Solr is only as secure as you make it. Consider 
configuring authentication/authorization before exposing Solr to users internal 
or external.  See https://s.apache.org/solrsecurity for more info
2024-10-14 05:32:24.987 INFO  (main) [c: s: r: x: t:] 
o.a.s.c.CorePropertiesLocator Found 1 core definitions underneath /var/solr/data
2024-10-14 05:32:24.987 INFO  (main) [c: s: r: x: t:] 
o.a.s.c.CorePropertiesLocator Cores are: [places]
2024-10-14 05:32:25.085 INFO  (coreLoadExecutor-13-thread-1) [c: s: r: x:places 
t:] o.a.s.c.SolrConfig Using Lucene MatchVersion: 9.11.1
2024-10-14 05:32:25.590 INFO  (coreLoadExecutor-13-thread-1) [c: s: r: x:places 
t:] o.a.s.s.IndexSchema Schema name=default-config
2024-10-14 05:32:25.888 INFO  (coreLoadExecutor-13-thread-1) [c: s: r: x:places 
t:] o.a.s.s.IndexSchema Loaded schema default-config/1.6 with uniqueid field id
2024-10-14 05:32:25.888 INFO  (coreLoadExecutor-13-thread-1) [c: s: r: x:places 
t:] o.a.s.c.CoreContainer Creating SolrCore 'places' using configuration from 
instancedir /var/solr/data/places, trusted=true
2024-10-14 05:32:26.098 INFO  (coreLoadExecutor-13-thread-1) [c: s: r: x:places 
t:] o.a.s.c.SolrCore Opening new SolrCore at [/var/solr/data/places], 
dataDir=[data/]
2024-10-14 05:32:26.190 INFO  (coreLoadExecutor-13-thread-1) [c: s: r: x:places 
t:] o.a.s.c.SolrCore CLOSING SolrCore org.apache.solr.core.SolrCore@588a9a06 
places
2024-10-14 05:32:26.190 INFO  (coreLoadExecutor-13-thread-1) [c: s: r: x:places 
t:] o.a.s.m.SolrMetricManager Closing metric repplacesrs for 
registry=solr.core.places tag=SolrCore@588a9a06
2024-10-14 05:32:26.195 ERROR (coreLoadExecutor-13-thread-1) [c: s: r: x: t:] 
o.a.s.c.CoreContainer SolrCore failed to load on startup => 
org.apache.solr.common.SolrException: Unable to create core [places]
        at 
org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1787)
org.apache.solr.common.SolrException: Unable to create core [places]
        at 
org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1787)
 ~[?:?]
        at 
org.apache.solr.core.CoreContainer.lambda$loadInternal$13(CoreContainer.java:1083)
 ~[?:?]
        at 
com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:212)
 ~[metrics-core-4.2.26.jar:4.2.26]
        at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) 
~[?:?]
        at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
        at 
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$1(ExecutorUtil.java:449)
 ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown 
Source) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
Source) ~[?:?]
        at java.base/java.lang.Thread.run(Unknown Source) [?:?]
Caused by: org.apache.solr.common.SolrException: ByteBuffersDirectory can only 
be used with the 'single' lock factory type.
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1231) ~[?:?]
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1060) ~[?:?]
        at 
org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1754)
 ~[?:?]
        ... 8 more
Caused by: org.apache.solr.common.SolrException: ByteBuffersDirectory can only 
be used with the 'single' lock factory type.
        at 
org.apache.solr.core.ByteBuffersDirectoryFactory.createLockFactory(ByteBuffersDirectoryFactory.java:34)
 ~[?:?]
        at 
org.apache.solr.core.CachingDirectoryFactory.get(CachingDirectoryFactory.java:410)
 ~[?:?]
        at 
org.apache.solr.core.SolrCore.initSnapshotMetaDataManager(SolrCore.java:614) 
~[?:?]
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1133) ~[?:?]
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1060) ~[?:?]
        at 
org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1754)
 ~[?:?]
        ... 8 more
2024-10-14 05:32:26.299 WARN  (main) [c: s: r: x: t:] 
o.g.j.m.i.MessagingBinders A class jakarta.activation.DataSource for a default 
provider MessageBodyWriter<jakarta.activation.DataSource> was not found. The 
provider is not available.
2024-10-14 05:32:27.392 INFO  (main) [c: s: r: x: t:] 
o.a.s.j.SolrRequestAuthorizer Creating a new SolrRequestAuthorizer
2024-10-14 05:32:27.891 INFO  (main) [c: s: r: x: t:] o.e.j.s.h.ContextHandler 
Started 
o.e.j.w.WebAppContext@127e70c5{solr-jetty-context.xml,/solr,file:///opt/solr-9.7.0/server/solr-webapp/webapp/,AVAILABLE}{/opt/solr-9.7.0/server/solr-webapp/webapp}
2024-10-14 05:32:27.897 INFO  (main) [c: s: r: x: t:] o.e.j.s.RequestLogWriter 
Opened /var/solr/logs/2024_10_14.request.log
2024-10-14 05:32:27.900 INFO  (main) [c: s: r: x: t:] o.e.j.s.AbstractConnector 
Started ServerConnector@62ea3440{HTTP/1.1, (http/1.1, h2c)}{0.0.0.0:8983}
2024-10-14 05:32:27.901 INFO  (main) [c: s: r: x: t:] o.e.j.s.Server Started 
Server@1bc715b8{STARTING}[10.0.22,sto=0] @13583ms
<?xml version="1.0" encoding="UTF-8" ?>
<solr>

    <solrcloud>
        <str name="host">${host:}</str>
        <int name="hostPort">${jetty.port:8983}</int>
        <str name="hostContext">${hostContext:solr}</str>
        <int name="zkClientTimeout">${zkClientTimeout:15000}</int>
        <bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>
    </solrcloud>

    <shardHandlerFactory name="shardHandlerFactory"
                         class="HttpShardHandlerFactory">
        <int name="socketTimeout">${socketTimeout:0}</int>
        <int name="connTimeout">${connTimeout:0}</int>
    </shardHandlerFactory>

</solr>

Reply via email to