已安装jdk1.8 solr 启动失败,显示failed to run command 'java'
- Dominant language
- C++
- Stars
- 2.6k
- Forks
- 657
- PR merge metrics
- No merged PRs in 30d
Description
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:
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:
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:
upload file success
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with solr_script/anyq_solr.sh and solr_script/solr_deply.sh, especially line 54, then inspect the Python calls in solr_script/solr_api.py and solr_tools.py. Reproduce the command from the report and verify why java is unavailable to the script. Done means Solr starts on port 8902 and the schema, document-clearing, and upload requests no longer fail with connection refused.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, python, shell
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100