What is the correct value for solr.server when using AJP (Apache in front of Tomcat)

144 views
Skip to first unread message

Ashim Kapoor

unread,
Aug 13, 2021, 2:22:04 AM8/13/21
to DSpace Technical Support
Dear all,

I have set up DSpace 6.3. I have Apache httpd in front of Tomcat.

In my local.cfg what should the value of :-

solr.server =

be ?

Tomcat is listening at port 8009.

Here is the snippet from server.xml:

<Connector port="8009" address="::" protocol="AJP/1.3"
secretRequired="false" URIEncoding="UTF-8" />

I have commented out the Connector port = "8080" in server.xml

I wish I could say solr.server = ajp://localhost:8009/solr OR
http://localhost:8009/solr

but neither will work I think.

I have tried :-

solr.server = http://localhost:80/solr

This is NOT working.

I have Apache redirecting http on port 80 to https on port 443 and the
traffic on port 443 proxying to ajp on port 8009

Can someone please help me ? What should solr.server be in this setup?

I can think of one thing. I can ask Tomcat to listen on port 8080 as
well and THEN

solr.server = http://localhost:8080/solr

will work.

Is that what I should be doing ?

Thank you,
Ashim

Steli Vali

unread,
Aug 13, 2021, 2:53:00 AM8/13/21
to DSpace Technical Support
Hi Ashim, try with the following setting:

ProxyPass /solr http://localhost:8983/solr
ProxyPassReverse /solr http://localhost:8983/solr

Also in local.cfg, changed it to http://localhost:8983/solr.

Hope that helps :)

Ashim Kapoor

unread,
Aug 13, 2021, 3:36:13 AM8/13/21
to Steli Vali, DSpace Technical Support
Dear Steli,

Many thanks for your reply.

I am on DSpace 6.3 and Apache Tomcat is listening on port 8009 via an
AJP connector and not on 8983.

Do you mean the following ?

ProxyPass /solr ajp://localhost:8009/solr
ProxyPassReverse /solr ajp://localhost:8009/solr
Also in local.cfg, changed it to http://localhost:8009/solr.

I have done:-

ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/

As far as the local.cfg is concerned I think, Tomcat is not listening
using the http protocol, it is listening for an AJP protocol.

I think I should enable port 8080 with HTTP protocol so that Solr can
be accessed at port 8080 via HTTP locally.

I am a little confused here. Would appreciate any advice.

Best Regards,
Ashim
> --
> All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
> ---
> You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/111e4824-0b84-4e20-8adb-e46ef96d9c0dn%40googlegroups.com.

Steli Vali

unread,
Aug 13, 2021, 6:01:53 AM8/13/21
to DSpace Technical Support
Hi Ashim,

unfortunately I have no experience with DSpace 6.
But I guess that the process is the same.
Maybe if you set just the value for Solr it will work.
Try to access it without the proxy and check if it works.

Best regards,
Valianos

Ashim Kapoor

unread,
Aug 13, 2021, 6:08:59 AM8/13/21
to Steli Vali, DSpace Technical Support
On Fri, 13 Aug 2021 at 15:32, Steli Vali <stelica....@fau.de> wrote:
>
> Hi Ashim,
>
> unfortunately I have no experience with DSpace 6.
> But I guess that the process is the same.
> Maybe if you set just the value for Solr it will work.
> Try to access it without the proxy and check if it works.
>

No problem. Many thanks for your help.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/5a29a78c-a74a-4c5b-b50b-1a6ea9fd77a1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages