Comments (3)
Is your built release still in _rel? It looks like you're mixing init.d and systemd scripts, as well as referring to paths where your binaries don't exist.
I had success with systemd, here's what I did:
- Build emq-relx (looks like you've done this already)
- Copy the emqttd folder that's in _rel to
/home/pi/emqttd
- I made a systemd service file called emqttd.service that looks like the following (substitute root with whatever user/group you have created for this purpose):
WorkingDirectory=/home/pi/emqttd
ExecStart=/home/pi/emqttd/bin/emqttd start
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=emqttd
User=root
Group=root
Type=forking
[Install]
WantedBy=multi-user.target
- Copy to systemd system folder
sudo cp emqttd.service /etc/systemd/system/emqttd.service
- Enable the service:
sudo systemctl enable emqttd
- Reload the daemon:
sudo systemctl daemon-reload
(do this anytime you edit the service file!) - Try to start:
sudo systemctl start emqttd
- If any errors occurred, check for errors:
journalctl -xe
I think I got all the steps I took above, let me know if I missed anything.
from emqx-rel.
Thank you @Zagrophyte and @turtleDeng for your help.
I followed @Zagrophyte guide and it worked for me, here is my final service file content:
[Unit]
Description=EMQTTD mqtt broker
After=network.target
[Service]
WorkingDirectory=/home/pi/emqttd
ExecStart=/home/pi/emqttd/bin/emqttd start
ExecStop=/home/pi/emqttd/bin/emqttd stop
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=emqttd
User=root
Group=root
Type=forking
[Install]
WantedBy=multi-user.target
from emqx-rel.
@hictao
run 'journalctl -xe' to get error logs
from emqx-rel.
Related Issues (20)
- Time does not match HOT 1
- ....
- problem setting auth.jwt.verify_claims using environment variables
- Start EMQX without start.sh in Dockerfile HOT 1
- Help using plugin HOT 1
- ERROR: Docker Build Instructions HOT 2
- Error in compiling Elixir plugin
- docker-compose.yaml configure dashboard is not valid. HOT 2
- imagePullSecrets per Container HOT 7
- Configuration changes don't restart Kubernetes pod HOT 4
- Configuration broke in 4.3 HOT 2
- Cannot find plugins: [emqx_auth_username] HOT 1
- How to update emqx enterprise license without restart pod HOT 3
- Plugin is not loaded automatically
- helm install emqx Custom EMQX_LOADED_PLUGINS HOT 15
- Persistence not work !!! HOT 4
- Error on networking api on Kube 1.19
- Support podAnnotations
- Failed to install on K8s 1.22
- emqx docker images run fail HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emqx-rel.