[
https://issues.apache.org/jira/browse/SOLR-6851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14255863#comment-14255863
]
Steve Rowe commented on SOLR-6851:
----------------------------------
[~thelabdude], I went through the new ref guide page following the
instructions, using the latest branch_5x with the patch on this issue, on a
Debian Linux box I've got.
# Is the following section necessary? The vars are already filled in,
including {{RUNAS=ubuntu}}:
\\
{quote}
Next, you need to edit the /etc/init.d/solr file to set the following variables:
\\
{noformat}
SOLR_INSTALL_DIR=/opt/solr
RUNAS=???
SOLR_ENV=/var/solr/solr.in.sh
{noformat}
{quote}
\\
# Solr is still running just before the {{init.d}} section - we should tell
people to stop Solr before starting that section - here's the part where the
user has started solr:
\\
{quote}
At this point, you can start Solr using the include file to override default
settings by doing:
{noformat}
$ SOLR_INCLUDE=/var/solr/solr.in.sh /opt/solr/bin/solr start
{noformat}
{quote}
\\
# {{bin/init.d/solr}} is not included in the built distribution - I was able to
get it included with this patch to {{solr/build.xml}}:
\\
{code:xml}
@@ -485,7 +488,7 @@
<tarfileset dir="."
filemode="755"
prefix="${fullnamever}"
- includes="bin/* server/**/*.sh example/**/*.sh
example/**/bin/" />
+ includes="bin/** server/**/*.sh example/**/*.sh
example/**/bin/" />
<tarfileset dir="."
prefix="${fullnamever}"
includes="dist/*.jar
{code}
\\
# Sometimes commands assume the user is logged in as root, and sometimes they
use sudo - seems like for the one-time installation/config stuff, they should
stick to one approach? - here's where the first switch happened that I noticed:
\\
{noformat}
$ sudo chown -R ubuntu: /var/solr
{noformat}
\\
# When running {{update-rc.d solr defaults}}:
\\
{noformat}
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match solr
Default-Stop values (none)
{noformat}
\\
Is there some reason Solr shouldn't be stopped at run levels 0, 1, and 6?
\\
# Why is this necessary?: {{update-rc.d solr enable}} (didn't change anything
on my box - isn't this only necessary after a {{update-rc.d XXX disable}}?)
\\
# Under the Progress Check section, when restarting, I get the following:
\\
{noformat}
mv: cannot move `/opt/solr/server/logs/solr.log' to
`/opt/solr/server/logs/solr_log_20141222_0048': Permission denied
mv: cannot move `/opt/solr/server/logs/solr_gc.log' to
`/opt/solr/server/logs/solr_gc_log_20141222_0048': Permission denied
Waiting to see Solr listening on port 8983/opt/solr/bin/solr: line 1138:
/opt/solr/server/logs/solr-8983-console.log: Permission denied
[-] Still not seeing Solr listening on 8983 after 30 seconds!
INFO - 2014-12-22 05:25:38.930; org.apache.solr.core.SolrResourceLoader; JNDI
not configured for solr (NoInitialContextEx)
INFO - 2014-12-22 05:25:38.930; org.apache.solr.core.SolrResourceLoader; using
system property solr.solr.home: /var/solr/data
INFO - 2014-12-22 05:25:38.930; org.apache.solr.core.SolrResourceLoader; new
SolrResourceLoader for directory: '/var/solr/data/'
INFO - 2014-12-22 05:25:39.025; org.apache.solr.core.ConfigSolr; Loading
container configuration from /var/solr/data/solr.xml
INFO - 2014-12-22 05:25:39.085; org.apache.solr.core.CorePropertiesLocator;
Config-defined core root directory: /var/solr/data
INFO - 2014-12-22 05:25:39.090; org.apache.solr.core.CoreContainer; New
CoreContainer 18546089
INFO - 2014-12-22 05:25:39.091; org.apache.solr.core.CoreContainer; Loading
cores into CoreContainer [instanceDir=/var/solr/data/]
INFO - 2014-12-22 05:25:39.100;
org.apache.solr.handler.component.HttpShardHandlerFactory; Setting
socketTimeout to: 0
INFO - 2014-12-22 05:25:39.100;
org.apache.solr.handler.component.HttpShardHandlerFactory; Setting urlScheme
to: null
INFO - 2014-12-22 05:25:39.104;
org.apache.solr.handler.component.HttpShardHandlerFactory; Setting connTimeout
to: 0
INFO - 2014-12-22 05:25:39.104;
org.apache.solr.handler.component.HttpShardHandlerFactory; Setting
maxConnectionsPerHost to: 20
INFO - 2014-12-22 05:25:39.106;
org.apache.solr.handler.component.HttpShardHandlerFactory; Setting
maxConnections to: 10000
INFO - 2014-12-22 05:25:39.106;
org.apache.solr.handler.component.HttpShardHandlerFactory; Setting corePoolSize
to: 0
INFO - 2014-12-22 05:25:39.106;
org.apache.solr.handler.component.HttpShardHandlerFactory; Setting
maximumPoolSize to: 2147483647
INFO - 2014-12-22 05:25:39.106;
org.apache.solr.handler.component.HttpShardHandlerFactory; Setting
maxThreadIdleTime to: 5
INFO - 2014-12-22 05:25:39.106;
org.apache.solr.handler.component.HttpShardHandlerFactory; Setting sizeOfQueue
to: -1
INFO - 2014-12-22 05:25:39.107;
org.apache.solr.handler.component.HttpShardHandlerFactory; Setting
fairnessPolicy to: false
INFO - 2014-12-22 05:25:39.202; org.apache.solr.update.UpdateShardHandler;
Creating UpdateShardHandler HTTP client with params:
socketTimeout=0&connTimeout=0&retry=false
INFO - 2014-12-22 05:25:39.204; org.apache.solr.logging.LogWatcher; SLF4J impl
is org.slf4j.impl.Log4jLoggerFactory
INFO - 2014-12-22 05:25:39.205; org.apache.solr.logging.LogWatcher;
Registering Log Listener [Log4j (org.slf4j.impl.Log4jLoggerFactory)]
INFO - 2014-12-22 05:25:39.205; org.apache.solr.core.CoreContainer; Host Name:
INFO - 2014-12-22 05:25:39.229; org.apache.solr.core.CorePropertiesLocator;
Looking for core definitions underneath /var/solr/data
INFO - 2014-12-22 05:25:39.230; org.apache.solr.core.CorePropertiesLocator;
Found 0 core definitions
INFO - 2014-12-22 05:25:39.231; org.apache.solr.servlet.SolrDispatchFilter;
user.dir=/opt/solr-5.0.0/server
INFO - 2014-12-22 05:25:39.231; org.apache.solr.servlet.SolrDispatchFilter;
SolrDispatchFilter.init() done
INFO - 2014-12-22 05:25:39.256; org.eclipse.jetty.server.AbstractConnector;
Started [email protected]:8983
INFO - 2014-12-22 05:34:33.015; org.eclipse.jetty.server.Server; Graceful
shutdown [email protected]:8983
INFO - 2014-12-22 05:34:33.016; org.eclipse.jetty.server.Server; Graceful
shutdown
o.e.j.w.WebAppContext{/solr,file:/opt/solr-5.0.0/server/solr-webapp/webapp/},/opt/solr-5.0.0/server/webapps/solr.war
INFO - 2014-12-22 05:34:34.017; org.apache.solr.core.CoreContainer; Shutting
down CoreContainer instance=18546089
INFO - 2014-12-22 05:34:34.020;
org.eclipse.jetty.server.handler.ContextHandler; stopped
o.e.j.w.WebAppContext{/solr,file:/opt/solr-5.0.0/server/solr-webapp/webapp/},/opt/solr-5.0.0/server/webapps/solr.war
{noformat}
\\
At this point, Solr isn't running and {{service solr start}} does not do the
trick.
\\
# {{service solr stop}} at this point doesn't work (neither does adding '-p
8983' or '-all' at the end):
\\
{noformat}
Must either specify a port using -p or -all to stop all Solr nodes on this host.
{noformat}
\\
and {{service solr status}} says:
\\
{noformat}
Found 1 Solr nodes:
Solr process 13440 from /var/solr/solr-8983.pid not found.
{noformat}
\\
# After handling the log setup, {{service solr start}} results in the following
in {{solr.log}}:
\\
{noformat}
INFO - 2014-12-22 06:01:32.762; org.eclipse.jetty.server.Server;
jetty-8.1.10.v20130312
INFO - 2014-12-22 06:01:32.777;
org.eclipse.jetty.deploy.providers.ScanningAppProvider; Deployment monitor
/opt/solr-5.0.0/server/contexts at interval 0
INFO - 2014-12-22 06:01:32.781; org.eclipse.jetty.deploy.DeploymentManager;
Deployable added: /opt/solr-5.0.0/server/contexts/solr-jetty-context.xml
WARN - 2014-12-22 06:01:32.811;
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration; Config error at
<Set name="tempDirectory"><Property name="jetty.home" defau
lt="."/>/solr-webapp</Set>
WARN - 2014-12-22 06:01:32.812; org.eclipse.jetty.deploy.DeploymentManager;
Unable to reach node goal: started
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:561)
at
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:384)
at
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:343)
at
org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:296)
at
org.eclipse.jetty.deploy.providers.ContextProvider.createContextHandler(ContextProvider.java:87)
at org.eclipse.jetty.deploy.App.getContextHandler(App.java:100)
at
org.eclipse.jetty.deploy.bindings.StandardDeployer.processBinding(StandardDeployer.java:36)
at
org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
at
org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
at
org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
at
org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
at
org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609)
at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at
org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at
org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
at
org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at
org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
at
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
at
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
at org.eclipse.jetty.server.Server.doStart(Server.java:280)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at
org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1259)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1182)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:473)
at org.eclipse.jetty.start.Main.start(Main.java:615)
at org.eclipse.jetty.start.Main.main(Main.java:96)
Caused by: java.lang.IllegalArgumentException: Bad temp directory:
/opt/solr-5.0.0/server/solr-webapp
at
org.eclipse.jetty.webapp.WebAppContext.setTempDirectory(WebAppContext.java:1129)
... 41 more
INFO - 2014-12-22 06:01:32.817; org.eclipse.jetty.server.AbstractConnector;
Started [email protected]:8983
{noformat}
That's as far as I got.
> oom_solr.sh problems and other issues that make it hard to run Solr as a
> service on *nix
> ----------------------------------------------------------------------------------------
>
> Key: SOLR-6851
> URL: https://issues.apache.org/jira/browse/SOLR-6851
> Project: Solr
> Issue Type: Bug
> Reporter: Hoss Man
> Assignee: Timothy Potter
> Fix For: 5.0
>
> Attachments: SOLR-6851.patch
>
>
> noticed 2 problems with the oom_solr.sh script...
> 1) the script is only being run with the port of hte solr instance to
> terminate, so the log messages aren't getting writen to the correct directory
> -- if we change hte script to take a log dir/file as an argument, we can
> ensure the logs are written to the correct place
> 2) on my ubuntu linux machine (where /bin/sh is a symlink to "/bin/dash"),
> the console log is recording a script error when java runs oom_solr.sh...
> {noformat}
> #
> # java.lang.OutOfMemoryError: Java heap space
> # -XX:OnOutOfMemoryError="/home/hossman/lucene/5x_dev/solr/bin/oom_solr.sh
> 8983"
> # Executing /bin/sh -c "/home/hossman/lucene/5x_dev/solr/bin/oom_solr.sh
> 8983"...
> /home/hossman/lucene/5x_dev/solr/bin/oom_solr.sh: 20: [: 14305: unexpected
> operator
> Running OOM killer script for process 14305 for Solr on port 8983
> Killed process 14305
> {noformat}
> steps to reproduce: {{bin/solr -e techproducts -m 10m}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]