我在独立的tomcat服务器上部署了broadleaf演示站点,mysql作为后端和独立的solr服务器。我可以访问8983端口上的solr服务器。我看到我的核心在http://localhost:8983/solr/#/catalog和catalog_reindex处可用(请注意url中的哈希值)。我将common-shared.properties文件更改为指向正确的URL,但是当我尝试访问SiteApplication时,出现以下错误
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 405 HTTP method POST is not supported by this URL</title>
</head>
<body><h2>HTTP ERROR 405</h2>
<p>Problem accessing /solr/index.html. Reason:
<pre> HTTP method POST is not supported by this URL</pre></p>
</body>
</html>
&#13;
在此之后我扩展了SolrSearchServiceImpl并将请求方法更改为GET但现在我收到错误预期的mime类型application / octet-stream但是得到了text / html。并且作为响应我得到了一个html没有详细原因的回应。
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html ng-app="solrAdminApp">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<head>
<title>Solr Admin</title>
<link rel="icon" type="image/x-icon" href="img/favicon.ico?_=6.2.1">
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/common.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/analysis.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/cloud.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/cores.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/collections.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/dashboard.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/dataimport.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/files.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/index.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/styles/java-properties.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/logging.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/menu.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/plugins.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/documents.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/query.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/stream.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/replication.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/schema.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/segments.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/threads.css?_=6.2.1">
<link rel="stylesheet" type="text/css" href="css/angular/chosen.css?_=6.2.1">
<meta http-equiv="x-ua-compatible" content="IE=9">
<script src="libs/jquery-2.1.3.min.js"></script>
<script src="libs/chosen.jquery.js"></script>
<script src="libs/jquery.jstree.js"></script>
<script src="libs/angular.js"></script>
<script src="libs/angular-chosen.js"></script>
<script src="libs/angular-resource.min.js"></script>
<script src="libs/angular-route.min.js"></script>
<script src="libs/angular-cookies.min.js"></script>
<script src="libs/ngtimeago.js"></script>
<script src="libs/highlight.js"></script>
<script src="libs/d3.js"></script>
<script src="js/angular/app.js"></script>
<script src="js/angular/services.js"></script>
<script src="js/angular/controllers/index.js"></script>
<script src="js/angular/controllers/logging.js"></script>
<script src="js/angular/controllers/cloud.js"></script>
<script src="js/angular/controllers/collections.js"></script>
<script src="js/angular/controllers/cores.js"></script>
<script src="js/angular/controllers/threads.js"></script>
<script src="js/angular/controllers/java-properties.js"></script>
<script src="js/angular/controllers/core-overview.js"></script>
<script src="js/angular/controllers/collection-overview.js"></script>
<script src="js/angular/controllers/analysis.js"></script>
<script src="js/angular/controllers/dataimport.js"></script>
<script src="js/angular/controllers/documents.js"></script>
<script src="js/angular/controllers/files.js"></script>
<script src="js/angular/controllers/query.js"></script>
<script src="js/angular/controllers/stream.js"></script>
<script src="js/angular/controllers/plugins.js"></script>
<script src="js/angular/controllers/replication.js"></script>
<script src="js/angular/controllers/schema.js"></script>
<script src="js/angular/controllers/segments.js"></script>
</head>
<body ng-controller="MainController">
<div id="wrapper" scrollable-when-small>
<div id="header">
<a href="./" id="solr"><span>Apache SOLR</span></a>
<p id="environment"> </p>
</div>
<div id="main" class="clearfix">
<div class="header-message" id="init-failures" ng-show="showInitFailures">
<h2>SolrCore Initialization Failures</h2>
<ul>
<li ng-repeat="(core,error) in initFailures"><strong>{{core}}:</strong> {{error}}</li>
</ul>
<p>Please check your logs for more information</p>
</div>
<div id="loading" class="loader universal-loader" loading-status-message> </div>
<div id="connection-box" connection-message>
<div id="connection-status-modal">
</div>
<div class="connection-status header-message">
<h2>Connection to Solr lost</h2>
<p>Please check the Solr instance.</p>
</div>
<div class="connection-status header-message" id="connection-status-recovered" ng-show="connectionRecovered">
<h2>Connection recovered...</h2>
<p>Continuing to load data...</p>
</div>
</div>
<div id="http-exception" class="header-message" ng-repeat="(url, exception) in exceptions">
<div class="exception">{{exception.msg}}</div>
</div>
<div class="other-ui-link">
Use <a class="ul" href="/solr/old.html">original UI</a><a target="_blank" href="http://wiki.apache.org/solr/AngularUI"> <span class="help"></span></a>
</div>
<div id="content-wrapper">
<div ng-view id="content">
</div>
</div>
<div id="menu-wrapper">
<div>
<ul id="menu">
<li id="index" class="global" ng-class="{active:page=='index'}"><p><a href="#/">Dashboard</a></p></li>
<li id="logging" class="global" ng-class="{active:page=='logging'}"><p><a href="#/~logging">Logging</a></p>
<ul ng-show="showingLogging">
<li class="level" ng-class="{active:page=='logging-levels'}"><a href="#/~logging/level">Level</a></li>
</ul>
</li>
<li id="cloud" class="global optional" ng-show="isCloudEnabled" ng-class="{active:showingCloud}"><p><a href="#/~cloud">Cloud</a></p>
<ul ng-show="showingCloud">
<li class="tree" ng-class="{active:page=='cloud-tree'}"><a href="#/~cloud?view=tree">Tree</a></li>
<li class="graph" ng-class="{active:page=='cloud-graph'}"><a href="#/~cloud">Graph</a></li>
<li class="rgraph" ng-class="{active:page=='cloud-rgraph'}"><a href="#/~cloud?view=rgraph">Graph (Radial)</a></li>
<li class="dump" ng-class="{active:page=='cloud-dump'}"><a ng-click="dumpCloud()">Dump</a></li>
</ul>
</li>
<li ng-show="isCloudEnabled" id="collections" class="global" ng-class="{active:page=='collections'}"><p><a href="#/~collections">Collections</a></p></li>
<li ng-hide="isCloudEnabled" id="cores" class="global" ng-class="{active:page=='cores'}"><p><a href="#/~cores">Core Admin</a></p></li>
<li id="java-properties" class="global" ng-class="{active:page=='java-props'}"><p><a href="#/~java-properties">Java Properties</a></li>
<li id="threads" class="global" ng-class="{active:page=='threads'}"><p><a href="#/~threads">Thread Dump</a></p></li>
</ul>
<div id="collection-selector" ng-show="isCloudEnabled">
<div id="has-collections" ng-show="collections.length!=0">
<select data-placeholder="Collection Selector"
ng-model="currentCollection"
chosen
ng-change="showCollection(currentCollection)"
ng-options="collection.name for collection in collections"></select>
</div>
<p id="has-no-collections" ng-show="collections.length==0"><a href="#/~collections">
No collections available
<span>Go and create one</span>
</a></p>
</div>
<div id="collection-menu" class="sub-menu" ng-show="currentCollection">
<ul>
<li class="overview" ng-class="{active:page=='collection-overview'}"><a href="#/{{currentCollection.name}}/collection-overview"><span>Overview</span></a></li>
<li class="analysis" ng-class="{active:page=='analysis'}"><a href="#/{{currentCollection.name}}/analysis"><span>Analysis</span></a></li>
<li class="dataimport" ng-class="{active:page=='dataimport'}"><a href="#/{{currentCollection.name}}/dataimport"><span>Dataimport</span></a></li>
<li class="documents" ng-class="{active:page=='documents'}"><a href="#/{{currentCollection.name}}/documents"><span>Documents</span></a></li>
<li class="files" ng-class="{active:page=='files'}"><a href="#/{{currentCollection.name}}/files"><span>Files</span></a></li>
<li class="query" ng-class="{active:page=='query'}"><a href="#/{{currentCollection.name}}/query"><span>Query</span></a></li>
<li class="stream" ng-class="{active:page=='stream'}"><a href="#/{{currentCollection.name}}/stream"><span>Stream</span></a></li>
<li class="schema" ng-class="{active:page=='schema'}"><a href="#/{{currentCollection.name}}/schema"><span>Schema</span></a></li>
</ul>
</div>
<div id="core-selector">
<div id="has-cores" ng-show="cores.length!=0">
<select data-placeholder="Core Selector"
ng-model="currentCore"
chosen
ng-change="showCore(currentCore)"
ng-options="core.name for core in cores"></select>
</div>
<p id="has-no-cores" ng-show="cores.length==0"><a href="#/~cores">
No cores available
<span>Go and create one</span>
</a></p>
</div>
<div id="core-menu" class="sub-menu" ng-show="currentCore">
<ul>
<li class="overview" ng-class="{active:page=='overview'}"><a href="#/{{currentCore.name}}"><span>Overview</span></a></li>
<li ng-hide="isCloudEnabled" class="analysis" ng-class="{active:page=='analysis'}"><a href="#/{{currentCore.name}}/analysis"><span>Analysis</span></a></li>
<li ng-hide="isCloudEnabled" class="dataimport" ng-class="{active:page=='dataimport'}"><a href="#/{{currentCore.name}}/dataimport"><span>Dataimport</span></a></li>
<li ng-hide="isCloudEnabled" class="documents" ng-class="{active:page=='documents'}"><a href="#/{{currentCore.name}}/documents"><span>Documents</span></a></li>
<li ng-hide="isCloudEnabled" class="files" ng-class="{active:page=='files'}"><a href="#/{{currentCore.name}}/files"><span>Files</span></a></li>
<li class="ping" ng-class="{active:page=='ping'}"><a ng-click="ping()"><span>Ping</span><small class="qtime" ng-show="showPing"> (<span>{{pingMS}}ms</span>)</small></a></li>
<li class="plugins" ng-class="{active:page=='plugins'}"><a href="#/{{currentCore.name}}/plugins"><span>Plugins / Stats</span></a></li>
<li ng-hide="isCloudEnabled" class="query" ng-class="{active:page=='query'}"><a href="#/{{currentCore.name}}/query"><span>Query</span></a></li>
<li ng-hide="isCloudEnabled" class="replication" ng-class="{active:page=='replication'}"><a href="#/{{currentCore.name}}/replication"><span>Replication</span></a></li>
<li ng-hide="isCloudEnabled" class="schema" ng-class="{active:page=='schema'}"><a href="#/{{currentCore.name}}/schema"><span>Schema</span></a></li>
<li class="segments" ng-class="{active:page=='segments'}"><a href="#/{{currentCore.name}}/segments"><span>Segments info</span></a></li>
</ul>
</div>
</div>
</div>
<div id="meta">
<ul>
<li class="documentation"><a href="http://lucene.apache.org/solr/"><span>Documentation</span></a></li>
<li class="issues"><a href="http://issues.apache.org/jira/browse/SOLR"><span>Issue Tracker</span></a></li>
<li class="irc"><a href="http://webchat.freenode.net/?channels=#solr"><span>IRC Channel</span></a></li>
<li class="mailinglist"><a href="http://wiki.apache.org/solr/UsingMailingLists"><span>Community forum</span></a></li>
<li class="wiki-query-syntax"><a href="https://cwiki.apache.org/confluence/display/solr/Query+Syntax+and+Parsing"><span>Solr Query Syntax</span></a></li>
</ul>
</div>
</div>
</div>
</body>
</html>
&#13;
我的SOLR版本是6.2.1,而Broadleaf版本是5.2.1
答案 0 :(得分:2)
这与Solr中的索引阶段有关。
我敢打赌,如果您查看Solr日志,您会发现一些错误(例如,缺少必填字段,非多值字段的多个值)
Andrea
P.S。我不了解Broadleaf的商务,但是你应该在管理面板中配置的URL不应该有#符号,这只在管理控制台中有效,这是使用AngularJS实现的(这是#s; s URL之所以如此)