【问题标题】:Solr on Glassfish with Error 503带有错误 503 的 Glassfish 上的 Solr
【发布时间】:2013-04-20 15:28:00
【问题描述】:

我是 Solr 的新手,我使用 Solr 示例中的 example-DIH 的编辑版本。使用 start.jar(Solr 的 Jetty 容器)一切正常。但现在我想在我的本地主机 Glassfish 3.1.2.2 上运行它。 Solr 是 4.2.1

从这里开始

http://wiki.apache.org/solr/SolrGlassfish

我在服务器/属性中添加了属性

solr.data.dir with value C:/solr/example/example-DIH/solr/db/data

solr.solr.home with value  C:/solr/example/example-DIH/solr

我重新启动服务器并部署了 solr-4.2.1.war(在 C:\solr\dist 中找到)。但是当我启动它时,Glassfish 说的是HTTP Status 503 - Server is shutting down

我检查了日志

[#|2013-04-26T13:38:50.313+0200|INFO|glassfish3.1.2|org.glassfish.admingui|_ThreadID=113;_ThreadName=Thread-2;|uploadFileName=solr-4.2.1.war |#]

[#|2013-04-26T13:38:51.864+0200|警告|glassfish3.1.2|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=83;_ThreadName=Thread- 2;|DPL8007: 不支持的部署描述符元素 schemaLocation 值 http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd|#]

[#|2013-04-26T13:38:51.865+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=83;_ThreadName=Thread- 2;|DPL8006: 获取/添加描述符失败:filter-dispatched-requests-enabled TO 假|#]

[#|2013-04-26T13:38:52.816+0200|INFO|glassfish3.1.2|org.apache.solr.servlet.SolrDispatchFilter|_ThreadID=83;_ThreadName=Thread-2;|SolrDispatchFilter.init() |#]

[#|2013-04-26T13:38:52.864+0200|INFO|glassfish3.1.2|org.apache.solr.core.SolrResourceLoader|_ThreadID=83;_ThreadName=Thread-2;|否 JNDI 中的 /solr/home|#]

[#|2013-04-26T13:38:52.864+0200|INFO|glassfish3.1.2|org.apache.solr.core.SolrResourceLoader|_ThreadID=83;_ThreadName=Thread-2;|使用 系统属性 solr.solr.home: C:/solr/example/example-DIH/solr|#]

[#|2013-04-26T13:38:52.895+0200|INFO|glassfish3.1.2|org.apache.solr.core.CoreContainer|_ThreadID=83;_ThreadName=Thread-2;|正在寻找 对于 solr.xml:C:\solr\example\example-DIH\solr\solr.xml|#]

[#|2013-04-26T13:38:52.899+0200|INFO|glassfish3.1.2|org.apache.solr.core.CoreContainer|_ThreadID=83;_ThreadName=Thread-2;|新 核心容器 1748362605|#]

[#|2013-04-26T13:38:52.904+0200|INFO|glassfish3.1.2|org.apache.solr.core.CoreContainer|_ThreadID=83;_ThreadName=Thread-2;|正在加载 CoreContainer 使用 Solr Home: 'C:/solr/example/example-DIH/solr\'|#]

[#|2013-04-26T13:38:52.905+0200|INFO|glassfish3.1.2|org.apache.solr.core.SolrResourceLoader|_ThreadID=83;_ThreadName=Thread-2;|new SolrResourceLoader 用于目录: 'C:/solr/example/example-DIH/solr\'|#]

[#|2013-04-26T13:38:53.604+0200|INFO|glassfish3.1.2|org.apache.solr.handler.component.HttpShardHandlerFactory|_ThreadID=83;_ThreadName=Thread-2;|设置 socketTimeout to: 0|#]

[#|2013-04-26T13:38:53.605+0200|INFO|glassfish3.1.2|org.apache.solr.handler.component.HttpShardHandlerFactory|_ThreadID=83;_ThreadName=Thread-2;|设置 urlScheme 到:http://|#]

[#|2013-04-26T13:38:53.605+0200|INFO|glassfish3.1.2|org.apache.solr.handler.component.HttpShardHandlerFactory|_ThreadID=83;_ThreadName=Thread-2;|设置 connTimeout to: 0|#]

[#|2013-04-26T13:38:53.605+0200|INFO|glassfish3.1.2|org.apache.solr.handler.component.HttpShardHandlerFactory|_ThreadID=83;_ThreadName=Thread-2;|设置 maxConnectionsPerHost 到:20|#]

[#|2013-04-26T13:38:53.606+0200|INFO|glassfish3.1.2|org.apache.solr.handler.component.HttpShardHandlerFactory|_ThreadID=83;_ThreadName=Thread-2;|设置 corePoolSize 为:0|#]

[#|2013-04-26T13:38:53.606+0200|INFO|glassfish3.1.2|org.apache.solr.handler.component.HttpShardHandlerFactory|_ThreadID=83;_ThreadName=Thread-2;|设置 最大池大小为:2147483647|#]

[#|2013-04-26T13:38:53.607+0200|INFO|glassfish3.1.2|org.apache.solr.handler.component.HttpShardHandlerFactory|_ThreadID=83;_ThreadName=Thread-2;|设置 maxThreadIdleTime 到:5|#]

[#|2013-04-26T13:38:53.607+0200|INFO|glassfish3.1.2|org.apache.solr.handler.component.HttpShardHandlerFactory|_ThreadID=83;_ThreadName=Thread-2;|设置 sizeOfQueue 到:-1|#]

[#|2013-04-26T13:38:53.608+0200|INFO|glassfish3.1.2|org.apache.solr.handler.component.HttpShardHandlerFactory|_ThreadID=83;_ThreadName=Thread-2;|设置 fairnessPolicy to: false|#]

[#|2013-04-26T13:38:53.643+0200|INFO|glassfish3.1.2|org.apache.solr.client.solrj.impl.HttpClientUtil|_ThreadID=83;_ThreadName=Thread-2;|正在创建新的http客户端,config:maxConnectionsPerHost=20&maxConnections=10000&socketTimeout=0&connTimeout=0&retry=false|#]

[#|2013-04-26T13:38:53.791+0200|SEVERE|glassfish3.1.2|org.apache.solr.servlet.SolrDispatchFilter|_ThreadID=83;_ThreadName=Thread-2;|无法启动 Solr。检查 solr/home 属性和日志|#]

我知道 Solr 没有启动,但我不知道为什么。是不是我设置错了?

【问题讨论】:

    标签: solr glassfish-3


    【解决方案1】:

    看起来 Glassfishs 密钥文件有问题。您可以尝试通过将这些特定的 JVM 参数添加到 Glassfish 配置来提供密码:

    -Djavax.net.ssl.keyStorePassword=changeit
    -Djavax.net.ssl.trustStorePassword=changeit
    

    您也可以使用 asadmin 执行此操作:

    asadmin create-jvm-options -Djavax.net.ssl.keyStorePassword=changeit
    asadmin create-jvm-options -Djavax.net.ssl.trustStorePassword=changeit
    

    我自己尝试过,但 Glassfish 随后引发了与某些缺失依赖项相关的其他错误。
    解决这些问题会导致其他问题... :(

    【讨论】:

    • 我很惊讶,这解决了我的问题:) 非常感谢。我只是好奇,密钥库和信任库密码与 Solr 有什么关系?我一直在使用 SSL 来制作我自己的自签名证书,而我的其他应用程序不需要在我的服务器上设置它
    • 难以置信。有效。解决了我在新 glassfish 4 和新 glassfish 3.x 安装上相同的问题。就像一个魅力!
    猜你喜欢
    • 2015-05-21
    • 2012-03-22
    • 1970-01-01
    • 2013-12-03
    • 1970-01-01
    • 2015-10-09
    • 2017-07-23
    • 2011-03-22
    • 1970-01-01
    相关资源
    最近更新 更多