Guys, I made a new opensearch cluster with 1 server for dashboards, 2 master servers, 1 server for coordinator and 4 data servers.
I configured docker and started all opensearch servers and they all show in the logs the message:
[2022-10-09T22:40:42,806][ERROR][o.o.s.a.BackendRegistry ] [bbsearch2-cm1] Not yet initialized (you may need to run securityadmin)
And in the dashboard server log the message appears:
FATAL Error: [config validation of [opensearch].hosts]: types that failed validation:
- [config validation of [opensearch].hosts.0]: expected URI with scheme [http|https].
- [config validation of [opensearch].hosts.1]: could not parse array value from json input
I’ll send the compose in the comments
this is docker compose from opendashboards server, the other servers are pretty much the same
version: ‘3’
services:
bbsearch2-clustermanager1:
image: opensearchproject/opensearch:2.3.0
container_name: search2-clustermanager-112
environment:
- cluster.name=search2-cluster
- node.name=search2-cm1
- node.roles=Cluster manager
- discovery.seed_hosts=XXX.XXX.XXX.XXX
- cluster.initial_cluster_manager_nodes=yyy.yyy.yyy.yyy,xxx.xxx.xxx.xxx
- bootstrap.memory_lock=true
- “OPENSEARCH_JAVA_OPTS=-Xms16g -Xmx16g”
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data:/usr/share/opensearch/data
- dicionarios:/usr/share/opensearch/config/stopwords
ports:
- 9200:9200
- 9600:9600 # required for Performance Analyzer
network_mode: “host”
volumes:
opensearch-data:
driver: local
driver_opts:
type: ‘none’
o: ‘bind’
device: ‘/dados/docker/opensearch/data’
dicionarios:
driver: local
driver_opts:
type: ‘none’
o: ‘bind’
device: ‘/dados/docker/dicionarios’
this is docker compose from the dashboards server
version: ‘3’
services:
search2-dashboard1:
image: opensearchproject/opensearch-dashboards:2.3.0
container_name: search2-dashboards-191
ports:
- 5601:5601
expose:
- “5601”
volumes:
- ./opensearch_dashboards.yml:/usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
- ./logo_topo.png:/usr/share/opensearch-dashboards/src/core/server/core_app/assets/custom/logo_topo.png
- ./mark.png:/usr/share/opensearch-dashboards/src/core/server/core_app/assets/custom/mark.png
environment:
OPENSEARCH_HOSTS: ‘[“https://xxx.xxx.xxx.xxx”]’
TZ: ‘America/Sao_Paulo’
mem_limit: 16g
opensearch.username: “admin”
opensearch.password: “admin”
opensearch.ssl.verificationMode: none
#DISABLE_SECURITY_DASHBOARDS_PLUGIN: true
network_mode: “host”
this opensearch_dashboards.yml
server.host: ‘xxx.xxx.xxx.xxx’
opensearch.hosts: [https://xxx.xxx.xxx.xxx:9200,https://qqq.qqq.qqq.qqq:9200]
opensearch.ssl.verificationMode: none
opensearch.username: kibanaserver
opensearch.password: kibanaserver
opensearch.requestHeadersWhitelist: [authorization, securitytenant]
opensearchDashboards.branding:
logo:
defaultUrl: “http://xxx.xxx.xxx.xxx:5601/ui/custom/logo_topo.png”
darkModeUrl: “http://xxx.xxx.xxx.xxx:5601/ui/custom/logo_topo.png”
mark:
defaultUrl: “http://xxx.xxx.xxx.xxx:5601/ui/custom/mark.png”
darkModeUrl: “http://xxx.xxx.xxx.xxx:5601/ui/custom/mark.png”
#loadingLogo:
#defaultUrl: “”
#darkModeUrl: “”
#faviconUrl: “”
applicationTitle: “Search 2”
sideBarDescription:
dashboards: “Painéis”
plugins: “Aplicações”
Hi @angelogabeira - sorry to read about the trouble you’re having.
The error messages here:
- [config validation of [opensearch].hosts.0]: expected URI with scheme [http|https].
- [config validation of [opensearch].hosts.1]: could not parse array value from json input
lead me to believe that there’s either missing information from the docker compose, or something malformed (I suspect malformed - it’s talking about an expected scheme on host 0, and a parsing error for host 1.
Here’s a few divergences that I can see from just a basic known-to-be-working docker-compose.yml:
-
The entries for environment -> discovery.seed_hosts
are listed as node names not IP addreses. I’m not sure if this is an issue or not. The error message talks about a parsing error, so it’s a good lead I think. Same with cluster.initial_cluster_manager_nodes
-
Some of the indentation didn’t make it through being copy-pasted. Double check that your YAML is properly formatted. I’m mostly looking at the opensearchDashboards.branding
section where there are empty entries, and subsections that aren’t being led with dashes. This is a likely culprit for a parsing error.
Let me know if that helps, and if you still have trouble, try pasting your configs here again but try enclosing them in a code block or as preformatted text -
1 Like