无法在Ubuntu服务器

时间:2018-05-12 09:24:20

标签: solr ubuntu-16.04

最近我试图学习Apache Solr,但是我在运行它时遇到了一些问题。

要安装Solr我正在使用本指南:Solr Install

在runnig /opt/solr# java -jar start.jar之后没有太多事情发生。

7688 [searcherExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  – QuerySenderListener done.
7688 [searcherExecutor-5-thread-1] INFO  org.apache.solr.handler.component.SpellCheckComponent  – Loading spell index for spellchecker: default
7689 [searcherExecutor-5-thread-1] INFO  org.apache.solr.handler.component.SpellCheckComponent  – Loading spell index for spellchecker: wordbreak
7689 [searcherExecutor-5-thread-1] INFO  org.apache.solr.handler.component.SuggestComponent  – Loading suggester index for: mySuggester
7691 [searcherExecutor-5-thread-1] INFO  org.apache.solr.spelling.suggest.SolrSuggester  – reload()
7692 [searcherExecutor-5-thread-1] INFO  org.apache.solr.spelling.suggest.SolrSuggester  – build()
7723 [searcherExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  – [collection1] Registered new searcher Searcher@689e8096[collection1] main{StandardDirectoryReader(segments_1:1:nrt)}

它注册了一个新的搜索者,但是http://192.168.0.109:8983/solr没有运行...我得到ERR_CONNECTION_TIMED_OUT有什么想法吗? Apache的默认欢迎页面工作正常。我在Oracle VM VirtualBox上运行它

现在我已尝试使用本指南:https://lucene.apache.org/solr/guide/7_0/installing-solr.html

这就是我所做的:

solr@hubert:~/solr/solr-7.3.0$ bin/solr start
*** [WARN] *** Your open file limit is currently 1024.
 It should be set to 65000 to avoid operational disruption.
 If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
*** [WARN] ***  Your Max Processes Limit is currently 7842.
 It should be set to 65000 to avoid operational disruption.
 If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
Waiting up to 180 seconds to see Solr running on port 8983 [\]
Started Solr server on port 8983 (pid=3113). Happy searching!
                                                                                                                                                               solr@hubert:~/solr/solr-7.3.0$ bin/solr status

Found 1 Solr nodes:

Solr process 3113 running on port 8983
{
  "solr_home":"/home/solr/solr/solr-7.3.0/server/solr",
  "version":"7.3.0 98a6b3d642928b1ac9076c6c5a369472581f7633 - woody - 2018-03-28 14:37:45",
  "startTime":"2018-05-12T12:36:27.502Z",
  "uptime":"0 days, 0 hours, 0 minutes, 12 seconds",
  "memory":"26.1 MB (%5.3) of 490.7 MB"}

solr@hubert:~/solr/solr-7.3.0$ ps -ef | grep solr
solr      2430     1  0 14:33 ?        00:00:00 /lib/systemd/systemd --user
solr      2432  2430  0 14:33 ?        00:00:00 (sd-pam)
solr      2439  1336  0 14:33 tty1     00:00:00 -bash
root      2902  2887  0 14:35 pts/0    00:00:00 sudo su - solr
root      2903  2902  0 14:35 pts/0    00:00:00 su - solr
solr      2904  2903  0 14:35 pts/0    00:00:00 -su
solr      3113     1 39 14:36 pts/0    00:00:06 /usr/lib/jvm/java-8-oracle/bin/java -server -Xms512m -Xmx512m -XX:NewRatio=3 -XX:SurvivorRatio=4 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=8 -XX:+UseConcMarkSweepGC -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:/home/solr/solr/solr-7.3.0/server/logs/solr_gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=9 -XX:GCLogFileSize=20M -Dsolr.log.dir=/home/solr/solr/solr-7.3.0/server/logs -Djetty.port=8983 -DSTOP.PORT=7983 -DSTOP.KEY=solrrocks -Duser.timezone=UTC -Djetty.home=/home/solr/solr/solr-7.3.0/server -Dsolr.solr.home=/home/solr/solr/solr-7.3.0/server/solr -Dsolr.data.home= -Dsolr.install.dir=/home/solr/solr/solr-7.3.0 -Dsolr.default.confdir=/home/solr/solr/solr-7.3.0/server/solr/configsets/_default/conf -Xss256k -Dsolr.jetty.https.port=8983 -Dsolr.log.muteconsole -XX:OnOutOfMemoryError=/home/solr/solr/solr-7.3.0/bin/oom_solr.sh 8983 /home/solr/solr/solr-7.3.0/server/logs -jar start.jar --module=http
solr      3260  2904  0 14:36 pts/0    00:00:00 ps -ef
solr      3261  2904  0 14:36 pts/0    00:00:00 grep --color=auto solr

一切似乎都很好,但我仍然无法在http://192.168.0.109:8983/solr运行我的Solr控制台(正如我所说,默认的apache网站运行正常)

solr@hubert:~/solr/solr-7.3.0$ java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

solr@hubert:~/solr/solr-7.3.0$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"

1 个答案:

答案 0 :(得分:0)

ssh hubert@hubert -L 8983:192.168.0.109:8983 -p22

此命令和重启服务器解决了我的问题