Dear All,

I think I found the answer to my query.

In local.cfg :-

# DSpace uses Solr for all search/browse capability (and for usage
statistics by default).
# The included 'solr' webapp MUST be deployed to Tomcat for DSpace to function.
# Usually it will be available via port 8080 and the 'solr' context path. But,
# But, you may need to modify this if you are running DSpace on a
custom port, etc.
solr.server = http://localhost:8080/solr

I am listening ONLY on port 8009 in Tomcat. I am not listening on port 8080.

That is why I think solr is not responding.

Query : How do I tell the software that my Solr is located at:

solr.server = ajp://localhost:8009/solr

Is the above valid?

or do I do :-

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

(and point to where Apache http server is listening ?)

I am counting on this redirection to happen :  http 80 -> https 443 -> ajp 8009

Query: Will apache respond to query on port 80 of localhost  if I have
set ServerName to a fixed value say library.example.com? I guess it
will.

Best Regards,
Ashim

On Thu, 12 Aug 2021 at 12:10, Ashim Kapoor <[email protected]> wrote:
>
> Dear All,
>
> Can someone please help me with this ?
>
> Thank you,
> Ashim
>
> On Wed, 11 Aug 2021 at 16:51, Ashim Kapoor <[email protected]> wrote:
> >
> > Dear All,
> >
> > I have setup DSpace 6.3
> >
> > When I goto this link as a logged out user :
> >
> > https://library.mayin.org/browse?type=author
> >
> > I get :-
> >
> > Connection refused (Connection refused)
> >
> > Go to DSpace home
> >
> > Please contact the site administrator if you wish to report this
> > error. If possible, please provide details about what you were doing
> > at the time this error occurred.
> >
> > Contact site administrator || Show underlying error stack
> >
> > Java stacktrace: java.net.ConnectException: Connection refused
> > (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native
> > Method) at 
> > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
> > at 
> > java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
> > at 
> > java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
> > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at
> > java.net.Socket.connect(Socket.java:607) at
> > org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117)
> > at 
> > org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
> > at 
> > org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
> > at 
> > org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
> > at 
> > org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
> > at 
> > org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)
> > at 
> > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
> > at 
> > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
> > at 
> > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
> > at 
> > org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:448)
> > at 
> > org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
> > at 
> > org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
> > at 
> > org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:91)
> > at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:310)
> > at org.dspace.discovery.SolrServiceImpl.search(SolrServiceImpl.java:1610)
> > at org.dspace.browse.SolrBrowseDAO.getSolrResponse(SolrBrowseDAO.java:201)
> > at org.dspace.browse.SolrBrowseDAO.doCountQuery(SolrBrowseDAO.java:257)
> >
> > I have snipped the remaining error stack.
> >
> > I have setup :-
> >
> > 1. Tomcat on port 8009 ( AJP connector)
> > 2. Apache in front of Tomcat on port 80 and 443
> > 3. Here is my iptables :-
> >
> > cat /etc/iptables/rules
> > # Generated by iptables-save v1.4.14 on Mon Nov  2 10:47:47 2020
> > *filter
> > :INPUT ACCEPT [0:0]
> > :FORWARD ACCEPT [0:0]
> > :OUTPUT ACCEPT [0:0]
> > -A INPUT -i lo -j ACCEPT
> > -A INPUT -d 127.0.0.0/8 ! -i lo -j REJECT --reject-with 
> > icmp-port-unreachable
> > -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
> > -A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
> > -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
> > -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
> > -A INPUT -p tcp -m tcp --dport 8000 -j ACCEPT
> > #-A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
> > -A INPUT -p tcp -m state --state NEW -m tcp --dport 8000 -j ACCEPT
> > -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
> > -A INPUT -m limit --limit 10/min -j LOG --log-prefix "iptables denied:
> > " --log-level 7
> > -A INPUT -j REJECT --reject-with icmp-port-unreachable
> > -A FORWARD -j REJECT --reject-with icmp-port-unreachable
> > -A OUTPUT -j ACCEPT
> > COMMIT
> >
> > 4. Since 8009 port is on localhost I think the FIRST rule in iptables :-
> >
> > -A INPUT -i lo -j ACCEPT
> >
> > will take care of it. Perhaps I am mistaken about this?
> >
> > Here is the relevant portion from my server.xml:-
> >
> > <Connector port="8009" address="::" protocol="AJP/1.3"
> > secretRequired="false" URIEncoding="UTF-8" />
> >
> > 5. Here is the relevant snippet from [dspace-source]/dspace/config/local.cfg
> >
> > # DSpace base host URL.  Include port number etc.
> > dspace.baseUrl = http://library.mayin.org:80
> >
> > In my setup : Apache redirects http traffic on port 80 to https on
> > port 443 which is proxied to port 8009 where Tomcat is listening.
> >
> > Many thanks,
> > 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/CAGEJAoEWONLUM11TkXf4mtYuUf7xwU3iJ5qj2-8E5w3DrsdcMA%40mail.gmail.com.

Reply via email to