Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emqx 5.3.2 with emqx-operator won't start on k8s #12253

Closed
jiangwensm opened this issue Jan 4, 2024 · 5 comments
Closed

emqx 5.3.2 with emqx-operator won't start on k8s #12253

jiangwensm opened this issue Jan 4, 2024 · 5 comments
Labels

Comments

@jiangwensm
Copy link

jiangwensm commented Jan 4, 2024

What happened?

new replicant Pod won't start after editing File Acl, looks like it won't copy acl file data/authz/acl.conf from other Pods

2024-01-04T06:01:35.128157+00:00 [alert] explain: No such file or directory, msg: failed_to_read_acl_file, path: data/authz/acl.conf
EMQX_API_KEY__BOOTSTRAP_FILE [api_key.bootstrap_file]: /opt/emqx/data/bootstrap_api_key
EMQX_DASHBOARD__LISTENERS__HTTP__BIND [dashboard.listeners.http.bind]: 18083
EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual
EMQX_CLUSTER__DNS__RECORD_TYPE [cluster.dns.record_type]: srv
EMQX_CLUSTER__DNS__NAME [cluster.dns.name]: emqx5-test-headless.tool.svc.cluster.local
EMQX_CLUSTER__DISCOVERY_STRATEGY [cluster.discovery_strategy]: dns
EMQX_NODE__ROLE [node.role]: replicant
EMQX_NODE__DATA_DIR [node.data_dir]: data
EMQX_NODE__COOKIE [node.cookie]: ******
EMQX_NODE__NAME [node.name]: emqx@192.168.182.245
2024-01-04T06:01:35.949947+00:00 [error] failed_to_check_schema: emqx_conf_schema
2024-01-04T06:01:35.950023+00:00 [error] #{kind => validation_error,matched_type => "authz:file",path => "authorization.sources.3.path",reason => failed_to_read_acl_file,value => "data/authz/acl.conf"}
ERROR: call_hocon_failed: -v -t 2024.01.04.06.01.34 -s emqx_conf_schema -c /opt/emqx/etc/emqx.conf -d /opt/emqx/data/configs generate

What did you expect to happen?

copy acl file data/authz/acl.conf from other Pods

How can we reproduce it (as minimally and precisely as possible)?

edit File Acl Content through dashboard,and restart replicant Pod

Anything else we need to know?

No response

EMQX version

docker image emqx:5.3.2

emqx-operator 2.2.5

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

Log files

@jiangwensm jiangwensm added the BUG label Jan 4, 2024
@id
Copy link
Collaborator

id commented Jan 4, 2024

@jiangwensm please help us to investigate this by providing test scenario to reproduce the issue as minimally and precisely as possible.

@jiangwensm
Copy link
Author

@jiangwensm please help us to investigate this by providing test scenario to reproduce the issue as minimally and precisely as possible.

@id edit File Acl Content through dashboard,and restart replicant Pod

@jiangwensm
Copy link
Author

jiangwensm commented Jan 4, 2024

the docs says:

If file-based authorizer is editted through Dashboard or REST API, EMQX stores the new file to data/authz/acl.conf and stops reading the configuration in the original file.

cluster.hocon(stores the acl file path)

If a certain cluster node is restarted or some new nodes are added, the node will automatically copy and apply the configuration file cluster.hocon from other nodes within the cluster, therefore there is no need nor recommended to configure it manually.

according to the docs, I guess it copies edited cluster.hocon from other Pods, and won't copy data/authz/acl.conf, thus resulted in this problem.

@id
Copy link
Collaborator

id commented Jan 4, 2024

Thanks, I managed to reproduce the issue. Verifying with the team.

@id
Copy link
Collaborator

id commented Jan 4, 2024

@jiangwensm we have identified that this issue is with the emqx-operator.

I'm going to close this issue now since there is no bug in EMQX. Please feel free to follow emqx/emqx-operator#983 instead.

@id id closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants