How to stop the running solr server? - apache

I want to stop Solr server which is been started with below command
$ solr start -e dih
by above command my intention was to launch example DIH application bundled with the package.
Now I want to stop the above server, when I try to stop, I am getting below error:
$ solr stop -p 8984
ERROR: Solr home directory D:\Softwares\solr-5.0.0\ must contain
solr.xml
I am new to Solr.

i had set the SOLR_HOME as solr\bin, but where as per the document , it says
The Solr Home directory typically contains the following...
solr.xml *
so i have set SOLR_HOME to solr\server\solr, where i have solr.xml.
after modifying my home to above path, solr stop starts working

Related

solr 9 on ubuntu - bad permissions

I'm trying to set up a solr cloud instance on ubuntu and am having this issue (5 years later, under solr 9): solr installation, cannot start examples
The suggested solution (chown solr.solr...) does not work for me, nor can I run solr as root.
As a last resort, I tried forcing solr start as root: bin/solr start -e cloud -force
but it still errors with permissions:
ERROR: Logs directory /opt/solr/example/cloud/node1/solr/../logs could not be created.
Anyone have a solution to this under solr 9?

Apache solr indexed data not visible even after commit

I am not able to find the indexed data of the files during search
Below are the steps I am following
OS: Windows 7
Solr version: solr 5.2.1
Steps:
cd ..\solr 5.2.1\bin
solr start -e techproducts
Check if solr is up and running and core is visible. Search for the indexed files. Total 32 files exists and shown in the search result .
cd ..\solr-5.2.1\example\exampledocs
curl "http://localhost:8983/solr/techproducts/update/extract?literal.id=33&commit=true" -H "myfile=#example/exampledocs/test.pdf"
Result: It shows successfully indexed and committed but the files returned from the search are still 32 files.
try with other way of indexing ... java -Durl=http://localhost:8983/solr/techproducts/update/extract -Dparams=literal.id=33 -jar post.jar test.pdf It indexed and committed successfully
Open solr GUI and do a search now 33 files returned , but can not see any information of the test.pdf file, meta data and data both not visible
Restart the solr
now we can see the data of the file
Surprisingly instant commit worked for me just a day before with the same configuration, once I did delete all index, from then I am facing this problem not only with this solr instance for other solr instances in the same machine.
Below are the autocommit config from solrconfig.xml
<autoCommit>
<maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
<openSearcher>false</openSearcher>
</autoCommit>
<autoSoftCommit>
<maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
</autoSoftCommit>

How to run scripts automatically after deployment in AWS using EB CLI?

I am trying to make a Django server on AWS. My django app depends on some mathematical python libraries like numpy, scipy, sklearn etc. However there is an issue for which I need to this after every deployment
sudo nano /etc/httpd/conf.d/wsgi.conf
---------------------------------------
add this line in the file
WSGIApplicationGroup %{GLOBAL}
---------------------------------------
sudo /etc/init.d/httpd reload
Basically I need "WSGIApplicationGroup %{GLOBAL}" in my wsgi.conf file otherwise I get 504. I am using a Custom AMI built on top of Amazon Linux 2014 and I am using EB CLI for deployment. However whenever I deploy the wsgi.conf is reset and it does not contain the line that I have added previously and I need to manually SSH into the EC2 instance and do this task myself. It gives a overhead on every deployment and its also not feasible once we scale up (cloning or creating instances also resets it). So is there a way that this will be automatically done after every deployment ?
The content of the wsgi.conf is fixed, so basically I can make a script easily to create it but the issue is how to trigger the script automatically ?
PS:I am new to AWS
You need to use AWS Elastic Beanstalk feature called .ebextensions: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html
In your case you can't use Files or Commands sections, because:
The commands are processed in alphabetical order by name, and they run
before the application and web server are set up and the application
version file is extracted.
You need to use Container_commands section:
They run after the application and web server have been set up and the
application version file has been extracted, but before the
application version is deployed.
Example .ebextensions/01wsgi.config (not tested :-))
container_commands:
apache_reload:
command: |
echo "WSGIApplicationGroup %{GLOBAL}" >> /etc/httpd/conf.d/wsgi.conf
/etc/init.d/httpd reload
Feel free to tweak my example as you want, for example you can copy your temporary wsgi.conf file somewhere and then replace original in Container_commands section.

Monitoring Solr using Monit

I'm new to Solr and Monit. I have a Rails 3.2 app with Solr, how do you configure monit to handle Solr?
Cheers, and Thanks,
Zeck
To handle solr using monit you need to config it in the monitrc file which is present in /etc/monit/ directory.
Go to the directory
1) cd /etc/monit
and edit the monitrc file using sudo.
2) sudo nano monitrc
At the end of the file past the code given in the link
https://gist.github.com/SammyLin/cc367a8a2fe552bcbb1f
Save the file and reload the monit using
3) sudo monit reload
Now monit will take care of the solr.

Unable to start Active MQ on Linux

I am trying to get ActiveMQ server running on a RaspberryPI Debian Squeeze box and all appears to be installed correctly but when I try and start the service I am getting the following...
root#raspberrypi:/var/www/activemq/apache-activemq-5.7.0# bin/activemq
INFO: Loading '/etc/default/activemq'
INFO: Using java '/usr/jre1.7.0_07/bin/java'
/usr/jre1.7.0_07/bin/java: 1: /usr/jre1.7.0_07/bin/java:ELF0
4°: not found
/usr/jre1.7.0_07/bin/java: 2: /usr/jre1.7.0_07/bin/java: Syntax error: "(" unexpected
Tasks provided by the sysv init script:
restart - stop running instance (if there is one), start new instance
console - start broker in foreground, useful for debugging purposes
status - check if activemq process is running
setup - create the specified configuration file for this init script
(see next usage section)
Configuration of this script:
The configuration of this script can be placed on /etc/default/activemq or /root/.activemqrc.
To use additional configurations for running multiple instances on the same operating system
rename or symlink script to a name matching to activemq-instance-<INSTANCENAME>.
This changes the configuration location to /etc/default/activemq-instance-<INSTANCENAME> and
$HOME/.activemqrc-instance-<INSTANCENAME>. Configuration files in /etc have higher precedence.
root#raspberrypi:/var/www/activemq/apache-activemq-5.7.0#
It looks like there is an error somewhere but I am a fairly newbie at this and don't know where to look.
Just adding an answer since,becoz as per the documentation , the command is wrong
to start activemqm, use
Navigate to [installation directory/bin] and run ./activemq start or simple bin/activemq start
if you want to see it live in a window use bin/activemq console
To stop, you have to kill the process
The default ActiveMQ "getting started" link sends u here : http://activemq.apache.org/getting-started.html which is the "Getting Started Guide for ActiveMQ 4.x".
If you scroll down main documentation page, you will find this link with the proper commands :
http://activemq.apache.org/version-5-getting-started.html