Opensearch-dashboards cannot connect to the opensearch server

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch v2.11.1
OpensearchDashboard 2.11.1
Server OS Debian 11
Browser Google Chrome

Опишите проблему:
opensearch-dashboards cannot connect to the opensearch server

Configuration:
opensearch.yml
discovery.type: single-node

discovery.seed_hosts: [“127.0.0.1”, “10.3.4.174”]

plugins.security.ssl.transport.pemcert_filepath: certs/opensearch-01.pem
plugins.security.ssl.transport.pemkey_filepath: certs/opensearch-01-key.pem
plugins.security.ssl.transport.pemtrustedcas_filepath: certs/root-ca.pem
plugins.security.ssl.transport.enforce_hostname_verification: false
plugins.security.ssl.http.enabled: true
plugins.security.ssl.http.pemcert_filepath: certs/opensearch-01.pem
plugins.security.ssl.http.pemkey_filepath: certs/opensearch-01-key.pem
plugins.security.ssl.http.pemtrustedcas_filepath: certs/root-ca.pem
plugins.security.allow_unsafe_democertificates: true
plugins.security.allow_default_init_securityindex: true
plugins.security.authcz.admin_dn:
‘CN=opensearch-01,OU=DSRC,O=LABICS,L=SAINT-PETERSBURG,ST=SAINT-PETERSBURG,C=RU’
plugins.security.nodes_dn:
‘CN=opensearch-01,OU=DSRC,O=LABICS,L=SAINT-PETERSBURG,ST=SAINT-PETERSBURG,C=RU’

plugins.security.audit.type: internal_opensearch
plugins.security.enable_snapshot_restore_privilege: true
plugins.security.check_snapshot_restore_write_privileges: true
plugins.security.restapi.roles_enabled: [“all_access”, “security_rest_api_access”]
plugins.security.system_indices.enabled: true
plugins.security.system_indices.indices: [“.plugins-ml-config”, “.plugins-ml-connector”, “.plugins-ml-model-group”, “.plugins-ml-model”, “.plugins-ml-task”, “.plugins-ml-conversation-meta”, “.plugins-ml-conversation-interactions”, “.opendistro-alerting-config”, “.opendistro-alerting-alert*”, “.opendistro-anomaly-results*”, “.opendistro-anomaly-detector*”, “.opendistro-anomaly-checkpoints”, “.opendistro-anomaly-detection-state”, “.opendistro-reports-", ".opensearch-notifications-”, “.opensearch-notebooks”, “.opensearch-observability”, “.ql-datasources”, “.opendistro-asynchronous-search-response*”, “.replication-metadata-store”, “.opensearch-knn-models”, “.geospatial-ip2geo-data*”]

opensearch-dashboards.yml
server.port: 5601

server.host: “10.3.4.177”

server.name: “kibana”

opensearch.hosts: [“https://opensearch-01.mnc078.mcc250.dsrc.labics.ru:9200”]
opensearch.ssl.verificationMode: full
opensearch.username: “admin”
opensearch.password: “*****************”
opensearch.requestHeadersAllowlist: [ authorization,securitytenant ]
server.ssl.enabled: true
server.ssl.certificate: /usr/share/opensearch-certificates/admin.pem
server.ssl.key: /usr/share/opensearch-certificates/admin-key.pem
opensearch.ssl.certificateAuthorities: [ “/usr/share/opensearch-certificates/root-ca.pem” ]
opensearch_security.multitenancy.enabled: true
opensearch_security.multitenancy.tenants.preferred: [“Private”, “Global”]
opensearch_security.readonly_mode.roles: [“opensearch_dashboards_read_only”]
opensearch_security.cookie.secure: true

opensearchDashboards.index: “.opensearch_dashboards”
logging.dest: /var/log/opensearch-dashboards/opensearch-dashboards.log

Relevant Logs or Screenshots:
/var/log/opensearch/opensearch.log
[2024-01-26T11:50:09,912][WARN ][o.o.s.a.BackendRegistry ] [opensearch-01] Authentication finally failed for admin from 10.3.4.177:34238
[2024-01-26T11:50:12,414][WARN ][o.o.s.a.BackendRegistry ] [opensearch-01] Authentication finally failed for admin from 10.3.4.177:34238
[2024-01-26T11:50:14,916][WARN ][o.o.s.a.BackendRegistry ] [opensearch-01] Authentication finally failed for admin from 10.3.4.177:34238
[2024-01-26T11:50:17,419][WARN ][o.o.s.a.BackendRegistry ] [opensearch-01] Authentication finally failed for admin from 10.3.4.177:34238
[2024-01-26T11:50:19,919][WARN ][o.o.s.a.BackendRegistry ] [opensearch-01] Authentication finally failed for admin from 10.3.4.177:34238
[2024-01-26T11:50:22,422][WARN ][o.o.s.a.BackendRegistry ] [opensearch-01] Authentication finally failed for admin from 10.3.4.177:34238
[2024-01-26T11:50:24,924][WARN ][o.o.s.a.BackendRegistry ] [opensearch-01] Authentication finally failed for admin from 10.3.4.177:34238
[2024-01-26T11:50:27,424][WARN ][o.o.s.a.BackendRegistry ] [opensearch-01] Authentication finally failed for admin from 10.3.4.177:34238
[2024-01-26T11:50:29,926][WARN ][o.o.s.a.BackendRegistry ] [opensearch-01] Authentication finally failed for admin from 10.3.4.177:34238
[2024-01-26T11:50:32,428][WARN ][o.o.s.a.BackendRegistry ] [opensearch-01] Authentication finally failed for admin from 10.3.4.177:34238

/var/log/opensearch-dashboards/opensearch-dashboards.log
{“type”:“log”,“@timestamp”:“2024-01-26T08:37:13Z”,“tags”:[“info”,“plugins-service”],“pid”:6617,“message”:“Plugin "dataSourceManagement" has been disabled since the following direct or transitive dependencies are missing or disabled: [dataSource]”}
{“type”:“log”,“@timestamp”:“2024-01-26T08:37:13Z”,“tags”:[“info”,“plugins-service”],“pid”:6617,“message”:“Plugin "dataSource" is disabled.”}
{“type”:“log”,“@timestamp”:“2024-01-26T08:37:13Z”,“tags”:[“info”,“plugins-service”],“pid”:6617,“message”:“Plugin "visTypeXy" is disabled.”}
{“type”:“log”,“@timestamp”:“2024-01-26T08:37:13Z”,“tags”:[“info”,“plugins-system”],“pid”:6617,“message”:“Setting up [51] plugins: [usageCollection,opensearchDashboardsUsageCollection,opensearchDashboardsLegacy,mapsLegacy,share,opensearchUiShared,legacyExport,embeddable,expressions,data,securityAnalyticsDashboards,home,apmOss,savedObjects,searchRelevanceDashboards,reportsDashboards,dashboard,mlCommonsDashboards,visualizations,visTypeVega,visTypeTimeline,visTypeTable,visTypeMarkdown,visBuilder,visAugmenter,anomalyDetectionDashboards,alertingDashboards,tileMap,regionMap,customImportMapDashboards,inputControlVis,ganttChartDashboards,visualize,queryWorkbenchDashboards,indexManagementDashboards,notificationsDashboards,management,indexPatternManagement,advancedSettings,console,dataExplorer,charts,visTypeVislib,visTypeTimeseries,visTypeTagcloud,visTypeMetric,observabilityDashboards,discover,savedObjectsManagement,securityDashboards,bfetch]”}
{“type”:“log”,“@timestamp”:“2024-01-26T08:37:14Z”,“tags”:[“info”,“savedobjects-service”],“pid”:6617,“message”:“Waiting until all OpenSearch nodes are compatible with OpenSearch Dashboards before starting saved objects migrations…”}
{“type”:“log”,“@timestamp”:“2024-01-26T08:37:14Z”,“tags”:[“error”,“opensearch”,“data”],“pid”:6617,“message”:“[ResponseError]: Response Error”}
{“type”:“log”,“@timestamp”:“2024-01-26T08:37:14Z”,“tags”:[“error”,“savedobjects-service”],“pid”:6617,“message”:“Unable to retrieve version information from OpenSearch nodes.”}
{“type”:“log”,“@timestamp”:“2024-01-26T08:37:16Z”,“tags”:[“error”,“opensearch”,“data”],“pid”:6617,“message”:“[ResponseError]: Response Error”}
{“type”:“log”,“@timestamp”:“2024-01-26T08:37:19Z”,“tags”:[“error”,“opensearch”,“data”],“pid”:6617,“message”:“[ResponseError]: Response Error”}
{“type”:“log”,“@timestamp”:“2024-01-26T08:37:21Z”,“tags”:[“error”,“opensearch”,“data”],“pid”:6617,“message”:“[ResponseError]: Response Error”}
{“type”:“log”,“@timestamp”:“2024-01-26T08:37:24Z”,“tags”:[“error”,“opensearch”,“data”],“pid”:6617,“message”:“[ResponseError]: Response Error”}

Hi @AndAsh,

Could you run the curl command below and share the output:

curl --insecure -u <opensearch.username>:<opensearch.password> -XGET https://<OS_node>:9200/_plugins/_security/authinfo?pretty

best,
mj

1 Like