gpt4 book ai didi

windows - Apache Tika 在 Windows 10 中安装失败

转载 作者:可可西里 更新时间:2023-11-01 11:49:01 25 4
gpt4 key购买 nike

我已经下载了 tikka.jar 文件并在运行以下命令后

java -jar tika.jar

我收到以下错误

Feb 09, 2016 11:30:09 AM org.apache.tika.server.TikaServerCli main
INFO: Starting Apache Tika 1.11 server
Feb 09, 2016 11:30:09 AM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be http://localhost:9998/
Feb 09, 2016 11:30:09 AM org.slf4j.impl.JCLLoggerAdapter info
INFO: jetty-8.y.z-SNAPSHOT
Feb 09, 2016 11:30:09 AM org.slf4j.impl.JCLLoggerAdapter warn
WARNING: FAILED SelectChannelConnector@localhost:9998: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.Server.doStart(Server.java:293)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:417)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:179)
at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:49)
at org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:95)
at org.apache.cxf.jaxrs.JAXRSBindingFactory.addListener(JAXRSBindingFactory.java:88)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:123)
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:206)
at org.apache.tika.server.TikaServerCli.main(TikaServerCli.java:213)

Feb 09, 2016 11:30:09 AM org.slf4j.impl.JCLLoggerAdapter warn
WARNING: FAILED org.eclipse.jetty.server.Server@6973bf95: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.Server.doStart(Server.java:293)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:417)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:179)
at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:49)
at org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:95)
at org.apache.cxf.jaxrs.JAXRSBindingFactory.addListener(JAXRSBindingFactory.java:88)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:123)
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:206)
at org.apache.tika.server.TikaServerCli.main(TikaServerCli.java:213)

Feb 09, 2016 11:30:09 AM org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine addServant
SEVERE: Could not start Jetty server on port 9,998: Address already in use: bind
Feb 09, 2016 11:30:10 AM org.apache.tika.server.TikaServerCli main
SEVERE: Can't start
org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:219)
at org.apache.tika.server.TikaServerCli.main(TikaServerCli.java:213)
Caused by: org.apache.cxf.interceptor.Fault: Could not start Jetty server on port 9,998: Address already in use: bind
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:428)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:179)
at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:49)
at org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:95)
at org.apache.cxf.jaxrs.JAXRSBindingFactory.addListener(JAXRSBindingFactory.java:88)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:123)
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:206)
... 1 more
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.Server.doStart(Server.java:293)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:417)
... 7 more

当我检查时,TCP 使用相同的端口

TCP    127.0.0.1:9998         0.0.0.0:0              LISTENING

为了安装 apache tika,我如何将 9998 端口号更改为其他端口号?

最佳答案

首先,与大多数事情一样,使用 --help 选项运行 Apache Tika Server 以了解它支持什么!你会得到这样的东西:

org.apache.tika.server.TikaServerCli main
INFO: Starting Apache Tika 1.12-SNAPSHOT server
usage: tikaserver
-?,--help this help message
-c,--config <arg> Tika Configuration file to override
default config with.
-C,--cors <arg> origin allowed to make CORS requests
(default=NONE)
all allowed if "all"
-d,--digest <arg> include digest in metadata, e.g.
md5,sha256
-dml,--digestMarkLimit <arg> max number of bytes to mark on stream for
digest
-h,--host <arg> host name (default = localhost, use * for
all)
-l,--log <arg> request URI log level ('debug' or 'info')
-p,--port <arg> listen port (default = 9998)
-s,--includeStack whether or not to return a stack trace
if there is an exception during 'parse'

从那里,您会看到标题巧妙的 --port-p 选项将允许您更改使用的端口(谁会想到? )

因此,在确定了一个合适的端口后,例如 9999,重新运行 Tika 服务器

java -jar tika-server-1.11.jar --port 9999

关于windows - Apache Tika 在 Windows 10 中安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35286183/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com