[jira] [Commented] (SOLR-3781) when wiring Solr into a larger web application which controls the web context root,something can't work

2013-04-24 Thread Stefan Matheis (steffkes) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-3781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13640266#comment-13640266
 ] 

Stefan Matheis (steffkes) commented on SOLR-3781:
-

Sam, Alin .. perhaps it'd be good to compare underlying values to see if there 
is a common way to handle this for all situations.

for me (solr's example package with shipped jetty), i get these values placed 
in the initial page of the UI:
{code}app_config.solr_path = '\/solr';
app_config.core_admin_path = '\/admin\/cores';{code}

{{solr_path}} is defined by {{HttpServletRequest.getContextPath()}} and 
{{core_admin_path}} by {{CoreContainer.getAdminPath()}}

From Sam's Comment i'd say the latter seems to be correct, but the former is 
missing the prefix. I don't really know how the {{HttpServletRequest}} 
determines which is the right context .. !?

 when wiring Solr into a larger web application which controls the web context 
 root,something can't work
 ---

 Key: SOLR-3781
 URL: https://issues.apache.org/jira/browse/SOLR-3781
 Project: Solr
  Issue Type: Bug
  Components: SolrCloud
Affects Versions: 4.0-BETA
 Environment: win7 jetty-distribution-7.6.5.v20120716
 startup param:
 -Djetty.port=8084 -DzkRun -Dbootstrap_conf=true
Reporter: shenjc
Priority: Minor
  Labels: patch
 Attachments: LoadAdminUiServlet.patch

   Original Estimate: 24h
  Remaining Estimate: 24h

 if i am wiring Solr into a larger web application which controls the web 
 context root, you will probably want to mount Solr under a path prefix 
 (app.war with /app/solr mounted into it, for example).
  For example:
 RootApp.war /
 myApp.war---/myApp
 prefixPath---xxx
 jsdir--js
 js filemain.js
 admin file-admin.html
 org.apache.solr.servlet.LoadAdminUiServlet
 line:49  InputStream in = 
 getServletContext().getResourceAsStream(/admin.html);
 can't find admin/html because it's in the prefixPath directory
 org.apache.solr.cloud.ZkController
 line:149-150
 this.nodeName = this.hostName + ':' + this.localHostPort + '_' + 
 this.localHostContext;
 this.baseURL = this.localHost + : + this.localHostPort + / + 
 this.localHostContext;
 it can't match this condition
 baseURL need to be http://xx:xx/myApp/myPrefixPath 
 eg. http://xx:xx/myApp/xxx

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-3781) when wiring Solr into a larger web application which controls the web context root,something can't work

2013-04-24 Thread Alin Simionoiu (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-3781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13640484#comment-13640484
 ] 

Alin Simionoiu commented on SOLR-3781:
--

here's my setup (and initial page values).

i have solr inside a larger web application which starts in the root context 
(this part i believe is critical). in my web.xml i have my servlets and 
filters, and i copied more or less the solr web.xml context. 

i want solr to work from, let's say '/mysolr'. i'm changing the value here, not 
to be confused with the default '/solr'
for the SolrRequstFilter i setup: path-prefix = /mysolr and the url-pattern = 
/mysolr/*

in the initial page of the UI, i have:
app_config.solr_path = '';
app_config.core_admin_path = '\/admin\/cores';

LoadAdminUiServlet seems to set the app_config.solr_path to 
request.getContextPath(), and since my application works from root context it 
kind of makes sense for solr_path to be '' (maybe is '\/' and it gets removed 
by the code later on). This will make all the calls inside the admin.html to go 
against, let's say /admin/cores (invalid URL for me) instead of expected 
/mysolr/admin/cores

if i provide my own copy of LoadAdminUiServlet, which sets 
app_config.solr_path='\/mysolr', than the admin.html calls will double that for 
some reasons, '/mysolr/mysolr/admin/cores' instead of '/mysolr/admin/cores', i 
can't figure this one out.

(as a hack i'm also using a copy of SolrRequestFilter which removes the double 
prefix if found, and now admin.html kind of works. the only thing that i still 
have to figure out is the zookeeper part, that one still doesn't work, not sure 
why is going against /zookeeper instead of /mysolr/zookeeper).

i'm just using '/admin/cores' as examples here, logging and all the other URL's 
have the same problem.

Does this makes more sense now?





 when wiring Solr into a larger web application which controls the web context 
 root,something can't work
 ---

 Key: SOLR-3781
 URL: https://issues.apache.org/jira/browse/SOLR-3781
 Project: Solr
  Issue Type: Bug
  Components: SolrCloud
Affects Versions: 4.0-BETA
 Environment: win7 jetty-distribution-7.6.5.v20120716
 startup param:
 -Djetty.port=8084 -DzkRun -Dbootstrap_conf=true
Reporter: shenjc
Priority: Minor
  Labels: patch
 Attachments: LoadAdminUiServlet.patch

   Original Estimate: 24h
  Remaining Estimate: 24h

 if i am wiring Solr into a larger web application which controls the web 
 context root, you will probably want to mount Solr under a path prefix 
 (app.war with /app/solr mounted into it, for example).
  For example:
 RootApp.war /
 myApp.war---/myApp
 prefixPath---xxx
 jsdir--js
 js filemain.js
 admin file-admin.html
 org.apache.solr.servlet.LoadAdminUiServlet
 line:49  InputStream in = 
 getServletContext().getResourceAsStream(/admin.html);
 can't find admin/html because it's in the prefixPath directory
 org.apache.solr.cloud.ZkController
 line:149-150
 this.nodeName = this.hostName + ':' + this.localHostPort + '_' + 
 this.localHostContext;
 this.baseURL = this.localHost + : + this.localHostPort + / + 
 this.localHostContext;
 it can't match this condition
 baseURL need to be http://xx:xx/myApp/myPrefixPath 
 eg. http://xx:xx/myApp/xxx

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-3781) when wiring Solr into a larger web application which controls the web context root,something can't work

2013-04-24 Thread Sam Kass (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-3781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13640520#comment-13640520
 ] 

Sam Kass commented on SOLR-3781:


Also, this bug's Component should probably be web gui.


 when wiring Solr into a larger web application which controls the web context 
 root,something can't work
 ---

 Key: SOLR-3781
 URL: https://issues.apache.org/jira/browse/SOLR-3781
 Project: Solr
  Issue Type: Bug
  Components: SolrCloud
Affects Versions: 4.0-BETA
 Environment: win7 jetty-distribution-7.6.5.v20120716
 startup param:
 -Djetty.port=8084 -DzkRun -Dbootstrap_conf=true
Reporter: shenjc
Priority: Minor
  Labels: patch
 Attachments: LoadAdminUiServlet.patch, 
 LoadAdminUiServlet_take2.patch, web.xml

   Original Estimate: 24h
  Remaining Estimate: 24h

 if i am wiring Solr into a larger web application which controls the web 
 context root, you will probably want to mount Solr under a path prefix 
 (app.war with /app/solr mounted into it, for example).
  For example:
 RootApp.war /
 myApp.war---/myApp
 prefixPath---xxx
 jsdir--js
 js filemain.js
 admin file-admin.html
 org.apache.solr.servlet.LoadAdminUiServlet
 line:49  InputStream in = 
 getServletContext().getResourceAsStream(/admin.html);
 can't find admin/html because it's in the prefixPath directory
 org.apache.solr.cloud.ZkController
 line:149-150
 this.nodeName = this.hostName + ':' + this.localHostPort + '_' + 
 this.localHostContext;
 this.baseURL = this.localHost + : + this.localHostPort + / + 
 this.localHostContext;
 it can't match this condition
 baseURL need to be http://xx:xx/myApp/myPrefixPath 
 eg. http://xx:xx/myApp/xxx

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-3781) when wiring Solr into a larger web application which controls the web context root,something can't work

2013-04-24 Thread Alin Simionoiu (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-3781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13640724#comment-13640724
 ] 

Alin Simionoiu commented on SOLR-3781:
--

thank you very much Sam, this works perfect for me.

 when wiring Solr into a larger web application which controls the web context 
 root,something can't work
 ---

 Key: SOLR-3781
 URL: https://issues.apache.org/jira/browse/SOLR-3781
 Project: Solr
  Issue Type: Bug
  Components: SolrCloud
Affects Versions: 4.0-BETA
 Environment: win7 jetty-distribution-7.6.5.v20120716
 startup param:
 -Djetty.port=8084 -DzkRun -Dbootstrap_conf=true
Reporter: shenjc
Priority: Minor
  Labels: patch
 Attachments: LoadAdminUiServlet.patch, 
 LoadAdminUiServlet_take2.patch, web.xml

   Original Estimate: 24h
  Remaining Estimate: 24h

 if i am wiring Solr into a larger web application which controls the web 
 context root, you will probably want to mount Solr under a path prefix 
 (app.war with /app/solr mounted into it, for example).
  For example:
 RootApp.war /
 myApp.war---/myApp
 prefixPath---xxx
 jsdir--js
 js filemain.js
 admin file-admin.html
 org.apache.solr.servlet.LoadAdminUiServlet
 line:49  InputStream in = 
 getServletContext().getResourceAsStream(/admin.html);
 can't find admin/html because it's in the prefixPath directory
 org.apache.solr.cloud.ZkController
 line:149-150
 this.nodeName = this.hostName + ':' + this.localHostPort + '_' + 
 this.localHostContext;
 this.baseURL = this.localHost + : + this.localHostPort + / + 
 this.localHostContext;
 it can't match this condition
 baseURL need to be http://xx:xx/myApp/myPrefixPath 
 eg. http://xx:xx/myApp/xxx

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-3781) when wiring Solr into a larger web application which controls the web context root,something can't work

2013-04-24 Thread Hoss Man (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-3781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13640983#comment-13640983
 ] 

Hoss Man commented on SOLR-3781:


Since Servlet's can be mapped to multiple paths, i'm wondering if it would be 
cleaner and more straight forwarded just to add an optional path-prefix 
init-param to to LoadAdminUiServlet just like SolrDispatchFilter has, that 
people can configure in exactly the same way?

 when wiring Solr into a larger web application which controls the web context 
 root,something can't work
 ---

 Key: SOLR-3781
 URL: https://issues.apache.org/jira/browse/SOLR-3781
 Project: Solr
  Issue Type: Bug
  Components: SolrCloud
Affects Versions: 4.0-BETA
 Environment: win7 jetty-distribution-7.6.5.v20120716
 startup param:
 -Djetty.port=8084 -DzkRun -Dbootstrap_conf=true
Reporter: shenjc
Priority: Minor
  Labels: patch
 Attachments: LoadAdminUiServlet.patch, 
 LoadAdminUiServlet_take2.patch, web.xml

   Original Estimate: 24h
  Remaining Estimate: 24h

 if i am wiring Solr into a larger web application which controls the web 
 context root, you will probably want to mount Solr under a path prefix 
 (app.war with /app/solr mounted into it, for example).
  For example:
 RootApp.war /
 myApp.war---/myApp
 prefixPath---xxx
 jsdir--js
 js filemain.js
 admin file-admin.html
 org.apache.solr.servlet.LoadAdminUiServlet
 line:49  InputStream in = 
 getServletContext().getResourceAsStream(/admin.html);
 can't find admin/html because it's in the prefixPath directory
 org.apache.solr.cloud.ZkController
 line:149-150
 this.nodeName = this.hostName + ':' + this.localHostPort + '_' + 
 this.localHostContext;
 this.baseURL = this.localHost + : + this.localHostPort + / + 
 this.localHostContext;
 it can't match this condition
 baseURL need to be http://xx:xx/myApp/myPrefixPath 
 eg. http://xx:xx/myApp/xxx

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-3781) when wiring Solr into a larger web application which controls the web context root,something can't work

2013-04-23 Thread Alin Simionoiu (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-3781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13639449#comment-13639449
 ] 

Alin Simionoiu commented on SOLR-3781:
--

i believe the source of that error is in cores.js. i can't figure out how to 
fix it. admin.html defines a global var app_config and the URL's are built 
using app_config.solr_path + app_config.core_admin_path.

initially the solr_path is empty (don't know why yet). if i force the value to 
let's say solr which is my context, the cores request for some reason that i 
can't figure out is adding the value twice. /solr/solr/admin/cores...

 when wiring Solr into a larger web application which controls the web context 
 root,something can't work
 ---

 Key: SOLR-3781
 URL: https://issues.apache.org/jira/browse/SOLR-3781
 Project: Solr
  Issue Type: Bug
  Components: SolrCloud
Affects Versions: 4.0-BETA
 Environment: win7 jetty-distribution-7.6.5.v20120716
 startup param:
 -Djetty.port=8084 -DzkRun -Dbootstrap_conf=true
Reporter: shenjc
Priority: Minor
  Labels: patch
 Attachments: LoadAdminUiServlet.patch

   Original Estimate: 24h
  Remaining Estimate: 24h

 if i am wiring Solr into a larger web application which controls the web 
 context root, you will probably want to mount Solr under a path prefix 
 (app.war with /app/solr mounted into it, for example).
  For example:
 RootApp.war /
 myApp.war---/myApp
 prefixPath---xxx
 jsdir--js
 js filemain.js
 admin file-admin.html
 org.apache.solr.servlet.LoadAdminUiServlet
 line:49  InputStream in = 
 getServletContext().getResourceAsStream(/admin.html);
 can't find admin/html because it's in the prefixPath directory
 org.apache.solr.cloud.ZkController
 line:149-150
 this.nodeName = this.hostName + ':' + this.localHostPort + '_' + 
 this.localHostContext;
 this.baseURL = this.localHost + : + this.localHostPort + / + 
 this.localHostContext;
 it can't match this condition
 baseURL need to be http://xx:xx/myApp/myPrefixPath 
 eg. http://xx:xx/myApp/xxx

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-3781) when wiring Solr into a larger web application which controls the web context root,something can't work

2013-04-19 Thread Stefan Matheis (steffkes) (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-3781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13636225#comment-13636225
 ] 

Stefan Matheis (steffkes) commented on SOLR-3781:
-

Sam, the attached patch looks good to me - at least the UI is (still) working 
after applying the patch to solr's default-jetty-example.

bq. It doesn't solve the entire problem loading the admin page, as there still 
seems to be a problem with the cores request not getting the prefix 
prepended, but it solves the explicit problem the description specifies.

Could you be a bit more specific about that? the Servlet uses 
{{CoreContainer}}'s {{getAdminPath()}} to get the correct path to 
{{/admin/cores}} .. which is, i guess, what you're talking about? 

 when wiring Solr into a larger web application which controls the web context 
 root,something can't work
 ---

 Key: SOLR-3781
 URL: https://issues.apache.org/jira/browse/SOLR-3781
 Project: Solr
  Issue Type: Bug
  Components: SolrCloud
Affects Versions: 4.0-BETA
 Environment: win7 jetty-distribution-7.6.5.v20120716
 startup param:
 -Djetty.port=8084 -DzkRun -Dbootstrap_conf=true
Reporter: shenjc
Priority: Minor
  Labels: patch
 Attachments: LoadAdminUiServlet.patch

   Original Estimate: 24h
  Remaining Estimate: 24h

 if i am wiring Solr into a larger web application which controls the web 
 context root, you will probably want to mount Solr under a path prefix 
 (app.war with /app/solr mounted into it, for example).
  For example:
 RootApp.war /
 myApp.war---/myApp
 prefixPath---xxx
 jsdir--js
 js filemain.js
 admin file-admin.html
 org.apache.solr.servlet.LoadAdminUiServlet
 line:49  InputStream in = 
 getServletContext().getResourceAsStream(/admin.html);
 can't find admin/html because it's in the prefixPath directory
 org.apache.solr.cloud.ZkController
 line:149-150
 this.nodeName = this.hostName + ':' + this.localHostPort + '_' + 
 this.localHostContext;
 this.baseURL = this.localHost + : + this.localHostPort + / + 
 this.localHostContext;
 it can't match this condition
 baseURL need to be http://xx:xx/myApp/myPrefixPath 
 eg. http://xx:xx/myApp/xxx

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-3781) when wiring Solr into a larger web application which controls the web context root,something can't work

2013-04-19 Thread Sam Kass (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-3781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13636474#comment-13636474
 ] 

Sam Kass commented on SOLR-3781:


When I run things with my patch included, the admin page comes up instead of 
the 404, but the Loading... spinner stays up, and the browser debugger says 
it's getting a failure contacting app/admin/cores?wt=jsonindexInfo=false 
(instead of app/solr/admin/cores?wt=jsonindexInfo=false like it should.)  
Haven't tried to trace the source of that error yet.

 when wiring Solr into a larger web application which controls the web context 
 root,something can't work
 ---

 Key: SOLR-3781
 URL: https://issues.apache.org/jira/browse/SOLR-3781
 Project: Solr
  Issue Type: Bug
  Components: SolrCloud
Affects Versions: 4.0-BETA
 Environment: win7 jetty-distribution-7.6.5.v20120716
 startup param:
 -Djetty.port=8084 -DzkRun -Dbootstrap_conf=true
Reporter: shenjc
Priority: Minor
  Labels: patch
 Attachments: LoadAdminUiServlet.patch

   Original Estimate: 24h
  Remaining Estimate: 24h

 if i am wiring Solr into a larger web application which controls the web 
 context root, you will probably want to mount Solr under a path prefix 
 (app.war with /app/solr mounted into it, for example).
  For example:
 RootApp.war /
 myApp.war---/myApp
 prefixPath---xxx
 jsdir--js
 js filemain.js
 admin file-admin.html
 org.apache.solr.servlet.LoadAdminUiServlet
 line:49  InputStream in = 
 getServletContext().getResourceAsStream(/admin.html);
 can't find admin/html because it's in the prefixPath directory
 org.apache.solr.cloud.ZkController
 line:149-150
 this.nodeName = this.hostName + ':' + this.localHostPort + '_' + 
 this.localHostContext;
 this.baseURL = this.localHost + : + this.localHostPort + / + 
 this.localHostContext;
 it can't match this condition
 baseURL need to be http://xx:xx/myApp/myPrefixPath 
 eg. http://xx:xx/myApp/xxx

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org