无法使用JDBC网址连接到SOLR

问题描述

我正在尝试使用JDBC连接到Solr,但是我始终会遇到“ java.util.concurrent.TimeoutException:无法在15000毫秒内连接到ZooKeeper本地主机:9983 /”(或其他端口,取决于jdbc url I测试)。

这是我所做的:

  • 我安装了Solr 7.7.2(install doc here),即下载,提取,启动(不带bin / solr start选项)

  • 添加一个“测试”集合和示例xml文档,我可以see them at this url

  • 然后我安装了DbVisualizer,添加了驱动程序和连接,例如explained here =>我在文档中看到的唯一区别是,在要导入的jar的屏幕复制上,版本有所不同,并且solr存档中还有一个jar(commons-math3-3.6.1.jar)。另外,要使用的jdbc URL的中间(see here)中是否带有'/',如下所示:jdbc:solr:// localhost:9983?collection = test或jdbc:solr:// localhost :9983 /?collection = test。不知道这是否重要...

  • ,我在Ubuntu VM和Windows 10上都尝试过

所以,就像在文档中一样,一切似乎都不错,但是当我单击'connect'时,总是会超时。我发现以下信息的每个网站都在谈论下面列表中第一个jdbc网址,我尝试了其他可能性(以防万一),但没有成功...

  • jdbc:solr:// localhost:9983?collection = test
  • jdbc:solr://127.0.0.1:9983?collection = test
  • jdbc:solr:// localhost:9983 /?collection = test
  • jdbc:solr:// localhost:9983 / solr?collection = test
  • jdbc:solr:// localhost:8983 /?collection = test
  • jdbc:solr:// localhost:8983?collection = test
  • jdbc:solr:// localhost:8983 / solr?collection = test
  • jdbc:solr:// localhost:2181?collection = test
  • jdbc:solr:// localhost:2181 /?collection = test
  • jdbc:solr:// localhost:2181 / solr?collection = test

如果您有个好主意,谢谢您的帮助!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)