Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Added notes to running validator documentation to ensure that 'exec' … #18234

Merged
merged 1 commit into from
Jun 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions docs/src/running-validator/validator-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down