lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-12538) log4j exceptions during startup on Windows
Date Fri, 06 Jul 2018 19:26:00 GMT

    [ https://issues.apache.org/jira/browse/SOLR-12538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16535251#comment-16535251
] 

Erick Erickson commented on SOLR-12538:
---------------------------------------

OK, let me take a whack at fixing this along with SOLR-12008. IIUC (and I don't have a Windows
machine to test with, help!) is to substitute
"file:///" for all the occurrences of "file:" in the windows command files, correct?

[~shawn.mccorkell] It'd be great if you could pull down the patch on SOLR-12008 and try it.
NOTE: you can't just extract the solr.cmd file and use that since the log4j files have moved
around and the ones referenced in the current solr.cmd are removed. You'll have to apply the
patch and compile.

> log4j exceptions during startup on Windows
> ------------------------------------------
>
>                 Key: SOLR-12538
>                 URL: https://issues.apache.org/jira/browse/SOLR-12538
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: scripts and tools
>    Affects Versions: 7.4
>            Reporter: Jakob Furrer
>            Priority: Minor
>
> Note that there has been some input regarding this issue on the Solr mailinglist:
>  [http://lucene.472066.n3.nabble.com/Logging-fails-when-starting-Solr-in-Windows-using-solr-cmd-td4396671.html]
> Problem description 
>  ==================
> System: Microsoft Windows 10 Enterprise Version 10.0.16299 Build 16299
> Steps to reproduce the problem: 
>  1) Download solr-7.4.0.zip
> 2) Unzip to C:\solr-7.4.0
> 3) No changes (configuration or otherwise) whatsoever
> 4) Open cmd.exe
> 5) Execute the following command: *cd c:\solr-7.4.0\bin*
> 6) Execute the following command: *solr.cmd start -p 8983*
> 7) The following console output appears:
> {code:java}
> c:\solr-7.4.0\bin>solr.cmd start -p 8983 
> ERROR StatusLogger Unable to access 
> file:/c:/solr-7.4.0/server/file:c:/solr-7.4.0/server/scripts/cloud-scripts/log4j2.xml

>   java.io.FileNotFoundException: 
> c:\solr-7.4.0\server\file:c:\solr-7.4.0\server\scripts\cloud-scripts\log4j2.xml 
> (Die Syntax für den Dateinamen, Verzeichnisnamen oder die 
> Datenträgerbezeichnung ist falsch) 
>          at java.io.FileInputStream.open0(Native Method) 
>          at java.io.FileInputStream.open(FileInputStream.java:195) 
>          at java.io.FileInputStream.<init>(FileInputStream.java:138) 
>          at java.io.FileInputStream.<init>(FileInputStream.java:93) 
>          at 
> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) 
>          at 
> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)

>          at java.net.URL.openStream(URL.java:1045) 
>          at 
> org.apache.logging.log4j.core.config.ConfigurationSource.fromUri(ConfigurationSource.java:247)

>          at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:404)

>          at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:346)

>          at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:260)

>          at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:615) 
>          at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:636) 
>          at 
> org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231) 
>          at 
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)

>          at 
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)

>          at 
> org.apache.logging.log4j.LogManager.getContext(LogManager.java:194) 
>          at 
> org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121)

>          at 
> org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43) 
>          at 
> org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)

>          at 
> org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29) 
>          at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358) 
>          at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383) 
>          at org.apache.solr.util.SolrCLI.<clinit>(SolrCLI.java:228) 
> ERROR StatusLogger Unable to access 
> file:/c:/solr-7.4.0/server/file:c:/solr-7.4.0/server/resources/log4j2.xml 
>   java.io.FileNotFoundException: 
> c:\solr-7.4.0\server\file:c:\solr-7.4.0\server\resources\log4j2.xml (Die 
> Syntax für den Dateinamen, Verzeichnisnamen oder die 
> Datenträgerbezeichnung ist falsch) 
>          at java.io.FileInputStream.open0(Native Method) 
>          at java.io.FileInputStream.open(FileInputStream.java:195) 
>          at java.io.FileInputStream.<init>(FileInputStream.java:138) 
>          at java.io.FileInputStream.<init>(FileInputStream.java:93) 
>          at 
> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) 
>          at 
> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)

>          at java.net.URL.openStream(URL.java:1045) 
>          at 
> org.apache.logging.log4j.core.config.ConfigurationSource.fromUri(ConfigurationSource.java:247)

>          at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:404)

>          at 
> org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:346)

>          at 
> org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:260)

>          at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:615) 
>          at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:636) 
>          at 
> org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231) 
>          at 
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)

>          at 
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)

>          at 
> org.apache.logging.log4j.LogManager.getContext(LogManager.java:194) 
>          at 
> org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121)

>          at 
> org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43) 
>          at 
> org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)

>          at 
> org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29) 
>          at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358) 
>          at org.eclipse.jetty.util.log.Slf4jLog.<init>(Slf4jLog.java:38) 
>          at org.eclipse.jetty.util.log.Slf4jLog.<init>(Slf4jLog.java:32) 
>          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:423) 
>          at org.eclipse.jetty.util.log.Log.initialized(Log.java:178) 
>          at org.eclipse.jetty.util.log.Log.getLogger(Log.java:311) 
>          at org.eclipse.jetty.util.log.Log.getLogger(Log.java:301) 
>          at 
> org.eclipse.jetty.xml.XmlConfiguration.<clinit>(XmlConfiguration.java:80) 
>          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:498) 
>          at org.eclipse.jetty.start.Main.invokeMain(Main.java:220) 
>          at org.eclipse.jetty.start.Main.start(Main.java:486) 
>          at org.eclipse.jetty.start.Main.main(Main.java:77) 
> INFO  - 2018-07-03 10:12:19.375; 
> org.apache.solr.util.configuration.SSLCredentialProviderFactory; 
> Processing SSL Credential Provider chain: env;sysprop 
> Waiting up to 30 to see Solr running on port 8983 
> Started Solr server on port 8983. Happy searching! 
> c:\solr-7.4.0\bin> {code}
>  
> Proposed workaround
>  ==================
> 8) I managed to fix the situation temporarily as follows (but I am not 
>  convinced this is the correct way to comprehensively tackle the problem) 
>      Edit C:\solr-7.4.0\bin\solr.cmd as follows: 
>      Change all occurrences of '*-Dlog4j.configurationFile="file:*' to 
>  '*-Dlog4j.configurationFile="*' (19 occurrences in total) 
>      Change all occurrences of *'LOG4J_CONFIG=[file:*|file:///*]' to '*LOG4J_CONFIG=*'
(2 
>  occurrences in total)
> 9) Execute the following command: *solr.cmd restart -p 8983*
> 10) The following console output appears:
> {code:java}
> c:\solr-7.4.0\bin>solr.cmd restart -p 8983 
> Stopping Solr process 20024 running on port 8983 
> Gewartet wird 0 Sekunden. Weiter mit beliebiger Taste... 
> INFO  - 2018-07-03 10:47:57.994; 
> org.apache.solr.util.configuration.SSLCredentialProviderFactory; 
> Processing SSL Credential Provider chain: env;sysprop 
> Waiting up to 30 to see Solr running on port 8983 
> Started Solr server on port 8983. Happy searching! 
> c:\solr-7.4.0\bin> {code}
> Cheers, Jakob
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message