corenlp专用服务器,拒绝与本地服务器的连接

如何解决corenlp专用服务器,拒绝与本地服务器的连接

我遵循了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配置和端口配置,但是服务器似乎没有通过终端呼叫连接。

在检查“ stderr.log”文件时,它给了我提示

[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 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?