Hello team. The transition from version 0.2.105 to...
# troubleshoot
r
Hello team. The transition from version 0.2.105 to version 0.2.106 fails. The datahub-elasticsearch-setup-job is failing, here is the log:
Copy code
2023/01/26 14:22:48 Waiting for: <http://elasticsearch-master:9200>
Going to use protocol: http
Going to use default elastic headers
Create datahub_usage_event if needed against Elasticsearch at elasticsearch-master:9200
Going to use index prefix::
2023/01/26 14:22:48 Received 200 from <http://elasticsearch-master:9200>
Policy GET response code is
Got response code  while creating policy so exiting.
curl: option -k <http://elasticsearch-master:9200/_ilm/policy/datahub_usage_event_policy>: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
/create-indices.sh: line 41: [: -eq: unary operator expected
/create-indices.sh: line 45: [: -eq: unary operator expected
/create-indices.sh: line 47: [: -eq: unary operator expected
2023/01/26 14:22:48 Command exited with error: exit status 1
Any ideas ?
✅ 2
o
Hi! This doesn't look like a valid version, are you on a custom image?
The specific error happening here seems to be related to the policy creation which has a different flow for ElasticSearch and AWS OpenSearch, so it's possible you need to set the
USE_AWS_ELASTICSEARCH
env variable if you are deploying on AWS.
r
I use the standard images on an OVH k8s. But maybe the problem comes from the prerequisites. I don't know how datahub and prerequisites versions are related. Currently, the prerequisites version is 0.0.9. Maybe this is the problem ?
o
This is the helm chart version? 0.2.106 is several months old, prerequisites should be on 0.0.10 for 0.2.106
Not familiar with OVHCloud so not sure if there are any oddities with it
r
Yes, it is the helm chart version. I tried with version 0.0.10 of the prerequisites, same error 😕
the code concerned is here. The error is due to the use of the option
-k
in curl command, defined by :
Copy code
if [[ $ELASTICSEARCH_INSECURE ]]; then
  ELASTICSEARCH_INSECURE="-k "
fi
o
-k is a valid option for curl, maybe insecure options have been disabled on OVH Cloud's VMs? Are you able to connect with ELASTICSEARCH_INSECURE unset or set to a false value?
r
it's a little confusing... here is the job config :
Copy code
- env:                                                                        
        - name: ELASTICSEARCH_HOST                                                  
          value: elasticsearch-master                                               
        - name: ELASTICSEARCH_PORT                                                  
          value: "9200"                                                             
        - name: SKIP_ELASTICSEARCH_CHECK                                            
          value: "false"                                                            
        - name: ELASTICSEARCH_INSECURE                                              
          value: "false"                                                            
        - name: DATAHUB_ANALYTICS_ENABLED                                           
          value: "true"
o
This was your config when it was failing? Or you added this the:
Copy code
- name: ELASTICSEARCH_INSECURE                                              
          value: "false"
and it happened again? I believe this is because it's set to the false String value rather than false boolean value here based on the check.
r
thank you, the global.elasticsearch.insecure value had to be empty, indeed. It works now 👍 🙂