gpt4 book ai didi

linux - 在 TomCat 6.x 上启动 Apache Solr 4.x 时出错 : java.net.UnknownHostException: hostname: hostname: Name or service not known

转载 作者:太空狗 更新时间:2023-10-29 11:22:17 27 4
gpt4 key购买 nike

在 Linux 上启动为 Apache Solr 4.x 配置的 tomcat6 服务时,如果有人可以帮助解决在 catalina.out 中记录的这个问题,我将不胜感激:

Mar 22, 2014 4:25:29 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Mar 22, 2014 4:25:29 PM org.apache.catalina.connector.Connector pause
SEVERE: Protocol handler pause failed
java.net.UnknownHostException: hostname: hostname: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:485)
at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:284)
at org.apache.jk.server.JkMain.pause(JkMain.java:725)
at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)
at org.apache.catalina.connector.Connector.pause(Connector.java:1022)
at org.apache.catalina.core.StandardService.stop(StandardService.java:563)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:643)
at org.apache.catalina.startup.Catalina.start(Catalina.java:618)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.net.UnknownHostException: hostname: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
at java.net.InetAddress.getLocalHost(InetAddress.java:1469)
... 15 more

Mar 22, 2014 4:25:30 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Mar 22, 2014 4:25:30 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Mar 22, 2014 4:25:30 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Mar 22, 2014 4:25:31 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 22, 2014 4:25:31 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 309 ms
Mar 22, 2014 4:25:31 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 22, 2014 4:25:31 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24
Mar 22, 2014 4:25:31 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor solr.xml
Mar 22, 2014 4:25:31 PM org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase /usr/share/tomcat6/webapps/solr.war inside the host appBase has been specified, and will be ignored
Mar 22, 2014 4:25:31 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Mar 22, 2014 4:25:31 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/solr] startup failed due to previous errors
Mar 22, 2014 4:25:31 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 22, 2014 4:25:31 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Mar 22, 2014 4:25:31 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/11 config=null
Mar 22, 2014 4:25:31 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 340 ms

我在服务器 (localhost) 上本地运行此配置。

最佳答案

希望你在 solr.xml 中有这样的东西

文件:solr.xml

<solr persistent="false">
<cores adminPath="/admin/cores" host="${host:}" hostPort="${jetty.port:8983}" hostContext="${hostContext:solr}">
<core name="someCoreName" instanceDir="someCoreDirectory" properties="conf/solrcore.properties"/>
<shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
<str name="urlScheme">${urlScheme:}</str>
</shardHandlerFactory>
</cores>
</solr>

文件:/etc/hosts

127.0.0.1       localhost

关于linux - 在 TomCat 6.x 上启动 Apache Solr 4.x 时出错 : java.net.UnknownHostException: hostname: hostname: Name or service not known,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22583914/

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