Added notes to running validator documentation to ensure that 'exec' is used from scripts when starting the validator to prevent logrotate signals from killing the validator. (#18234) (#18236)

(cherry picked from commit c045f1dfb5)

Co-authored-by: bji <bryan@ischo.com>
This commit is contained in:
mergify[bot]
2021-06-25 20:36:41 +00:00
committed by GitHub
parent 41179b1282
commit 78fe5576a9

View File

@ -358,8 +358,13 @@ ExecStart=/home/sol/bin/validator.sh
WantedBy=multi-user.target
```
Now create `/home/sol/bin/validator.sh` to include the desired `solana-validator`
command-line. Ensure that running `/home/sol/bin/validator.sh` manually starts
Now create `/home/sol/bin/validator.sh` to include the desired
`solana-validator` command-line. Ensure that the 'exec' command is used to
start the validator process (i.e. "exec solana-validator ..."). This is
important because without it, logrotate will end up killing the validator
every time the logs are rotated.
Ensure that running `/home/sol/bin/validator.sh` manually starts
the validator as expected. Don't forget to mark it executable with `chmod +x /home/sol/bin/validator.sh`
Start the service with:
@ -416,6 +421,12 @@ sudo cp logrotate.sol /etc/logrotate.d/sol
systemctl restart logrotate.service
```
As mentioned earlier, be sure that if you use logrotate, any script you create
which starts the solana validator process uses "exec" to do so (example: "exec
solana-validator ..."); otherwise, when logrotate sends its signal to the
validator, the enclosing script will die and take the validator process with
it.
### Disable port checks to speed up restarts
Once your validator is operating normally, you can reduce the time it takes to