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

helm install emqx Custom EMQX_LOADED_PLUGINS #660

Closed
liuxingjun opened this issue Jul 16, 2021 · 15 comments
Closed

helm install emqx Custom EMQX_LOADED_PLUGINS #660

liuxingjun opened this issue Jul 16, 2021 · 15 comments

Comments

@liuxingjun
Copy link

liuxingjun commented Jul 16, 2021

Environment

  • EMQ: 4.3.5

Description

###Repetition steps

# helm3 search repo emqx
NAME            CHART VERSION   APP VERSION     DESCRIPTION                             
emqx/emqx       4.3.5           4.3.5           A Helm chart for EMQ X                  
emqx/emqx-ee    4.2.6           4.2.6           A Helm chart for EMQ X Enterprise       
emqx/kuiper     0.9.0           0.9.0           A lightweight IoT edge analytic software

add env EMQX_LOADED_PLUGINS to values.yaml

emqxConfig:
  EMQX_CLUSTER__K8S__APISERVER: "https://kubernetes.default.svc:443"
  ## The address type is used to extract host from k8s service.
  ## Value: ip | dns | hostname
  ## Note:Hostname is only supported after v4.0-rc.2
  EMQX_CLUSTER__K8S__ADDRESS_TYPE: "hostname"
  EMQX_CLUSTER__K8S__SUFFIX: "svc.cluster.local"
  ## if EMQX_CLUSTER__K8S__ADDRESS_TYPE eq dns
  # EMQX_CLUSTER__K8S__SUFFIX: "pod.cluster.local"
  EMQX_LOADED_PLUGINS: "emqx_dashboard"

run helm3 install connliu -n connliu emqx/emqx -f values.yaml

# kubectl get pod -n connliu
NAME             READY   STATUS             RESTARTS   AGE
connliu-emqx-0   0/1     CrashLoopBackOff   1          8s
# kubectl logs -n connliu  connliu-emqx-0 emqx 
EMQX_LOADED_PLUGINS=emqx_dashboard
/usr/bin/docker-entrypoint.sh: line 101: /opt/emqx/data/loaded_plugins: Read-only file system

Normal helm install

# helm3 install  connliu -n connliu  emqx/emqx
NAME: connliu
LAST DEPLOYED: Fri Jul 16 11:39:49 2021
NAMESPACE: connliu
STATUS: deployed
REVISION: 1
TEST SUITE: None

# kubectl get pod -n connliu 
NAME             READY   STATUS    RESTARTS   AGE
connliu-emqx-0   1/1     Running   0          13s

# kubectl exec -it -n connliu connliu-emqx-0 -- ls -l /opt/emqx/data/
total 24
drwxrwxr-x    2 emqx     emqx          4096 Jul 16 03:39 configs
-rw-r--r--    1 root     emqx           177 Jul 16 03:39 loaded_modules
-rw-r--r--    1 root     emqx           169 Jul 16 03:39 loaded_plugins
drwxrwsrwx    3 root     emqx          4096 Jul 16 03:39 mnesia
drwxrwxr-x    2 emqx     emqx          4096 Jun 28 06:57 patches
drwxrwxr-x    2 emqx     emqx          4096 Jun 28 06:57 scripts

The permissions of directories loaded_modules and loaded_plugins are different from others

Custom EMQX_LOADED_PLUGINS docker install

# docker run -d --name emqx -p 18083:18083 -e EMQX_LOADED_PLUGINS="emqx_dashboard" emqx/emqx:4.3.5
189f7061d4e8ca2a96211baf3930ff0770e5f6deb3c264f3405287b59ac4e20d

# docker exec emqx ls -l /opt/emqx/data/
total 24
drwxrwxr-x    2 emqx     emqx          4096 Jul 16 03:34 configs
-rw-rw-r--    1 emqx     emqx            58 Jun 28 06:54 loaded_modules
-rw-rw-r--    1 emqx     emqx           192 Jul 16 03:34 loaded_plugins
drwxrwxr-x    3 emqx     emqx          4096 Jul 16 03:34 mnesia
drwxrwxr-x    2 emqx     emqx          4096 Jun 28 06:57 patches
drwxrwxr-x    2 emqx     emqx          4096 Jun 28 06:57 scripts
@iMadriver
Copy link

Hi, did you solved your issue? I hope to start "emqx_auth_mnesia" with helm commands, and result in "CrashLoopBackOff".

@liuxingjun
Copy link
Author

Hi, did you solved your issue? I hope to start "emqx_auth_mnesia" with helm commands, and result in "CrashLoopBackOff".

You can use kubectl logs to see if this is the same problem as mine

@liuxingjun
Copy link
Author

Hi, did you solved your issue? I hope to start "emqx_auth_mnesia" with helm commands, and result in "CrashLoopBackOff".

I use 4.2.13 temporarily available

@iMadriver
Copy link

My emqx/emqx version is 4.3.5. And after I added EMQX_LOADED_PLUGINS: "emqx_auth_mnesia" in values.yaml, it seems ok but nothing changes. The emqx_auth_mnesia is still not started, verifired in dashboard.

@iMadriver
Copy link

Hi, did you solved your issue? I hope to start "emqx_auth_mnesia" with helm commands, and result in "CrashLoopBackOff".

You can use kubectl logs to see if this is the same problem as mine

I checked the log and got [error] [Plugins] Write File "data/loaded_plugins" Error: erofs, seems the same as your issue

@liuxingjun
Copy link
Author

Hi, did you solved your issue? I hope to start "emqx_auth_mnesia" with helm commands, and result in "CrashLoopBackOff".

You can use kubectl logs to see if this is the same problem as mine

I checked the log and got [error] [Plugins] Write File "data/loaded_plugins" Error: erofs, seems the same as your issue

use version 4.2.13 for the time being
helm3 install test emqx/emqx -f values.yaml --version 4.2.13

@iMadriver
Copy link

Hi, did you solved your issue? I hope to start "emqx_auth_mnesia" with helm commands, and result in "CrashLoopBackOff".

You can use kubectl logs to see if this is the same problem as mine

I checked the log and got [error] [Plugins] Write File "data/loaded_plugins" Error: erofs, seems the same as your issue

use version 4.2.13 for the time being
helm3 install test emqx/emqx -f values.yaml --version 4.2.13

wonderful!

@lpaulusLohr
Copy link

Update, I have same issue with 4.3.8 need to rollback to 4.2.13

@gcdd1993
Copy link

gcdd1993 commented Jan 7, 2022

mark, I have same issue with 4.3.11

@barisvelioglu
Copy link
Contributor

barisvelioglu commented Feb 25, 2022

Same issue as well with 4.4.0

@barisvelioglu
Copy link
Contributor

barisvelioglu commented Feb 26, 2022

Adding

EMQX_LOADED_PLUGINS: "emqx_dashboard"

gives me the same error. But when I try to load it by using

emqxLoadedPlugins: >

on values.yaml, it works fine

## EMQX configuration item, see the documentation (https://hub.docker.com/r/emqx/emqx)
emqxConfig:
  EMQX_NAME:  "{{ .Release.Name }}"

  ## Cluster discovery by dns
  # EMQX_CLUSTER__DISCOVERY: "dns"
  # EMQX_CLUSTER__DNS__NAME: "{{ .Release.Name }}-headless.{{ .Release.Namespace }}.svc.cluster.local"
  # EMQX_CLUSTER__DNS__APP: "{{ .Release.Name }}"
  # EMQX_CLUSTER__DNS__TYPE: "srv"

  ## Cluster discovery by k8s
  EMQX_CLUSTER__DISCOVERY: "k8s"
  EMQX_CLUSTER__K8S__APP_NAME: "{{ .Release.Name }}"
  EMQX_CLUSTER__K8S__APISERVER: "https://kubernetes.default.svc:443"
  EMQX_CLUSTER__K8S__SERVICE_NAME: "{{ .Release.Name }}-headless"
  EMQX_CLUSTER__K8S__NAMESPACE: "{{ .Release.Namespace }}"
  ## The address type is used to extract host from k8s service.
  ## Value: ip | dns | hostname
  ## Note:Hostname is only supported after v4.0-rc.2
  EMQX_CLUSTER__K8S__ADDRESS_TYPE: "hostname"
  EMQX_CLUSTER__K8S__SUFFIX: "svc.cluster.local"
  EMQX_ALLOW_ANONYMOUS: false
  EMQX_AUTH__MONGO__SERVER: "mongodb:27017"
  EMQX_AUTH__MONGO__LOGIN: "root"
  EMQX_AUTH__MONGO__PASSWORD: "mycrazystrongpublicpassword"
  EMQX_AUTH__MONGO__AUTH_SOURCE: "admin"
  EMQX_AUTH__MONGO__AUTH_QUERY__PASSWORD_HASH: "sha256"
  ## if EMQX_CLUSTER__K8S__ADDRESS_TYPE eq dns
  # EMQX_CLUSTER__K8S__SUFFIX: "pod.cluster.local"

## --------------------------------------------------------------------
##  [ACL](https://docs.emqx.io/broker/latest/en/advanced/acl-file.html)

##  -type(who() :: all | binary() |
##                 {ipaddr, esockd_access:cidr()} |
##                 {client, binary()} |
##                 {user, binary()}).

##  -type(access() :: subscribe | publish | pubsub).

##  -type(topic() :: binary()).

##  -type(rule() :: {allow, all} |
##                  {allow, who(), access(), list(topic())} |
##                  {deny, all} |
##                  {deny, who(), access(), list(topic())}).
## --------------------------------------------------------------------
emqxAclConfig: >
  {allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
  {allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
  {deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
  {allow, all}.

emqxLoadedPlugins: >
  {emqx_management, true}.
  {emqx_recon, true}.
  {emqx_retainer, true}.
  {emqx_dashboard, true}.
  {emqx_telemetry, true}.
  {emqx_rule_engine, true}.
  {emqx_bridge_mqtt, false}.
  {emqx_auth_mongo, true}.

emqxLoadedModules: >
  {emqx_mod_acl_internal, true}.
  {emqx_mod_presence, true}.
  {emqx_mod_trace, false}.
  {emqx_mod_st_statistics, false}.
  {emqx_mod_delayed, true}.
  {emqx_mod_rewrite, true}.
  {emqx_mod_subscription, true}.
  {emqx_mod_topic_metrics, true}.

@ylcrow
Copy link

ylcrow commented Apr 13, 2022

kubectl edit configmap xxxx--loaded-plugins

@xiemeilong
Copy link

Same issue as well with 4.4.2

@zhonghuali
Copy link

Same issue as well with latest version 4.4.19, but docker run work fine.

@Rory-Z
Copy link
Member

Rory-Z commented Dec 6, 2023

Hi guys, now EMQ X no longer uses this repository since version 4.3. Use https://github.com/emqx/emqx/ instead.

@Rory-Z Rory-Z closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants