问题描述
我遵循了CoreNLP网站下的说明: https://stanfordnlp.github.io/CoreNLP/corenlp-server.html
-Standard-Port 9000下服务器的本地临时设置立即起作用。
-不幸的是,专用服务器的设置(如上页下部所述)并不那么简单。到目前为止,我的服务器似乎正在运行,但是我无法从终端甚至从浏览器中调用它。
“ sudo服务corenlp状态”结果
corenlp.service
Loaded: loaded (/etc/init.d/corenlp; generated)
Active: active (exited) since Sat 2020-10-24 01:07:05 CEST; 19min ago
Docs: man:systemd-sysv-generator(8)
Process: 16785 ExecStop=/etc/init.d/corenlp stop (code=exited,status=0/SUCCESS)
Process: 16832 ExecStart=/etc/init.d/corenlp start (code=exited,status=0/SUCCESS)
Okt 24 01:07:05 ubuntu-1804-nlp systemd[1]: Starting corenlp.service...
Okt 24 01:07:05 ubuntu-1804-nlp corenlp[16832]: CoreNLP server started.
Okt 24 01:07:05 ubuntu-1804-nlp systemd[1]: Started corenlp.service.
Okt 24 01:07:05 ubuntu-1804-nlp su[16834]: Successful su for nlp by root
Okt 24 01:07:05 ubuntu-1804-nlp su[16834]: + ??? root:nlp
Okt 24 01:07:05 ubuntu-1804-nlp su[16834]: pam_unix(su:session): session opened for user nlp by (uid=0)
现在,执行以下命令:
wget --post-data 'the quick brown fox jumped over the lazy dog' 'localhost:80/?properties={"annotators": "tokenize,ssplit,pos","outputFormat": "json"}' -O -
哪个导致拒绝连接:
--2020-10-24 01:46:38-- http://localhost/?properties=%7B%22annotators%22:%20%22tokenize,pos%22,%20%22outputFormat%22:%20%22json%22%7D
Auflösen des Hostnamens localhost (localhost) … ::1,127.0.0.1
Verbindungsaufbau zu localhost (localhost)|::1|:80 … fehlgeschlagen: Verbindungsaufbau abgelehnt.
Verbindungsaufbau zu localhost (localhost)|127.0.0.1|:80 … fehlgeschlagen: Verbindungsaufbau abgelehnt.
或者卷曲:
C:\curl>curl 192.168.113.26
curl: (7) Failed to connect to 192.168.113.26 port 80: Connection refused
到目前为止,我尝试了许多不同的URL配置和端口配置,但是服务器似乎没有通过终端呼叫连接。
[main] INFO CoreNLP - --- StanfordCoreNLPServer#main() called ---
[main] INFO CoreNLP - Server default properties:
(Note: unspecified annotator properties are English defaults)
inputFormat = text
outputFormat = json
prettyPrint = false
[main] INFO CoreNLP - Threads: 1
[main] INFO CoreNLP - Starting server...
[main] WARN CoreNLP - **java.net.socketException: Keine Berechtigung**
sun.nio.ch.Net.bind0(Native Method)
sun.nio.ch.Net.bind(Net.java:433)
sun.nio.ch.Net.bind(Net.java:425)
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220)
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85)
sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:100)
sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:50)
sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:35)
com.sun.net.httpserver.HttpServer.create(HttpServer.java:130)
edu.stanford.nlp.pipeline.StanfordCoreNLPServer.run(StanfordCoreNLPServer.java:1502)
有人看到缺少的部分吗?
非常感谢您提供任何提示...最好的问候 马西
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)