Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solr Configuration

Tags:

java

solr

I tried to installed Solr using:

java -jar start.jar

However I downloaded the source code and didn't compile it (Didn't pay attention). And the error was:

http://localhost:8983/solr/admin/

HTTP ERROR: 404
Problem accessing /solr/admin/. Reason:
NOT_FOUND 

Then I downloaded the compiled version of solr but when trying to run the example configuration I'm getting exception:

java.net.BindException: Address already in use 

Is there a way to revert solr configuration and start from scratch? Looks like the configuration got messed up. I don't see anything related to it in the manual.

Here is the error:

2011-07-10 22:41:27.631:WARN::failed [email protected]:8983: java.net.BindException: Address already in use
2011-07-10 22:41:27.632:WARN::failed Server@c4e21db: java.net.BindException: Address already in use
2011-07-10 22:41:27.632:WARN::EXCEPTION 
java.net.BindException: Address already in use
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
    at java.net.ServerSocket.bind(ServerSocket.java:328)
    at java.net.ServerSocket.<init>(ServerSocket.java:194)
    at java.net.ServerSocket.<init>(ServerSocket.java:150)
    at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketConnector.java:80)
    at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
    at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
    at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.Server.doStart(Server.java:235)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.mortbay.start.Main.invokeMain(Main.java:194)
    at org.mortbay.start.Main.start(Main.java:534)
    at org.mortbay.start.Main.start(Main.java:441)
    at org.mortbay.start.Main.main(Main.java:119)
Jul 10, 2011 10:41:27 PM org.apache.solr.core.SolrCore registerSearcher
INFO: [] Registered new searcher Searcher@5b6b9e62 main
like image 698
rocco Avatar asked Jul 11 '11 02:07

rocco


People also ask

What is Solr configuration?

Solr has several configuration files that you will interact with during your implementation. Many of these files are in XML format, although APIs that interact with configuration settings tend to accept JSON for programmatic access as needed.

Where is Solr config?

The solrconfig. xml file is located in the conf/ directory for each collection. Several well-commented example files can be found in the server/solr/configsets/ directories demonstrating best practices for many different types of installations.

What is Solr used for?

Solr is a search server built on top of Apache Lucene, an open source, Java-based, information retrieval library. It is designed to drive powerful document retrieval applications - wherever you need to serve data to users based on their queries, Solr can work for you.

What is Solr architecture?

Apache Solr is a J2EE based application that uses the libraries of Apache Lucene internally for the generation of the indexes as well as to provide the user-friendly searches.


1 Answers

This means you already have an application running on that particular port.

Run:

$ lsof -i :8983

This gives you a list of any application running on that port. In my case, Solr is already running, and I get back:

COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    10289 patricia  111u  IPv6 399410      0t0  TCP *:8983 (LISTEN)

Kill this process by filling in your PID:

$ kill 10289

And then try running Solr again.

like image 107
Patricia Avatar answered Oct 21 '22 06:10

Patricia