Coder Social home page Coder Social logo

Comments (8)

PeiyiChi avatar PeiyiChi commented on July 26, 2024

This issue still exists on EMQ3.0.

from ekka.

Rory-Z avatar Rory-Z commented on July 26, 2024

Can you send the YAML file that you started kubernetes?

from ekka.

PeiyiChi avatar PeiyiChi commented on July 26, 2024

apiVersion: v1
kind: Service
metadata:
name: emqtt
annotations: {}
labels:
app: emqtt
spec:
type: {{.Values.portType}}
selector:
app: emqtt
ports:
- port: 1883
name: mqtt
- port: 8080
name: mgmt
- port: 8083
name: websocket
- port: 80
name: dashboard
targetPort: 18083
- port: 4369
name: mapping
clusterIP: {{ .Values.serviceClusterIP }}

apiVersion: apps/v1beta2
kind: StatefulSet
metadata:
name: emqtt
spec:
replicas: {{.Values.replicas}}
selector:
matchLabels:
app: emqtt
serviceName: emqtt
template:
metadata:
labels:
app: emqtt
spec:
{{ if eq .Values.rbac.create true}}
serviceAccountName: emqtt
{{ end }}
containers:
- name: emqtt
image: {{.Values.emqttimage}}
imagePullPolicy: {{.Values.imagePullPolicy}}
ports:
- containerPort: 1883
- containerPort: 8883
- containerPort: 8080
- containerPort: 18083
- containerPort: 8083
- containerPort: 8084
- containerPort: 4369
- containerPort: 4370
- containerPort: 6369
- containerPort: 6370
- containerPort: 6371
- containerPort: 6372
- containerPort: 6373
- containerPort: 6374
- containerPort: 6375
- containerPort: 6376
- containerPort: 6377
- containerPort: 6378
readinessProbe:
tcpSocket:
port: 1883
initialDelaySeconds: 5
periodSeconds: 10
env:
- name: EMQX_NAME
value: "emqtt"
- name: EMQX_CLUSTER__DISCOVERY
value: "k8s"
- name: EMQX_CLUSTER__K8S__APISERVER
value: "https://kubernetes.default:443"
- name: EMQX_CLUSTER__K8S__NAMESPACE
value: "default"
- name: EMQX_CLUSTER__K8S__SERVICE_NAME
value: "emqtt"
- name: EMQX_CLUSTER__K8S__ADDRESS_TYPE
value: "ip"
- name: EMQX_CLUSTER__K8S__APP_NAME
value: "emqtt"
- name: EMQX_NODE__COOKIE
value: "secretcookieeeetfggggg"
- name: EMQX_CLUSTER__NAME
value: "emqcl"
- name: EMQX_CLUSTER__AUTOHEAL
value: "on"
- name: EMQX_CLUSTER__AUTOCLEAN
value: "5m"
- name: EMQX_LOG__LEVEL
value: "debug"
- name: EMQX_ALLOW_ANONYMOUS
value: "false"
- name: EMQX_LOADED_PLUGINS
value: "emqx_management,emqx_auth_http,emqx_auth_jwt,emqx_dashboard"
- name: EMQX_AUTH__HTTP__AUTH_REQ
value: "http://id-rest:8080/{}/login"
- name: EMQX_AUTH__HTTP__AUTH_REQ__METHOD
value: "get"
- name: EMQX_AUTH__HTTP__AUTH_REQ__PARAMS
value: "clientid=%c,username=%u,password=%P"
- name: EMQX_AUTH__JWT__SECRET
valueFrom:
secretKeyRef:
name: emq
key: secret

from ekka.

PeiyiChi avatar PeiyiChi commented on July 26, 2024

values.yaml file
rbac:
create: true
serviceClusterIP: 10.100.100.200
portType: NodePort
replicas: 1
emqttimage: emqtt:latest
imagePullPolicy: IfNotPresent
dev: true
enableNetworkPolicies: false

from ekka.

PeiyiChi avatar PeiyiChi commented on July 26, 2024

emq-rbac.yaml file
{{- if .Values.rbac.create -}}

apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: emqtt
subjects:

  • kind: ServiceAccount
    name: emqtt
    namespace: default
    roleRef:
    kind: ClusterRole
    name: emqtt
    apiGroup: rbac.authorization.k8s.io

apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: emqtt
labels:
k8s-app: emqtt
rules:

  • apiGroups: [""] # "" indicates the core API group
    resources:
    • pods
    • nodes
    • namespaces
    • endpoints
      verbs:
    • get
    • watch
    • list

apiVersion: v1
kind: ServiceAccount
metadata:
name: emqtt
labels:
k8s-app: emqtt
{{- if .Values.dev }}
imagePullSecrets:

  • name: awsecr-cred # this secret is created when minikube addon registry-creds is configured and enabled
    {{- end}}
    {{- end -}}

from ekka.

PeiyiChi avatar PeiyiChi commented on July 26, 2024

Any update?

from ekka.

PeiyiChi avatar PeiyiChi commented on July 26, 2024

We have found the cause of this bug. In emqx-docker/start.sh there is a line "tail -f /opt/emqx/log/erlang.log.1 &". It only prints the logs from erlang.log.1 to the console while there maybe multiple erlang.log files exist. That's the reason on the console it appears the new logs stop being print out.

I don't know why this line is added in start.sh because in emqx.conf it already allows to config the output to console.

from ekka.

Rory-Z avatar Rory-Z commented on July 26, 2024

Thank you for your attention, we fixed this problem in the docker image after v3.0, welcome to use. I will close this issue. If you are still experiencing the same problem, please feel free to reopen it.

from ekka.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.