我尝试按照official guide设置我自己的斯坦福CoreNLP服务器。但是,我不能够使用下面的命令来启动服务器:无法设置我自己的斯坦福CoreNLP服务器,出现错误“无法删除关机密钥文件”
java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000
我贴的错误信息如下:
my_server_name$ java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000
[main] INFO CoreNLP - --- StanfordCoreNLPServer#main() called ---
[main] INFO CoreNLP - setting default constituency parser
[main] INFO CoreNLP - warning: cannot find edu/stanford/nlp/models/srparser/englishSR.ser.gz
[main] INFO CoreNLP - using: edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz instead
[main] INFO CoreNLP - to use shift reduce parser download English models jar from:
[main] INFO CoreNLP - http://stanfordnlp.github.io/CoreNLP/download.html
Exception in thread "main" java.lang.IllegalStateException: Could not delete shutdown key file
at edu.stanford.nlp.pipeline.StanfordCoreNLPServer.<init>(StanfordCoreNLPServer.java:195)
at edu.stanford.nlp.pipeline.StanfordCoreNLPServer.main(StanfordCoreNLPServer.java:1323)
[Thread-0] INFO CoreNLP - CoreNLP Server is shutting down.
的主要问题是IllegalSstateException:无法删除关闭密钥文件。我只是想知道这个问题的原因是否是sudo访问。官方指南没有明确说明这个命令需要sudo访问。
我想问1)上述命令是否需要sudo访问和2)如果该命令不需要sudo访问,可能是IllegalSstateException的潜在错误。
谢谢。
PS:我在运行Ubuntu 16.04.3 LTS的服务器上运行。
谢谢您的回复。我无权删除/ tmp /下的任何文件。相反,我在启动服务器时自己设置了tmpdir。有用。谢谢你的回答。 –