I have found that it could be a problem in solr.cmd.

It works after I replace this line in Solr 5.3.0

IF NOT "%EXAMPLE%"=="" goto run_example


With this segment of the code from Solr 5.2.1


 IF "%EXAMPLE%"=="" (

  IF NOT "%SOLR_HOME%"=="" (

    REM Absolutize a relative solr home

    IF EXIST "%cd%\%SOLR_HOME%" set "SOLR_HOME=%cd%\%SOLR_HOME%"

  )

  REM Otherwise SOLR_HOME just becomes %SOLR_SERVER_DIR%/solr

) ELSE IF "%EXAMPLE%"=="techproducts" (

  mkdir "%SOLR_TIP%\example\techproducts\solr"

  set "SOLR_HOME=%SOLR_TIP%\example\techproducts\solr"

  IF NOT EXIST "!SOLR_HOME!\solr.xml" (

    copy "%DEFAULT_SERVER_DIR%\solr\solr.xml" "!SOLR_HOME!\solr.xml"

  )

  IF NOT EXIST "!SOLR_HOME!\zoo.cfg" (

    copy "%DEFAULT_SERVER_DIR%\solr\zoo.cfg" "!SOLR_HOME!\zoo.cfg"

  )

) ELSE IF "%EXAMPLE%"=="cloud" (

  set SOLR_MODE=solrcloud

  goto cloud_example_start

) ELSE IF "%EXAMPLE%"=="dih" (

  set "SOLR_HOME=%SOLR_TIP%\example\example-DIH\solr"

) ELSE IF "%EXAMPLE%"=="schemaless" (

  mkdir "%SOLR_TIP%\example\schemaless\solr"

  set "SOLR_HOME=%SOLR_TIP%\example\schemaless\solr"

  IF NOT EXIST "!SOLR_HOME!\solr.xml" (

    copy "%DEFAULT_SERVER_DIR%\solr\solr.xml" "!SOLR_HOME!\solr.xml"

  )

  IF NOT EXIST "!SOLR_HOME!\zoo.cfg" (

    copy "%DEFAULT_SERVER_DIR%\solr\zoo.cfg" "!SOLR_HOME!\zoo.cfg"

  )

) ELSE (

  @echo.

  @echo 'Unrecognized example %EXAMPLE%!'

  @echo.

  goto start_usage

)



Could there be some issues with this line [IF NOT "%EXAMPLE%"=="" goto
run_example] in Solr 5.3.0 (line 601 in solr.cmd)?


Regards,

Edwin



On 8 September 2015 at 15:19, Zheng Lin Edwin Yeo <edwinye...@gmail.com>
wrote:

> Hi,
>
> I have a custom core directories in my Solr located at
> solrMain\node1\solr, and I set it through the -s <dir> parameter in the
> Solr startup script, and it looks like this:
> bin\solr.cmd start -cloud -p 8983 -s solrMain\node1\solr -m 12g -z
> "localhost:2181,localhost:2182,localhost:2183"
>
> This works fine in Solr 5.2.1.
>
> However, when I tried to upgrade it to Solr 5.3.0 and start Solr using the
> same startup script, it gives the following error:
>
> HTTP ERROR 500
>
> Problem accessing /solr/admin. Reason:
>
>     Server Error
>
> Caused by:
>
> java.lang.NullPointerException
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.authenticateRequest(SolrDispatchFilter.java:237)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:186)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
>       at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
>       at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
>       at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>       at 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
>       at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
>       at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
>       at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
>       at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>       at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
>       at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>       at 
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
>       at 
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
>       at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>       at org.eclipse.jetty.server.Server.handle(Server.java:499)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
>       at 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
>       at 
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
>       at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
>       at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
>       at java.lang.Thread.run(Thread.java:745)
>
>
> If I start without the -s <dir> command, it is able to start with the
> default directory (server/solr), but without any core and index, as my
> cores and indexes are not located there.
>
> The Solr is able to start normally with the migrated cores and indexes
> only if I replace the solr.cmd to the one I used in Solr 5.2.1. I couldn't
> use the one provided in Solr 5.3.0.
>
> Is there any changes that I need to do with my setting in order to use the
> solr.cmd provided in Solr 5.3.0, and also to link it to my custom core
> directories by using the -s <dir> in my startup script? I check the Solr
> Start Script Reference Page at
> https://cwiki.apache.org/confluence/display/solr/Solr+Start+Script+Reference,
> but it didn't state any difference.
>
>
> Regards,
> Edwin
>

Reply via email to