2021-09-13T15:41:15: PM2 log: App [kafka:1] starting in -cluster mode- 2021-09-13T15:41:15: PM2 log: App name:kafka id:2 disconnected 2021-09-13T15:41:15: PM2 log: App [kafka:2] exited with code [0] via signal [SIGINT] 2021-09-13T15:41:15: PM2 log: App [kafka:2] starting in -cluster mode- 2021-09-13T15:41:15: PM2 log: App [kafka:1] online 2021-09-13T15:41:15: PM2 log: App [kafka:2] online /bin/bash:1 ELF ^ SyntaxError: Invalid or unexpected token
Docker start use CMD["pm2-runtime","process.json"].
The configuration file looks like this
{
"apps" : [
{
"name": "kafka",
"script": "node main.js --NODE_ENV=test",
"log_date_format" : "YYYY-MM-DD HH:mm:ss",
"log_file" : "/home/logs/log.log",
"error_file" : "/home/logs/err.log",
"out_file" : "/home/logs/out.log",
"instances": 3,
"exec_mode": "cluster"
}
]
}
Start three Kafka instances in docker. But it keeps reporting errors. The reason is “exec_mode” in the configuration file. Delete it. In docker, remember to use process blocking to run in the foreground mode. Do not use the background, otherwise it will start frequently and cause error.
Read More:
- error: could not install *smartsocket* listener: Address already in use PM8:49 ADB server didn’t AC…
- [Solved] Android Error: AAPT: error: unescaped apostrophe in string;Multiple substitutions specified in non-positi
- Plink Error: Multiple instances of ‘_’ in sample ID.?
- [Solved] Error in installing docker requires: fuse overlayfs >= 0.7
- [Solved] Docker Error: SyntaxError: Non-ASCII character ‘\xe5‘ in file xxx
- [Solved] Error during composer operation in docker: insufficient memory
- [Solved] CentOS build a docker error: job for docker.service failed….
- Jenkins reported an error when running the docker permission in the shell script
- [Solved] ambiguous import: found package github.com/spf13/cobra/cobra in multiple modules
- How to Fix Node SASS Error in Vue + webpack project after nodejs upgrade
- Docker Open Error: Warning: docker.service changed on disk. Run ‘systemctl daemon-reload‘ to reload unit
- How to Solve kubelet starts error (k8s Cluster Restarted)
- Node Kubelet Error: node “xxxxx“ not found [How to Solve]
- How to Fix ERROR Couldn’t connect to Docker daemon at http+docker://localunixsocket
- Docker service startup error: Job for docker.service failed because the control process exited with error code.
- [Solved] Docker Error: got permission denied while trying to connect to the docker daemon socket at…
- [Solved] Docker Start Error: iptables failed: iptables –wait -t nat -A DOCKER -p tcp -d 0/0 –dport 10241
- [Solved] docker Error: bridge docker0 failed: exchange full
- [Solved] GBase 8a V95 Replace Node Error: single vc mode does not support ‘–freenode’
- Docker Error response from daemon: Get https://registry-1.docker.io/v2/portainer/portainer/…