1

这是我们大约一年前开始看到的一个奇怪的错误。起初,我只是偶尔在我的开发机器上注意到它,但现在它开始出现在生产中,这是有问题的。

我们在生产环境中使用 Ubuntu (11.04) 和 Mono 2.6.7(我也可以使用 Mono 2.10.x 进行复制),在 apache 内部使用 mod_mono。

基本上,有时(很难重现),当 apache 启动应用程序时,SolrNet 决定将其传输到 solr 服务器的整个 URL 小写。如果应用程序处于这种状态,它会一直保持这种状态,直到重新启动(有时需要重新启动几次才能清除。)我们可能会进行 20 到 50 次或更多次重新启动,而不会出现此问题。或者有时它会每 2 或 3 次发生一次。

一个好的网址如下所示:

INFO: [] webapp=/solr path=/select params={sort=Creative.PromotionalScore+desc&start=0&q=*:*&?=&qt=standard&fq={!tag%3DCreative.GalleryReviewStatus}Creative.GalleryReviewStatus:Approved&fq={!tag%3DCreative.SectionIncludedTarget}Creative.SectionIncludedTarget:220358+OR+(NOT+Creative.SectionIncludedTarget:[*+TO+*]+*:*)&fq={!tag%3DActive}Active:true&fq={!tag%3DCreative.ShowInGallery}Creative.ShowInGallery:true&fq={!tag%3DCreative.Size}Creative.Size:"Rectangle"&fq={!tag%3DRecordType}RecordType:FiveToOne.Gallery.Rmx.Creative&rows=12} 

错误的网址如下所示:

http://solrServer:8080/solr/select?qt=standard&fq=%7b!tag%3dcreative.galleryreviewstatus%7dcreative.galleryreviewstatus%3aapproved&fq=%7b!tag%3dcreative.sectionincludedtarget%7dcreative.sectionincludedtarget%3a306433+or+(not+creative.sectionincludedtarget%3a%5b*+to+*%5d+*%3a*)&fq=%7b!tag%3dactive%7dactive%3atrue&fq=%7b!tag%3dcreative.showingallery%7dcreative.showingallery%3atrue&fq=%7b!tag%3dcreative.size%7dcreative.size%3a%22rectangle%22&fq=%7b!tag%3drecordtype%7drecordtype%3afivetoone.gallery.rmx.creative&sort=creative.promotionalscore+desc&rows=18&start=0&q=*%3a*&?

(首先,我很抱歉,这两个 URL 是从管道的不同阶段提取的,我目前可以访问所有这些。)

当错误的 url 被提交时,Solr 抛出一个致命的异常,抱怨一个未知的字段:

HTTP Status 400 - can not sort on undefined field: creative.promotionalscore

type Status report

message can not sort on undefined field: creative.promotionalscore

description The request sent by the client was syntactically incorrect (can not sort on undefined field: creative.promotionalscore).
4

1 回答 1

0

在生产环境中使用 Solr 和 SolrNet 已经四年了,我只能说我从未在 .NET 上见过这个,所以我猜这是 Mono 中的一个错误。

为了查明 URL 变成小写字母的确切位置,我会放置几个日志记录点,例如hereherehere

在这个日志记录到位后,一旦出现错误,就应该分析日志,应该对日志进行细化等,直到找到错误的确切来源。

希望然后可以复制,报告,修复错误等。

于 2011-08-18T20:57:03.960 回答