请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

elasticsearch-rft 在mac安装的时候遇到错误

 我把包给git下来以后

git clone https://github.com/jqlts1/elasticsearch-rtf

按照提示进入文件夹,然后运行

cd elasticsearch/bin
./elasticsearch

最后在运行

sudo -u ops ES_JAVA_OPTS="-Xms2024m -Xmx2024m"  ./bin/elasticsearch  -d

的时候,出现了如下错误

sudo: unknown user: ops

sudo: unable to initialize policy plugin

请问这是为什么?

正在回答 回答被采纳积分+3

2回答

bobby 2017-05-08 09:25:17

根据错误提示是没有文件的访问权限, 你试试用sudo命令启动 或者将es放到一个当前用户有访问权限的目录下启动试试

0 回复 有任何疑惑可以回复我~
提问者 jqlts1 2017-05-06 09:21:13

java也安装好

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)


然后运行./elasticsearch会提示

[2017-05-06T09:18:55,545][INFO ][o.e.n.Node               ] [] initializing ...
[2017-05-06T09:18:55,704][INFO ][o.e.e.NodeEnvironment    ] [5y6SWh3] using [1] data paths, mounts [[/ (/dev/disk1)]], net usable_space [27.8gb], net total_space [232.6gb], spins? [unknown], types [hfs]
[2017-05-06T09:18:55,704][INFO ][o.e.e.NodeEnvironment    ] [5y6SWh3] heap size [1.9gb], compressed ordinary object pointers [true]
[2017-05-06T09:18:55,707][INFO ][o.e.n.Node               ] node name [5y6SWh3] derived from node ID [5y6SWh3ZTEOAkZaVgtoNvw]; set [node.name] to override
[2017-05-06T09:18:55,712][INFO ][o.e.n.Node               ] version[5.1.1], pid[76529], build[5395e21/2016-12-06T12:36:15.409Z], OS[Mac OS X/10.12.4/x86_64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_131/25.131-b11]
[2017-05-06T09:18:57,700][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: ElasticsearchException[Failed to load plugin class [org.elasticsearch.plugin.analysis.mmseg.AnalysisMMsegPlugin]]; nested: InvocationTargetException; nested: AccessControlException[access denied ("java.io.FilePermission" "/Users/fish/%E5%BF%AB%E7%9B%98/python/mokescrapy/elasticsearch/elasticsearch-5.1.1/plugins/analysis-mmseg/config/mmseg/chars.dic" "read")];
	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.elasticsearch.ElasticsearchException: Failed to load plugin class [org.elasticsearch.plugin.analysis.mmseg.AnalysisMMsegPlugin]
	at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:384) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:336) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:132) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.node.Node.<init>(Node.java:294) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.node.Node.<init>(Node.java:229) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.bootstrap.Bootstrap$6.<init>(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
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_131]
	at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:376) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:336) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:132) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.node.Node.<init>(Node.java:294) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.node.Node.<init>(Node.java:229) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.bootstrap.Bootstrap$6.<init>(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
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/Users/fish/%E5%BF%AB%E7%9B%98/python/mokescrapy/elasticsearch/elasticsearch-5.1.1/plugins/analysis-mmseg/config/mmseg/chars.dic" "read")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_131]
	at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_131]
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_131]
	at java.lang.SecurityManager.checkRead(SecurityManager.java:888) ~[?:1.8.0_131]
	at java.io.File.exists(File.java:814) ~[?:1.8.0_131]
	at com.chenlb.mmseg4j.Dictionary.loadDic(Dictionary.java:158) ~[?:?]
	at com.chenlb.mmseg4j.Dictionary.reload(Dictionary.java:367) ~[?:?]
	at com.chenlb.mmseg4j.Dictionary.init(Dictionary.java:133) ~[?:?]
	at com.chenlb.mmseg4j.Dictionary.<init>(Dictionary.java:45) ~[?:?]
	at com.chenlb.mmseg4j.Dictionary.getInstance(Dictionary.java:84) ~[?:?]
	at com.chenlb.mmseg4j.Dictionary.getInstance(Dictionary.java:67) ~[?:?]
	at org.elasticsearch.plugin.analysis.mmseg.AnalysisMMsegPlugin.<init>(AnalysisMMsegPlugin.java:35) ~[?:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_131]
	at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:376) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:336) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:132) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.node.Node.<init>(Node.java:294) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.node.Node.<init>(Node.java:229) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.bootstrap.Bootstrap$6.<init>(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


0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信