medcl / elasticsearch-rtf

elasticsearch中文发行版,针对中文集成了相关插件,方便新手学习测试.
Apache License 2.0
2.67k stars 715 forks source link

windows下运行elasticsearch.bat报错,不晓得是什么原因 #61

Closed JerryGreenLuan closed 7 years ago

JerryGreenLuan commented 7 years ago

[2017-08-17T11:37:24,676][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupException: Traceback (most recent call last): File "D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\site.py", line 585, in File "D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\site.py", line 567, in main File "D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\site.py", line 300, in addusersitepackages File "D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\site.py", line 289, in getusersitepackages File "D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py", line 416, in get_path File "D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py", line 407, in get_paths File "D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py", line 180, in _expand_vars File "D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py", line 154, in _subst_vars File "D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py", line 154, in _subst_vars UnicodeEncodeError: 'ascii' codec can't encode characters in position 9-10: ordinal not in range(128)

    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-5.1.1.jar:5.1.1]
    at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-5.1.1.jar:5.1.1]
    at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) ~[elasticsearch-5.1.1.jar:5.1.1]
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96) ~[elasticsearch-5.1.1.jar:5.1.1]
    at org.elasticsearch.cli.Command.main(Command.java:62) ~[elasticsearch-5.1.1.jar:5.1.1]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) ~[elasticsearch-5.1.1.jar:5.1.1]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) ~[elasticsearch-5.1.1.jar:5.1.1]

Caused by: org.python.core.PyException at org.python.core.codecs.strict_errors(codecs.java:208) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121] at org.python.core.JavaFunc.call(Py.java:2426) ~[?:?] at org.python.core.PyObject.call(PyObject.java:431) ~[?:?] at org.python.core.codecs.encoding_error(codecs.java:1538) ~[?:?] at org.python.core.codecs.PyUnicode_EncodeIntLimited(codecs.java:1211) ~[?:?] at org.python.core.codecs.PyUnicode_EncodeASCII(codecs.java:1170) ~[?:?] at org.python.core.codecs.encode(codecs.java:165) ~[?:?] at org.python.core.PyString.encode(PyString.java:3896) ~[?:?] at org.python.core.PyString.encode(PyString.java:3888) ~[?:?] at org.python.core.PyUnicode.unicode_str(PyUnicode.java:667) ~[?:?] at org.python.core.PyUnicode.str__(PyUnicode.java:662) ~[?:?] at org.python.core.PyString.buildFormattedString(PyString.java:4006) ~[?:?] at org.python.core.PyString.str_format(PyString.java:3941) ~[?:?] at org.python.core.PyString$str_format_exposer.call(Unknown Source) ~[?:?] at org.python.core.PyObject._callextra(PyObject.java:601) ~[?:?] at sysconfig$py._subst_vars$3(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py:159) ~[?:?] at sysconfig$py.call_function(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py) ~[?:?] at org.python.core.PyTableCode.call(PyTableCode.java:167) ~[?:?] at org.python.core.PyBaseCode.call(PyBaseCode.java:153) ~[?:?] at org.python.core.PyFunction.call(PyFunction.java:423) ~[?:?] at sysconfig$py._expand_vars$5(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py:181) ~[?:?] at sysconfig$py.call_function(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py) ~[?:?] at org.python.core.PyTableCode.call(PyTableCode.java:167) ~[?:?] at org.python.core.PyBaseCode.call(PyBaseCode.java:153) ~[?:?] at org.python.core.PyFunction.call(PyFunction.java:423) ~[?:?] at sysconfig$py.get_paths$17(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py:409) ~[?:?] at sysconfig$py.call_function(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py) ~[?:?] at org.python.core.PyTableCode.call(PyTableCode.java:167) ~[?:?] at org.python.core.PyBaseCode.call(PyBaseCode.java:170) ~[?:?] at org.python.core.PyFunction.call(PyFunction.java:434) ~[?:?] at sysconfig$py.get_path$18(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py:416) ~[?:?] at sysconfig$py.call_function(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\sysconfig.py) ~[?:?] at org.python.core.PyTableCode.call(PyTableCode.java:167) ~[?:?] at org.python.core.PyBaseCode.call(PyBaseCode.java:307) ~[?:?] at org.python.core.PyBaseCode.call(PyBaseCode.java:145) ~[?:?] at org.python.core.PyFunction.call(PyFunction.java:423) ~[?:?] at site$py.getusersitepackages$10(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\site.py:290) ~[?:?] at site$py.call_function(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\site.py) ~[?:?] at org.python.core.PyTableCode.call(PyTableCode.java:167) ~[?:?] at org.python.core.PyBaseCode.call(PyBaseCode.java:124) ~[?:?] at org.python.core.PyFunction.call(PyFunction.java:403) ~[?:?] at site$py.addusersitepackages$11(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\site.py:304) ~[?:?] at site$py.call_function(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\site.py) ~[?:?] at org.python.core.PyTableCode.call(PyTableCode.java:167) ~[?:?] at org.python.core.PyBaseCode.call(PyBaseCode.java:138) ~[?:?] at org.python.core.PyFunction.call(PyFunction.java:413) ~[?:?] at site$py.main$34(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\site.py:583) ~[?:?] at site$py.call_function(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\site.py) ~[?:?] at org.python.core.PyTableCode.call(PyTableCode.java:167) ~[?:?] at org.python.core.PyBaseCode.call(PyBaseCode.java:124) ~[?:?] at org.python.core.PyFunction.call(PyFunction.java:403) ~[?:?] at site$py.f$0(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\site.py:637) ~[?:?] at site$py.call_function(D:\wamp64\www\elasticsearch-rtf\plugins\lang-python\jython-standalone-2.7.0.jar\Lib\site.py) ~[?:?] at org.python.core.PyTableCode.call(PyTableCode.java:167) ~[?:?] at org.python.core.PyCode.call(PyCode.java:18) ~[?:?] at org.python.core.imp.createFromCode(imp.java:436) ~[?:?] at org.python.core.util.importer.importer_load_module(importer.java:109) ~[?:?] at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:163) ~[?:?] at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.call(Unknown Source) ~[?:?] at org.python.core.PyBuiltinMethodNarrow.call__(PyBuiltinMethodNarrow.java:46) ~[?:?] at org.python.core.imp.loadFromLoader(imp.java:587) ~[?:?] at org.python.core.imp.find_module(imp.java:537) ~[?:?] at org.python.core.imp.import_next(imp.java:840) ~[?:?] at org.python.core.imp.import_first(imp.java:861) ~[?:?] at org.python.core.imp.load(imp.java:716) ~[?:?] at org.python.core.Py.importSiteIfSelected(Py.java:1558) ~[?:?] at org.python.util.PythonInterpreter.(PythonInterpreter.java:116) ~[?:?] at org.python.util.PythonInterpreter.threadLocalStateInterpreter(PythonInterpreter.java:81) ~[?:?] at org.elasticsearch.script.python.PythonScriptEngineService$1.run(PythonScriptEngineService.java:77) ~[?:?] at org.elasticsearch.script.python.PythonScriptEngineService$1.run(PythonScriptEngineService.java:72) ~[?:?] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121] at org.elasticsearch.script.python.PythonScriptEngineService.(PythonScriptEngineService.java:72) ~[?:?] at org.elasticsearch.plugin.python.PythonPlugin.getScriptEngineService(PythonPlugin.java:33) ~[?:?] at org.elasticsearch.script.ScriptModule.lambda$create$1(ScriptModule.java:54) ~[elasticsearch-5.1.1.jar:5.1.1] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_121] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[?:1.8.0_121] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_121] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_121] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_121] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_121] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_121] at org.elasticsearch.script.ScriptModule.create(ScriptModule.java:55) ~[elasticsearch-5.1.1.jar:5.1.1] at org.elasticsearch.node.Node.(Node.java:319) ~[elasticsearch-5.1.1.jar:5.1.1] at org.elasticsearch.node.Node.(Node.java:229) ~[elasticsearch-5.1.1.jar:5.1.1] at org.elasticsearch.bootstrap.Bootstrap$6.(Bootstrap.java:214) ~[elasticsearch-5.1.1.jar:5.1.1] at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-5.1.1.jar:5.1.1] at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) ~[elasticsearch-5.1.1.jar:5.1.1] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.1.1.jar:5.1.1] ... 6 more

knktc commented 7 years ago

猜想,某个路径难道有中文啥的?

JerryGreenLuan commented 7 years ago

开始我也是这么想的,但是刚刚使用了其他电脑试了一下,也是有中文的路径,是可以成功的。很困惑...

knktc commented 7 years ago

不想再纠结的话就用终极大法,直接修改python的默认编码为utf-8再试试,google一下就有

medcl commented 7 years ago

把Python的插件去掉吧,如果用不到的话,建议手动安装,rtf仅供测试