我使用tomcat基本身份验证保护了我的solr管理页面,因为默认情况下已打开。
但是现在我无法通过密码保护从tomcat_java应用程序(server1)连接到solr(server2)。网站开放时工作正常。
我们已更改:/ROOT/WEB-INF/classes/config.properties
the solr url:
from:
solr.url=http://solr.example.com
to
solr.url=http://user:pass@solr.example.com
但未连接并显示此错误:
2015-08-24 12:10:17,774 DEBUG [HttpClientUtil] - Creating new http client, config:maxConnections=128&maxConnectionsPerHost=32&followRedirects=false
2015-08-24 12:10:17,775 DEBUG [PoolingClientConnectionManager] - Connection request: [route: {}->http://solr.example.com][total kept alive: 0; route allocated: 0 of 32; total allocated: 0 of 128]
2015-08-24 12:10:17,781 DEBUG [PoolingClientConnectionManager] - Connection leased: [id: 8][route: {}->http://solr.example.com][total kept alive: 0; route allocated: 1 of 32; total allocated: 1 of 128]
2015-08-24 12:10:17,781 DEBUG [DefaultClientConnectionOperator] - Connecting to solr.example.com:80
2015-08-24 12:10:17,795 ERROR [Dispatcher] - Exception occurred during processing request: null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252)
at org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
....
我必须在哪个文件中配置连接到solr的用户和密码?
提前感谢。
问候。