baidu / AnyQ

FAQ-based Question Answering System
Apache License 2.0
2.58k stars 672 forks source link

已安装jdk1.8 solr 启动失败,显示failed to run command 'java' #210

Open cztdaima opened 4 years ago

cztdaima commented 4 years ago

laoteng@ubuntu:/home/AnyQ/build$ sudo sh solr_script/anyq_solr.sh solr_script/sample_docs faq-file trans done nohup: appending output to 'nohup.out' nohup: failed to run command 'java': No such file or directory curl: (7) Failed to connect to localhost port 8902: Connection refused solr[8902] start failed! solr_script/solr_deply.sh: line 54: java: command not found [{'indexed': True, 'stored': True, 'type': 'text_multi_lang', 'name': 'question'}, {'indexed': False, 'stored': True, 'type': 'string', 'name': 'answer'}] Traceback (most recent call last): File "solr_script/solr_api.py", line 24, in solr_tools.set_engine_schema(sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5]) File "/home/AnyQ/build/solr_script/solr_tools.py", line 114, in set_engine_schema response = urllib2.urlopen(req, json.dumps(schema_config, ensure_ascii=False)) File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 429, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 447, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(args) File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 111] Connection refused> Traceback (most recent call last): File "solr_script/solr_api.py", line 30, in solr_tools.clear_documents(sys.argv[2], sys.argv[3], sys.argv[4]) File "/home/AnyQ/build/solr_script/solr_tools.py", line 216, in clear_documents response = urllib2.urlopen(req, urllib.urlencode(params)) File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 429, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 447, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(args) File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 111] Connection refused> Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.target(*self.args, *self.__kwargs) File "/home/AnyQ/build/solr_script/solr_tools.py", line 134, in thread_upload response = urllib2.urlopen(req, binary_data) File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 429, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 447, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(args) File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open raise URLError(err) URLError: <urlopen error [Errno 111] Connection refused>

upload file success

cztdaima commented 4 years ago

image

StarSky1 commented 3 years ago

@cztdaima 你好,我也遇到这个问题,请问如何解决啊

cztdaima commented 3 years ago

@cztdaima 你好,我也遇到这个问题,请问如何解决啊

这个问题的话,太久之前做的了。我大概记得最后是所以配置和别人的都一样,才安装成功。可以参考下这个文档https://www.jianshu.com/p/0647b27b9284?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

StarSky1 commented 3 years ago

好的,谢谢