在此页面上
配置
总结 本主题列出了您在配置 Apstra Flow 时可能看到的配置错误。
CA 证书路径不正确
收集器的日志指示输出的证书文件路径不正确。
-
症状:收集器的日志指示类似于以下内容的消息:
{"level":"panic","ts":"2023-08-25T11:34:48.953Z","logger":"flowcoll","caller":"opensearch/instance_registration.go:33","msg":"failed to instantiate config","code":"opensearch/conf-error","reason":"ENV: 'EF_OUTPUT_OPENSEARCH_TLS_CA_CERT_FILEPATH' Value: '/root/http_ca.crt' Error: failed 'file_if_set' validation"
请注意消息:
Error: failed 'file_if_set' validation
。 -
问题:收集器无法在为输出指定的路径中找到文件。对于 OpenSearch,输出为:
EF_OUTPUT_OPENSEARCH_TLS_CA_CERT_FILEPATH
。如果此设置不为空,则必须将其设置为有效的证书文件,否则收集器将不会运行。 解决方案:
设置
EF_OUTPUT_OPENSEARCH_TLS_CA_CERT_FILEPATH
EF_OUTPUT_OPENSEARCH_TLS_SKIP_VERIFICATION
打开搜索身份验证失败
收集器的日志指示 failed to bootstrap opensearch
和 unable to authenticate user [<username>] for REST request
。
-
症状:收集器的日志指示类似于以下内容的消息:
2023-09-23T18:05:19.604Z error bootstrapper[opensearch] opensearch/bootstrap.go:147 failed to bootstrap opensearch. retrying... {"code": "opensearch/bootstrap-failure", "reason": "error while creating default ilm policy - GET ism policy error for ism policies 'network'- status code 401 not expected - {\"error\":{\"header\":{\"WWW-Authenticate\":[\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\",\"Bearer realm=\\\"security\\\"\",\"ApiKey\"]},\"reason\":\"unable to authenticate user [xxxxZZopen] for REST request [/_plugins/_ism/policies/network]\",\"root_cause\":[{\"header\":{\"WWW-Authenticate\":[\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\",\"Bearer realm=\\\"security\\\"\",\"ApiKey\"]},\"reason\":\"unable to authenticate user [xxxxZZopen] for REST request [/_plugins/_ism/policies/network]\",\"type\":\"security_exception\"}],\"type\":\"security_exception\"},\"status\":401}"} github.com/juniper/flowcoll/pkg/outputs/opensearch.(*Bootstrap).Run /tmp/flowcoll/pkg/outputs/opensearch/bootstrap.go:147 github.com/juniper/flowcoll/pkg/outputs/opensearch.NewCreateInstanceFunc.func1 /tmp/flowcoll/pkg/outputs/opensearch/instance_registration.go:155 github.com/juniper/flowcoll/pkg/instantiator.(*Instantiator).Run /tmp/flowcoll/pkg/instantiator/instantiator.go:79
-
问题:收集器的 OpenSearch 输出无法使用 中
EF_OUTPUT_OPENSEARCH_ADDRESSES
指定的 OpenSearch 主机进行身份验证。 -
解决方案:验证您输入的用户名 (
EF_OUTPUT_OPENSEARCH_USERNAME
) 和密码 (EF_OUTPUT_OPENSEARCH_PASSWORD
) 是否正确。您可以使用命令手动curl
测试用户名和密码。例如:curl -XGET https://127.0.0.1:9200/_cat/indices -u username:password --insecure