Merge pull request #7295 from zmstone/fix-ensure-bash-for-systemd-service

chore: ensure bash wraper in emqx.service, restart wait 60 seconds
This commit is contained in:
Zaiming (Stone) Shi 2022-03-14 13:28:35 +01:00 committed by GitHub
commit c4f609eb42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 20 deletions

View File

@ -26,6 +26,7 @@ File format:
* `topic` parameter in bridge configuration can have `${node}` substitution (just like in `clientid` parameter) * `topic` parameter in bridge configuration can have `${node}` substitution (just like in `clientid` parameter)
* Add UTF-8 string validity check in `strict_mode` for MQTT packet. * Add UTF-8 string validity check in `strict_mode` for MQTT packet.
When set to true, invalid UTF-8 strings will cause the client to be disconnected. i.e. client ID, topic name. [#7261] When set to true, invalid UTF-8 strings will cause the client to be disconnected. i.e. client ID, topic name. [#7261]
* Changed systemd service restart delay from 10 seconds to 60 seconds.
### Bug fixes ### Bug fixes
@ -40,6 +41,7 @@ File format:
* Fix rpc get node info maybe crash when other nodes is not ready. * Fix rpc get node info maybe crash when other nodes is not ready.
* Fix false alert level log “cannot_find_plugins” caused by duplicate plugin names in `loaded_plugins` files. * Fix false alert level log “cannot_find_plugins” caused by duplicate plugin names in `loaded_plugins` files.
* Prompt user how to change the dashboard's initial default password when emqx start. * Prompt user how to change the dashboard's initial default password when emqx start.
* Fix errno=13 'Permission denied' Cannot create FIFO boot error in Amazon Linux 2022 (el8 package)
## v4.3.12 ## v4.3.12
### Important changes ### Important changes

View File

@ -7,11 +7,18 @@ User=emqx
Group=emqx Group=emqx
Type=forking Type=forking
Environment=HOME=/var/lib/emqx Environment=HOME=/var/lib/emqx
ExecStart=/usr/bin/emqx start
# Must use a 'bash' wrap for some OS
# errno=13 'Permission denied'
# Cannot create FIFO ... for writing
ExecStart=bash /usr/bin/emqx start
LimitNOFILE=1048576 LimitNOFILE=1048576
ExecStop=/usr/bin/emqx stop ExecStop=bash /usr/bin/emqx stop
Restart=on-failure Restart=on-failure
RestartSec=5s
# When clustered, give the peers enough time to get this node's 'DOWN' event
RestartSec=60s
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -1,17 +0,0 @@
[Unit]
Description=emqx daemon
After=network.target
[Service]
User=emqx
Group=emqx
Type=forking
Environment=HOME=/var/lib/emqx
ExecStart=/usr/bin/emqx start
LimitNOFILE=1048576
ExecStop=/usr/bin/emqx stop
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1 @@
../emqx.service