小编Pet*_* K.的帖子

Solr 8.4.1 云:bin/post - 文件未找到问题

我是 Solr 的新手,一直在学习 8.4.0 的教程。在成功遵循使用 SolrCloud 的 techproducts 示例后,我现在尝试使用无模式方法来索引一些 PDF 文件。为此,我再次使用教程中的以下内容来索引存储在 ~/Documents/pdf 文件夹中的几个文件:

bin/solr create -c localpdf -s 2 - rf 2
bin/post -c localpdf ~/Documents/pdf
Run Code Online (Sandbox Code Playgroud)

执行上述命令时,出现以下错误:

SimplePostTool: WARNING: Response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>

</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/localpdf/update/extract. Reason:
<pre>    Not Found</pre></p>
</body>
</html>
SimplePostTool: WARNING: IOException while reading response: java.io.FileNotFoundException: http://localhost:8983/solr/localpdf/update/extract?resource.name=%2Fhome%2Fuser%2FDocuments%2Fpdf%2Ftest234.pdf&literal.id=%2Fhome%2Fuser%2FDocuments%2Fpdf%2Ftest234.pdf
Run Code Online (Sandbox Code Playgroud)

使用 运行相同的命令techproducts,即运行:

bin/post -c techproducts ~/Documents/pdf
Run Code Online (Sandbox Code Playgroud)

至少找到了文件(它给了我一些与 PDFBox 和一些字体相关的其他错误,但那是另一回事)

我可以添加其他文件,例如localpdfexample/exampledocs 文件夹中的 XML,但不能添加 pdf。

我在这里缺少什么?

solr

3
推荐指数
1
解决办法
1466
查看次数

Scrapy、Splash、Connection被对方拒绝:10061

我在 Javascript 驱动的网站上使用 scrapy 和splash。但是,我无法传递Connection was refused by other side: 10061错误。

我得到这样的日志:

[scrapy.downloadermiddlewares.retry] DEBUG: Retrying 
 <GET https://www2.deloitte.com/ch/en/misc/search.html#country=All#qr=accounting     
 via http://localhost:8050/render.html> (failed 1 times): Connection 
 was refused by other side: 10061: No connection could be made because 
 the target machine actively refused it..
Run Code Online (Sandbox Code Playgroud)

和指向扭曲的回溯:

twisted.internet.error.ConnectionRefusedError: Connection was refused 
by other side: 10061: No connection could be made because the target 
machine actively refused it..
Run Code Online (Sandbox Code Playgroud)

我检查了设置中的所有条目,尝试了各种USER_AGENTS条目ROBOT,但没有运气。也尝试过使用--disable-private-mode启动splash,但没有效果。

奇怪的是,只需将相同的网址复制粘贴到浏览器中就可以正常工作。

我使用普通的命令行 scrapy,以及通过 API。有趣的是,当使用 API 时,当然,在 PyCharm 中单击错误消息中目标的 url,主题标签 …

python twisted scrapy docker scrapy-splash

2
推荐指数
1
解决办法
3249
查看次数

标签 统计

docker ×1

python ×1

scrapy ×1

scrapy-splash ×1

solr ×1

twisted ×1