I am trying to configure a localhost Coldfusion developer instance to connect to a remote Coldfusion Solr server.
I have changed the [instance]\jetty\etc\jetty.xml jetty.http.host from 127.0.0.1 to 0.0.0.0 and I can access the Solr dashboard at http://[host]:8989/solr/
After I have changed the Solr host the Coldfusion Collections seems to pull up the remote list, however when I try to add a collection I get an error
Unable to create collection [colletion_name].
Unable to create Solr collection [colletion_name].
An error occurred while creating the collection: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException. Check the Solr logs for more detail.
I do not know where this Solr log file is, however I do see the request.log has a line in it
[255.255.255.255] - - [31/Oct/2017:20:01:31 +0000] "GET //[host]:8989/solr/admin/cores?action=CREATE&name=test&instanceDir=C%3A%2FColdFusion%2F2016%2Fcfusion%2Fjetty%2Fmulticore%2Fcollections%2Ftest&template=C%3A%5CColdFusion%5C2016%5Ccfusion%5Cjetty%5Cmulticore%2Ftemplate&wt=xml&version=2.2 HTTP/1.1" 400 414
I would guess that my local instance has it's Solr home set to "C:\ColdFusion\2016\cfusion\jetty\multicore" whereas my remote Solr instance's home is "C:\ColdFusion2016\cfusion\jetty\multicore".
When I try to change this in CFAdmin i get the error
An error occurred while attempting to save your changes.
Path C:\ColdFusion2016\cfusion\jetty\multicore to the Solr Home is not valid.
If I had to guess this is something I need to change, are there any other gotchas or configuration changes I need to make?
I manually edited the file [instance]\lib\neo-solr.xml and restarted Coldfusion and that seemed to work, however I would still like any extra information on how I can secure a Solr instance, setup a username/password?
Tyler, I don’t think you’ll find anything in CF about securing Solr. Adobe provides it as a convenience, but you’d need to look at the configuration of that (Solr iself, or the Jetty web server which surrounds it) to add more security.
But do keep in mind that, as you saw, Solr is available only via that port 8089. That would normally be blocked in your firewall (of the server running Solr), and if you opened that port to allow it access from your development environment, you ought to lock down that port in the firewall to be exposed only to that IP address. Maybe your issue is that your IP changes, and that’s why you want “more security”.
In that case, again look at securing Solr or Jetty themselves.
Indeed, in your first message you were saying you didn’t know what “solr logs” the error message was referring to. It was the Jetty logs, in that cfusion\jetty folder you referred to. Check that out for the logs.
And then as for securing Solr that Jetty web server, you’d just want to google for info on that. Adobe has no info about it that I know of. You may also find pertinent help in comments the Solr or Jetty config files.
I’d never had anyone ask me about that myself, so I don’t have a ready answer. I just did a quick look and found this:
As for the web.xml file it refers to would be either of these:
I’ll leave the rest for your exploration.