[
https://issues.apache.org/jira/browse/SOLR-11514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16215671#comment-16215671
]
Shawn Heisey commented on SOLR-11514:
-------------------------------------
Steps for reproduction (on Ubuntu 16)
{code:none}
root@smeagol:/usr/local/src# ./install_solr_service.sh solr-7.1.0.tgz
id: ‘solr’: no such user
Creating new user: solr
Adding system user `solr' (UID 141) ...
Adding new group `solr' (GID 147) ...
Adding new user `solr' (UID 141) with group `solr' ...
Creating home directory `/var/solr' ...
Extracting solr-7.1.0.tgz to /opt
Installing symlink /opt/solr -> /opt/solr-7.1.0 ...
Installing /etc/init.d/solr script ...
Installing /etc/default/solr.in.sh ...
Service solr installed.
Customize Solr startup configuration in /etc/default/solr.in.sh
● solr.service - LSB: Controls Apache Solr as a Service
Loaded: loaded (/etc/init.d/solr; bad; vendor preset: enabled)
Active: active (exited) since Mon 2017-10-23 12:50:12 MDT; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 25798 ExecStart=/etc/init.d/solr start (code=exited,
status=0/SUCCESS)
Oct 23 12:50:05 smeagol systemd[1]: Starting LSB: Controls Apache Solr as a
Service...
Oct 23 12:50:05 smeagol su[25805]: Successful su for solr by root
Oct 23 12:50:05 smeagol su[25805]: + ??? root:solr
Oct 23 12:50:05 smeagol su[25805]: pam_unix(su:session): session opened for
user solr by (uid=0)
Oct 23 12:50:12 smeagol solr[25798]: [146B blob data]
Oct 23 12:50:12 smeagol solr[25798]: Started Solr server on port 8983
(pid=25945). Happy searching!
Oct 23 12:50:12 smeagol solr[25798]: [14B blob data]
Oct 23 12:50:12 smeagol systemd[1]: Started LSB: Controls Apache Solr as a
Service.
{code}
The I edited the include script and added a SOLR_HEAP="2g" line.
{code}
root@smeagol:/usr/local/src# vi /etc/default/solr.in.sh
root@smeagol:/usr/local/src# service solr stop
root@smeagol:/usr/local/src# service solr start
root@smeagol:/usr/local/src# service solr status
● solr.service - LSB: Controls Apache Solr as a Service
Loaded: loaded (/etc/init.d/solr; bad; vendor preset: enabled)
Active: active (exited) since Mon 2017-10-23 12:53:24 MDT; 2s ago
Docs: man:systemd-sysv-generator(8)
Process: 26182 ExecStop=/etc/init.d/solr stop (code=exited, status=0/SUCCESS)
Process: 26336 ExecStart=/etc/init.d/solr start (code=exited,
status=0/SUCCESS)
Oct 23 12:53:18 smeagol systemd[1]: Starting LSB: Controls Apache Solr as a
Service...
Oct 23 12:53:18 smeagol su[26339]: Successful su for solr by root
Oct 23 12:53:18 smeagol su[26339]: + ??? root:solr
Oct 23 12:53:18 smeagol su[26339]: pam_unix(su:session): session opened for
user solr by (uid=0)
Oct 23 12:53:24 smeagol solr[26336]: [146B blob data]
Oct 23 12:53:24 smeagol solr[26336]: Started Solr server on port 8983
(pid=26475). Happy searching!
Oct 23 12:53:24 smeagol solr[26336]: [14B blob data]
Oct 23 12:53:24 smeagol systemd[1]: Started LSB: Controls Apache Solr as a
Service.
{code}
It's not showing me the status, so I asked the running Solr for a system info
dump:
{code}
root@smeagol:/usr/local/src# curl http://localhost:8983/solr/admin/info/system
{
"responseHeader":{
"status":0,
"QTime":91},
"mode":"std",
"solr_home":"/var/solr/data",
"lucene":{
"solr-spec-version":"7.1.0",
"solr-impl-version":"7.1.0 84c90ad2c0218156c840e19a64d72b8a38550659 -
ubuntu - 2017-10-13 16:15:59",
"lucene-spec-version":"7.1.0",
"lucene-impl-version":"7.1.0 84c90ad2c0218156c840e19a64d72b8a38550659 -
ubuntu - 2017-10-13 16:12:42"},
"jvm":{
"version":"1.8.0_144 25.144-b01",
"name":"Oracle Corporation Java HotSpot(TM) 64-Bit Server VM",
"spec":{
"vendor":"Oracle Corporation",
"name":"Java Platform API Specification",
"version":"1.8"},
"jre":{
"vendor":"Oracle Corporation",
"version":"1.8.0_144"},
"vm":{
"vendor":"Oracle Corporation",
"name":"Java HotSpot(TM) 64-Bit Server VM",
"version":"25.144-b01"},
"processors":4,
"memory":{
"free":"1.8 GB",
"total":"1.9 GB",
"max":"1.9 GB",
"used":"102.6 MB (%5.2)",
"raw":{
"free":1950475352,
"total":2058027008,
"max":2058027008,
"used":107551656,
"used%":5.225959405873842}},
"jmx":{
"bootclasspath":"/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes",
"classpath":"/opt/solr-7.1.0/server/lib/gmetric4j-1.0.7.jar:/opt/solr-7.1.0/server/lib/javax.servlet-api-3.1.0.jar:/opt/solr-7.1.0/server/lib/jetty-continuation-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/jetty-deploy-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/jetty-http-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/jetty-io-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/jetty-jmx-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/jetty-rewrite-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/jetty-security-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/jetty-server-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/jetty-servlet-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/jetty-servlets-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/jetty-util-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/jetty-webapp-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/jetty-xml-9.3.20.v20170531.jar:/opt/solr-7.1.0/server/lib/metrics-core-3.2.2.jar:/opt/solr-7.1.0/server/lib/metrics-ganglia-3.2.2.jar:/opt/solr-7.1.0/server/lib/metrics-graphite-3.2.2.jar:/opt/solr-7.1.0/server/lib/metrics-jetty9-3.2.2.jar:/opt/solr-7.1.0/server/lib/metrics-jvm-3.2.2.jar:/opt/solr-7.1.0/server/lib/ext/jcl-over-slf4j-1.7.7.jar:/opt/solr-7.1.0/server/lib/ext/jul-to-slf4j-1.7.7.jar:/opt/solr-7.1.0/server/lib/ext/log4j-1.2.17.jar:/opt/solr-7.1.0/server/lib/ext/slf4j-api-1.7.7.jar:/opt/solr-7.1.0/server/lib/ext/slf4j-log4j12-1.7.7.jar:/opt/solr-7.1.0/server/resources",
"commandLineArgs":["-Xms2g",
"-Xmx2g",
"-XX:NewRatio=3",
"-XX:SurvivorRatio=4",
"-XX:TargetSurvivorRatio=90",
"-XX:MaxTenuringThreshold=8",
"-XX:+UseConcMarkSweepGC",
"-XX:+UseParNewGC",
"-XX:ConcGCThreads=4",
"-XX:ParallelGCThreads=4",
"-XX:+CMSScavengeBeforeRemark",
"-XX:PretenureSizeThreshold=64m",
"-XX:+UseCMSInitiatingOccupancyOnly",
"-XX:CMSInitiatingOccupancyFraction=50",
"-XX:CMSMaxAbortablePrecleanTime=6000",
"-XX:+CMSParallelRemarkEnabled",
"-XX:+ParallelRefProcEnabled",
"-XX:-OmitStackTraceInFastThrow",
"-verbose:gc",
"-XX:+PrintHeapAtGC",
"-XX:+PrintGCDetails",
"-XX:+PrintGCDateStamps",
"-XX:+PrintGCTimeStamps",
"-XX:+PrintTenuringDistribution",
"-XX:+PrintGCApplicationStoppedTime",
"-Xloggc:/var/solr/logs/solr_gc.log",
"-XX:+UseGCLogFileRotation",
"-XX:NumberOfGCLogFiles=9",
"-XX:GCLogFileSize=20M",
"-Dsolr.log.dir=/var/solr/logs",
"-Djetty.port=8983",
"-DSTOP.PORT=7983",
"-DSTOP.KEY=solrrocks",
"-Duser.timezone=UTC",
"-Djetty.home=/opt/solr/server",
"-Dsolr.solr.home=/var/solr/data",
"-Dsolr.data.home=",
"-Dsolr.install.dir=/opt/solr",
"-Dsolr.default.confdir=/opt/solr/server/solr/configsets/_default/conf",
"-Dlog4j.configuration=file:/var/solr/log4j.properties",
"-Xss256k",
"-Dsolr.jetty.https.port=8983",
"-Dsolr.log.muteconsole",
"-XX:OnOutOfMemoryError=/opt/solr/bin/oom_solr.sh 8983 /var/solr/logs"],
"startTime":"2017-10-23T18:53:20.289Z",
"upTimeMS":118809}},
"system":{
"name":"Linux",
"arch":"amd64",
"availableProcessors":4,
"systemLoadAverage":1.07,
"version":"4.10.0-32-generic",
"committedVirtualMemorySize":5796089856,
"freePhysicalMemorySize":743649280,
"freeSwapSpaceSize":8055865344,
"processCpuLoad":0.0,
"processCpuTime":5860000000,
"systemCpuLoad":0.0,
"totalPhysicalMemorySize":25226625024,
"totalSwapSpaceSize":8192520192,
"maxFileDescriptorCount":1048576,
"openFileDescriptorCount":126,
"uname":"Linux smeagol 4.10.0-32-generic #36~16.04.1-Ubuntu SMP Wed Aug 9
09:19:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux\n",
"uptime":" 12:55:19 up 69 days, 5:04, 3 users, load average: 1.07, 1.14,
1.11\n"}}
{code}
The first two commandline options in that info dump are setting the heap to 2g,
and the section about memory reflects the change. Then, because the change to
the include script was not the exact same change that you made, I removed the
line I added and substituted SOLR_JAVA_MEM="-Xms512m -Xmx2g" ... after a
"service solr restart", I see the new commandline options in the info dump.
> Solr 7.1 does not honor values specified in solr.in.sh
> ------------------------------------------------------
>
> Key: SOLR-11514
> URL: https://issues.apache.org/jira/browse/SOLR-11514
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: release-scripts, SolrCloud
> Affects Versions: 7.1
> Environment: Linux RHEL 7, 8GB RAM, 60GB HDD, Solr 7.1 in cloud mode
> (zookeeper 3.4.10)
> Reporter: Howard Black
> Attachments: solr, solr.in.sh
>
>
> Just installed Solr 7.1 and zookeeper 3.4.10 into a test environment and it
> seems that arguments in the solr.in.sh file in /etc/default are not getting
> picked up when starting the server.
> I have this specified in solr.in.sh SOLR_JAVA_MEM="-Xms512m -Xmx6144m" but
> the JVM shows -Xms512m -Xmx512m.
> Same goes for SOLR_LOGS_DIR=/mnt/logs logs are still being written to
> /opt/solr/server/logs
> The command I used to install Solr is this:
> ./install_solr_service.sh /home/hblack/solr-7.1.0.tgz -i /opt -d
> /mnt/solr-home -s solr -u solr
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]