Problem of solr plugin
-
Thanks for your suggestion.
@iZ8vb5zw2bx60ytuhcwlwiZ:~/solr-8.5.1$ netstat -na | grep -i 8983 tcp6 0 0 :::8983 :::* LISTEN tcp6 0 0 IPaddress:8983 IPaddress:36399 ESTABLISHED tcp6 0 0 IPaddress:8983 IPaddress:36403 ESTABLISHED tcp6 0 0 IPaddress:8983 IPaddress:36400 ESTABLISHED
In there will be a reference to jetty's port.
If I got you right, solr should be used with Jetty? I heard from the internet that solr can be combined with tomcat or jetty before: https://community.nodebb.org/topic/12157/search-unreliable/18?_=1589503004418 , but I am not sure.
-
@sharonyue Yeah, should be able to use Solr w/Tomcat, JBoss, whatever.
The binary distributions linked from the install page contain a built in jetty though, so go for the low hanging fruit until you get Solr and NodeBB working and then try transitioning to some other java app/servlet server. Jetty is okay for smaller gigs and testing. Maybe not the best for enterprise scale.
So, is everything on that box using IPV6? NodeBB is not running only IPv4, by any chance?
Were you able to telnet localhost 8983? I want to confirm some local firewall rule is not blocking it.
I do not use Ubuntu, so cannot speak to whatever they have lurking in apt. Debian and Ubuntu like to tweak stuff. Sometimes they break things. Suggest testing with the binary bits from Solr direct.
Extract that to a dir somewhere, then cd to that dir and bin/solr start. See if that works. If so, create a dedicated unprivileged user for solr and then config systemd to manage it.
Also, something is connecting to Solr on those 36xxx ports.
P.S.; The boytoy issue you linked above references building Solr from sources. Grab the binary.
-
@gotwf said in Problem of solr plugin:
I do not touch anything of IPV6 IPV4, so it should be as default (I think IPV4).
telnet localhost 8983
@iZ8vb5zw2bx60ytuhcwlwiZ:~/nodebb$ telnet localhost 8983 Trying ::1... Connected to localhost. Escape character is '^]'.
Have a look of my solr, its running,
Another thing is that now I am running nodebb on https.
So I can access solr by: http://example.com:8983/solr, but not https://example.com:8983/solr.I also tried to modify
Host
fromlocalhost
tohttp://example.com
,https://example.com
they do not work. I am not sure if this malfunction is related to https. -
@sharonyue Humor me and test 127.0.0.1 in your nodebb config above rather than "localhost".
As for http(s): one thing at a time ;D
Oh, snap!! See my latest post.
-
@sharonyue said in Problem of solr plugin:
Background: recently I moved my nodebb forum to another server, till now it runs surprisingly good. I only found one problem: the solr searching plugin. It does not work, and the problem comes from the basic settings. After checking the internet a whole day. I made some progress:
As I understand, solr plugin needs to be deployed first and nodebb needs to connect it. At first I tried the easiest way:
sudo apt install solr-tomcat
, but it does not work: tomcat is fine, I can access it byexample:8080
, but solr does not work. I suspect the reason is that the new version of solr is a separated app (I learnt it from the internet).Then I tried to download the solr-8.5.1.tgz, and put it somewhere, then run the solr service. It runs surprisingly, by such an easy way... The problem is that solr runs at
example:8983
. Then, I set as the following in the solr plugin, it is still not connected.So not I dont know what am I supposed to do next. Any ideas?
^^^^
Ha! Uncheck "Secure" in your config since solr is not working via https at present.
-
@sharonyue Boo Hiss!! Well, nothing obvious so looks like somebody smarter than me is requisite for this one. ;(
Hmm... one last thing. Here's a netstat from Centos:
tcp 0 0 127.0.0.1:4569 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 ::1:25 :::* LISTEN
The first one is ipv4 while the last two ipv6. From your netstat I am unsure if your solr is listening to ipv4, as those multiple colons tend point to ipv6.
That you can telnet localhost would indicate things should work but I've no clue what NodeBB may be doing internally w.r.t. that stuff, so maybe a possibility?
-
I checked my old server. It runs tomcat and a quite old solr version. Everything is fine.
I guess the solr plugin can be only used by combining tomcat+solr, or it is not compatible with latest solr? I am not sure.
@julian Do you have any comments on it?
-
After a very heavy work. Finally I made it work:
-
Ubuntu 18 enables ipv6 as default, please follow this instruction as written to disable it. link text
-
Download an old version of solr (I am using solr-5.3.0), I verified solr-8 does not work. Run it. Here is the settings:
It should be noted that I am not sure if the first step is necessary. Since I did it, but it does not work. Then I downgrade solr, it works.
Hope it helps the others, especially those who are using the latest Ubuntu and Solr. Have fun!!
-
-
@sharonyue Ha! Was suspicious of the ipv6 stuff. But seems likely more to do with plugin's Solr version compatibility. Would be nice if someone more knowledgeable than I could help tease this out.
In any event, glad you got it sorted! And now that you have, I would be interested in follow up reports as to Solr's effectiveness, especially compared and contrasted with NodeBB's builtin search. I am guessing you are preferring Solr due to better multilingual support?
Enjoy!
-
@gotwf Yes. My forum is in Chinese so I must use solr.
dbsearch
does not support Chinese as you know so I use solr. And I found the searching results is satisfactory. Why do you use solr? The drawback of solr is just it costs too much memory. But I can accept that. -