edaemon commented on issue #84:
URL: https://github.com/apache/solr-operator/issues/84#issuecomment-2715771545

   I'm seeing a similar issue with version 0.9.0, but I'm wondering if there's 
some configuration I'm missing. The problem I'm having is that requests to the 
common service seem to internally rely on a connection to the headless service, 
but those connections are attempted over port 80 instead of 8983. What would 
cause it to use port 80 for the headless service requests and can that be 
configured?
   
   The headless service is correctly listening on port 8983:
   
   ```
   NAME                                                          TYPE        
CLUSTER-IP       EXTERNAL-IP   PORT(S)                                        
AGE
   [redacted]-solr-solrcloud-headless                            ClusterIP   
None             <none>        8983/TCP                                       
3m18s
   ```
   
   However, when I interact with the common service to try and add a collection 
I get an error like this:
   <details><summary>Error message</summary>
   <p>
   
   ```
     Creating collection [redacted] failed with error code 400: Solr HTTP 
error: OK (400)
     {
       "responseHeader":{
         "status":400,
         "QTime":931},
       "failure":{
         
"[redacted]-solr-solrcloud-0.[redacted]-solr-solrcloud-headless.[redacted]:80_solr":"org.apache.solr.client.solrj.SolrServerException:
     Server refused connection at: 
http://[redacted]-solr-solrcloud-0.[redacted]-solr-solrcloud-headless.[redacted]:80/solr"},
       "Operation create caused 
exception:":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
 Underlying core creation failed while creating collection: [redacted]",
       "exception":{
         "msg":"Underlying core creation failed while creating collection: 
[redacted]",
         "rspCode":400},
       "error":{
         "metadata":[
           "error-class","org.apache.solr.common.SolrException",
           "root-error-class","org.apache.solr.common.SolrException"],
         "msg":"Underlying core creation failed while creating collection: 
[redacted]",
         "code":400}}
   ```
   
   </p>
   </details> 
   
   If I try to create a collection directly with the headless service over port 
8983 I get the exact same behavior. Here's the SolrCloud YAML I'm using:
   
   <details><summary>SolrCloud YAML</summary>
   <p>
   
   ```
   # Solr Cloud for the Drupal environment; relies on Solr Operator
   ---
   apiVersion: solr.apache.org/v1beta1
   kind: SolrCloud
   metadata:
     name: "{{ .Release.Name }}-solr"
   spec:
     dataStorage:
       persistent:
         reclaimPolicy: "{{ .Values.solr.reclaimPolicy }}"
         pvcTemplate:
           spec:
             storageClassName: "ebs-sc"
             resources:
               requests:
                 storage: "{{ .Values.solr.storage }}"
     replicas: {{ .Values.solr.replicas }}
     solrImage:
       tag: {{ .Values.solr.solrImage }}
     solrJavaMem: "{{ .Values.solr.solrJavaMem }}"
     solrModules:
       - jaegertracer-configurator
       - ltr
     customSolrKubeOptions:
       podOptions:
         resources:
           limits:
             memory: "{{ .Values.solr.resources.limits.memory }}"
           requests:
             cpu: "{{ .Values.solr.resources.requests.cpu }}"
             memory: "{{ .Values.solr.resources.requests.memory }}"
     zookeeperRef:
       provided:
         chroot: "/this/will/be/auto/created"
         persistence:
           spec:
             storageClassName: "ebs-sc"
             resources:
               requests:
                 storage: "{{ .Values.solr.zookeeper.storage }}"
         replicas: {{ .Values.solr.zookeeper.replicas }}
         zookeeperPodPolicy:
           resources:
             limits:
               memory: "{{ .Values.solr.zookeeper.resources.limits.memory }}"
             requests:
               cpu: "{{ .Values.solr.zookeeper.resources.requests.cpu }}"
               memory: "{{ .Values.solr.zookeeper.resources.requests.memory }}"
     solrOpts: "{{ .Values.solr.solrOpts }}"
     solrGCTune: "{{ .Values.solr.solrGCTune }}"
     solrAddressability:
       commonServicePort: 8983
   ```
   
   </p>
   </details>
   
   I also tried setting `SolrCloud.Spec.solrAddressability.podPort` to 80 and 
that did change the port that the headless service was listening on to 80 which 
may have worked, but that threw errors because the port is privileged and the 
pod wasn't able to use it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to