Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Opensearch Dashboard Version:2.10.0
Describe the issue:
{"type":"log","@timestamp":"2024-06-03T07:06:52Z","tags":["error","opensearch","data"],"pid":1,"message":"[ConnectionError]: getaddrinfo ENOTFOUND my-cluster.opensearch.svc.cluster.local"}
Configuration:
apiVersion: opensearch.opster.io/v1
kind: OpenSearchCluster
metadata:
name: my-cluster
namespace: opensearch
spec:
general:
version: 2.10.0
httpPort: 9200
vendor: opensearch
serviceName: my-cluster
dashboards:
additionalConfig:
logging.verbose: "true"
opensearch_security.auth.type: '["basicauth"]'
opensearch_security.auth.multiple_auth_enabled: "True"
opensearch.optimizedHealthcheckId: "os-cluster"
opensearch_security.cookie.secure: "false"
opensearch.requestHeadersWhitelist: |
["securitytenant","Authorization","security_tenant"]
opensearch_security.readonly_mode.roles: '[ "kibana_user", "readall" ]'
opensearch.hosts: https://my-cluster.opensearc.svc.cluster.local:9200
enable: true
version: 2.10.0
replicas: 1
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "1Gi"
cpu: "500m"
confMgmt:
smartScaler: true
security:
config:
securityConfigSecret:
name: securityconfig-secret
nodePools:
- component: masters
replicas: 3
diskSize: "30Gi"
jvm: -Dopensearch.allow_insecure_settings=true
nodeSelector:
resources:
requests:
memory: "2Gi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "500m"
roles:
- "master"
- "data"
- "ingest"
persistence:
pvc:
storageClass: nfs-csi
accessModes: # You can change the accessMode
- ReadWriteOnce
Relevant Logs or Screenshots:
{"type":"log","@timestamp":"2024-06-03T07:06:52Z","tags":["error","opensearch","data"],"pid":1,"message":"[ConnectionError]: getaddrinfo ENOTFOUND my-cluster.opensearch.svc.cluster.local"}
Hi @Tamilkumar,
have you tried adding opensearch.username
and opensearch.password
to your dashboards. additionalConfig
opensearch.username: "kibanaserver"
opensearch.password: "kibanaserver"
Best,
mj
pablo
3
You’re missing “h” in opensearch.hosts
Hi @pablo ,
I’ve made mistaken while pasting over here in forum. The config has correct name and its not working sir.
opensearch.username
opensearch.password
parameters are also added in the config which is not helping out.
HI @Mantas
opensearch.username
opensearch.password
parameters are also added in the config which is not helping out. Please help
Mantas
6
@Tamilkumar, Could you run the below and share the output:
curl --insecure -u admin:admin https://my-cluster.opensearc.svc.cluster.local:9200
Thanks,
mj
Hi @Mantas
curl https://my-cluster.opensearch.svc.cluster.local:9200 -vvv -u “admin:admin” -k
- Could not resolve host: my-cluster.opensearch.svc.cluster.local
- Closing connection 0
curl: (6) Could not resolve host: my-cluster.opensearch.svc.cluster.local
if i try this with service ip its reachable:
curl https://10.233.54.110:9200 -v -u “admin:admin” -k
- Trying 10.233.54.110:9200…
- Connected to 10.233.54.110 (10.233.54.110) port 9200 (#0)
- ALPN, offering h2
- ALPN, offering http/1.1
- TLSv1.0 (OUT), TLS header, Certificate Status (22):
- TLSv1.3 (OUT), TLS handshake, Client hello (1):
- TLSv1.2 (IN), TLS header, Certificate Status (22):
- TLSv1.3 (IN), TLS handshake, Server hello (2):
- TLSv1.2 (IN), TLS header, Finished (20):
- TLSv1.2 (IN), TLS header, Supplemental data (23):
- TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
- TLSv1.3 (IN), TLS handshake, Request CERT (13):
- TLSv1.3 (IN), TLS handshake, Certificate (11):
- TLSv1.3 (IN), TLS handshake, CERT verify (15):
- TLSv1.3 (IN), TLS handshake, Finished (20):
- TLSv1.2 (OUT), TLS header, Finished (20):
- TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
- TLSv1.2 (OUT), TLS header, Supplemental data (23):
- TLSv1.3 (OUT), TLS handshake, Certificate (11):
- TLSv1.2 (OUT), TLS header, Supplemental data (23):
- TLSv1.3 (OUT), TLS handshake, Finished (20):
- SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
- ALPN, server did not agree to a protocol
- Server certificate:
- subject: C=de; L=test; O=node; OU=node; CN=node-0.example.com
- start date: Aug 29 04:23:12 2023 GMT
- expire date: Aug 26 04:23:12 2033 GMT
- issuer: DC=com; DC=example; O=Example Com Inc.; OU=Example Com Inc. Root CA; CN=Example Com Inc. Root CA
- SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
- Server auth using Basic with user ‘admin’
- TLSv1.2 (OUT), TLS header, Supplemental data (23):
GET / HTTP/1.1
Host: 10.233.54.110:9200
Authorization: Basic YWRtaW46YWRtaW4=
User-Agent: curl/7.81.0
Accept: /
- TLSv1.2 (IN), TLS header, Supplemental data (23):
- TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
- TLSv1.2 (IN), TLS header, Supplemental data (23):
- Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< content-type: application/json; charset=UTF-8
< content-length: 571
<
{
“name” : “my-cluster-masters-2”,
“cluster_name” : “my-cluster”,
“cluster_uuid” : “QTg0SrF-R9Get7_22a8QtQ”,
“version” : {
“distribution” : “opensearch”,
“number” : “2.10.0”,
“build_type” : “tar”,
“build_hash” : “eee49cb340edc6c4d489bcd9324dda571fc8dc03”,
“build_date” : “2023-09-20T23:54:29.889267151Z”,
“build_snapshot” : false,
“lucene_version” : “9.7.0”,
“minimum_wire_compatibility_version” : “7.10.0”,
“minimum_index_compatibility_version” : “7.0.0”
},
You will need to fix the above (issues with DNS?) or use IP addresses in your configuration.
best,
mj
Hi @Mantas
Even i tried giving the service ip of opensearch cluster but still the issue remains same.
Mantas
10
Hi @Tamilkumar,
It looks like you will need to look at the networking between your pods, to find a reason why "message":"[ConnectionError]
appears.
best,
mj