-不幸的是,专用服务器的设置(在上一页的下面部分描述)并不是那么直接。到目前为止,我的服务器似乎在运行,但我无法从终端甚至浏览器调用它。
“sudo service corenlp status”导致
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,ssplit,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
当检查“标准日志“文件它给了我一个提示:
[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.(ServerImpl.java:100)
sun.net.httpserver.HttpServerImpl.(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)
非常感谢你的任何提示。。。谨致问候
马西