I have put SOLR 8.11.1 onto a windows server in a folder E:\ApacheSolr8_11_1 I am able to successfully start SOLR from the command window using the following command
bin\solr.cmd start -p 8983
I have a windows service that runs the following command to host SOLR in the windows service (this worked with SOLR 4.10.2, now trying to modify the command to run SOLR 8.11.1).
"C:\Program Files\Java\jdk1.8.0_40\bin\java.exe" -Djetty.home=E:\ApacheSolr8_11_1\server -DSTOP.PORT=8087 -DSTOP.KEY=stopsolr -Djetty.logs=E:\ApacheSolr8_11_1\server\logs -Dorg.eclipse.jetty.util.log.SOURCE=true -Dsolr.solr.home=E:\ApacheSolr8_11_1\server -jar E:\ApacheSolr8_11_1\server\start.jar --module=http
When I test this from the command prompt, I get the following error:
2022-05-20 15:44:11,972 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for element RollingRandomAccessFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:234) at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:134) at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1107) at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1032) at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1024) at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:643) at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:243) at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:289) at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:699) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:716) at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:270) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47) at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196) at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137) at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:55) at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47) at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:33) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358) at org.eclipse.jetty.util.log.Slf4jLog.(Slf4jLog.java:36) at org.eclipse.jetty.util.log.Slf4jLog.(Slf4jLog.java:30) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at org.eclipse.jetty.util.log.Log.initialized(Log.java:158) at org.eclipse.jetty.util.log.Log.getLogger(Log.java:278) at org.eclipse.jetty.util.log.Log.getLogger(Log.java:267) at org.eclipse.jetty.xml.XmlConfiguration.(XmlConfiguration.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.jetty.start.Main.invokeMain(Main.java:218) at org.eclipse.jetty.start.Main.start(Main.java:491) at org.eclipse.jetty.start.Main.main(Main.java:77)
2022-05-20 15:44:11,972 main ERROR Null object returned for RollingRandomAccessFile in Appenders. 2022-05-20 15:44:11,988 main ERROR Null object returned for RollingRandomAccessFile in Appenders. 2022-05-20 15:44:12,003 main ERROR Unable to locate appender "MainLogFile" for logger config "root" 2022-05-20 15:44:12,003 main ERROR Unable to locate appender "SlowLogFile" for logger config "org.apache.solr.core.SolrCore.SlowRequest" 2022-05-20 15:44:12.144 INFO (main) [ ] o.e.j.u.log Logging initialized @1396ms to org.eclipse.jetty.util.log.Slf4jLog 2022-05-20 15:44:12.441 INFO (main) [ ] o.e.j.s.Server jetty-9.4.44.v20210927; built: 2021-09-27T23:02:44.612Z; git: 8da83308eeca865e495e53ef315a249d63ba9332; jvm 1.8.0_40-b25 2022-05-20 15:44:12.503 INFO (main) [ ] o.e.j.d.p.ScanningAppProvider Deployment monitor [file:///E:/ApacheSolr8_11_1/contexts] at interval 0 2022-05-20 15:44:12.503 WARN (main) [ ] o.e.j.d.p.ScanningAppProvider Does not exist: file:///E:/ApacheSolr8_11_1/contexts 2022-05-20 15:44:12.535 INFO (main) [ ] o.e.j.s.AbstractConnector Started ServerConnector@33990a0c{HTTP/1.1, (http/1.1, h2c)}{0.0.0.0:8983} 2022-05-20 15:44:12.535 INFO (main) [ ] o.e.j.s.Server Started @1791ms
1条答案
按热度按时间qzwqbdag1#
问题是jetty.logs参数中的日志文件夹指向了错误的文件夹。