感谢,我在试试,刚才把authentication.1 加上引号确实解决了上个错误,不过现在包错缺少missing_mechanism_field字段但是我写的配置文件中有mechanism字段
{“level”:“error”,“ts”:“2024-06-20T09:42:25Z”,“msg”:“Reconciler error”,“controller”:“emqx”,“controllerGroup”:“apps.emqx.io”,“controllerKind”:“EMQX”,“EMQX”:{“name”:“emqx”,“namespace”:“emqx-operator-system”},“namespace”:“emqx-operator-system”,“name”:“emqx”,“reconcileID”:“d3881bf1-96df-40e3-8d5c-363793b91757”,“error”:“failed to put emqx config: failed to put API http://10.10.12.10:18083/api/v5/configs?mode=merge, status : 500 Internal Server Error, body: {"code":"INTERNAL_ERROR","message":"throw, {emqx_conf_schema,[#{reason => \"missing_mechanism_field\",path => \"authentication.1\",kind => validation_error}]}, [{hocon_tconf,assert,2,[{file,\"hocon_tconf.erl\"},{line,1230}]},{hocon_tconf,map,4,[{file,\"hocon_tconf.erl\"},{line,303}]},{hocon_tconf,do_check,4,[{file,\"hocon_tconf.erl\"},{line,267}]},{emqx_config,‘-fill_defaults/2-fun-0-’,5,[{file,\"emqx_config.erl\"},{line,490}]},{maps,fold_1,4,[{file,\"maps.erl\"},{line,416}]},{emqx_conf_cli,check_config,2,[{file,\"emqx_conf_cli.erl\"},{line,406}]},{emqx_conf_cli,load_config_from_raw,2,[{file,\"emqx_conf_cli.erl\"},{line,246}]},{emqx_mgmt_api_configs,configs,3,[{file,\"emqx_mgmt_api_configs.erl\"},{line,369}]},{minirest_handler,apply_callback,3,[{file,\"minirest_handler.erl\"},{line,152}]},{minirest_handler,handle,2,[{file,\"minirest_handler.erl\"},{line,56}]},{minirest_handler,init,2,[{file,\"minirest_handler.erl\"},{line,27}]},{cowboy_handler,execute,2,[{file,\"cowboy_handler.erl\"},{line,41}]},{cowboy_stream_h,execute,3,[{file,\"cowboy_stream_h.erl\"},{line,318}]},{cowboy_stream_h,request_process,3,[{file,\"cowboy_stream_h.erl\"},{line,302}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,241}]}]"}”,“errorVerbose”:“failed to put API http://10.10.12.10:18083/api/v5/configs?mode=merge, status : 500 Internal Server Error, body: {"code":"INTERNAL_ERROR","message":"throw, {emqx_conf_schema,[#{reason => \"missing_mechanism_field\",path => \"authentication.1\",kind => validation_error}]}, [{hocon_tconf,assert,2,[{file,\"hocon_tconf.erl\"},{line,1230}]},{hocon_tconf,map,4,[{file,\"hocon_tconf.erl\"},{line,303}]},{hocon_tconf,do_check,4,[{file,\"hocon_tconf.erl\"},{line,267}]},{emqx_config,‘-fill_defaults/2-fun-0-’,5,[{file,\"emqx_config.erl\"},{line,490}]},{maps,fold_1,4,[{file,\"maps.erl\"},{line,416}]},{emqx_conf_cli,check_config,2,[{file,\"emqx_conf_cli.erl\"},{line,406}]},{emqx_conf_cli,load_config_from_raw,2,[{file,\"emqx_conf_cli.erl\"},{line,246}]},{emqx_mgmt_api_configs,configs,3,[{file,\"emqx_mgmt_api_configs.erl\"},{line,369}]},{minirest_handler,apply_callback,3,[{file,\"minirest_handler.erl\"},{line,152}]},{minirest_handler,handle,2,[{file,\"minirest_handler.erl\"},{line,56}]},{minirest_handler,init,2,[{file,\"minirest_handler.erl\"},{line,27}]},{cowboy_handler,execute,2,[{file,\"cowboy_handler.erl\"},{line,41}]},{cowboy_stream_h,execute,3,[{file,\"cowboy_stream_h.erl\"},{line,318}]},{cowboy_stream_h,request_process,3,[{file,\"cowboy_stream_h.erl\"},{line,302}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,241}]}]"}\ngithub.com/emqx/emqx-operator/controllers/apps/v2beta1.putEMQXConfigsByAPI\n\t/workspace/controllers/apps/v2beta1/sync_emqx_config.go:131\ngithub.com/emqx/emqx-operator/controllers/apps/v2beta1.(*syncConfig).reconcile\n\t/workspace/controllers/apps/v2beta1/sync_emqx_config.go:85\ngithub.com/emqx/emqx-operator/controllers/apps/v2beta1.(*EMQXReconciler).Reconcile\n\t/workspace/controllers/apps/v2beta1/emqx_controller.go:137\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:227\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1650\nfailed to put emqx config\ngithub.com/emqx/emqx-operator/controllers/apps/v2beta1.(*syncConfig).reconcile\n\t/workspace/controllers/apps/v2beta1/sync_emqx_config.go:86\ngithub.com/emqx/emqx-operator/controllers/apps/v2beta1.(*EMQXReconciler).Reconcile\n\t/workspace/controllers/apps/v2beta1/emqx_controller.go:137\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:227\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1650”,“stacktrace”:“sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.2/pkg/internal/controller/controller.go:227”}