Skip to content

Commit

Permalink
Remove StandardOutput/StandardError (currently pointing to deprecated…
Browse files Browse the repository at this point in the history
… syslog) from systemd definitions, closes #1792
  • Loading branch information
rdlrt committed Jul 31, 2024
1 parent 6f256e0 commit b0164ca
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 38 deletions.
2 changes: 1 addition & 1 deletion docs/Build/node-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ sudo systemctl status cnode-submit-api.service
```

!!! important
In case you see the node exit unsuccessfully upon checking status, please verify you've followed the transition process correctly as documented below, and that you do not have another instance of node already running. It would help to check your system logs (`/var/log/syslog` for debian-based and `/var/log/messages` for Red Hat/CentOS/Fedora systems, you can also check `journalctl -f -u <service>` to examine startup attempt for services) for any errors while starting node.
In case you see the node exit unsuccessfully upon checking status, please verify you've followed the transition process correctly as documented below, and that you do not have another instance of node already running. It would help to check your system logs, you can also check `journalctl -f -u cnode` to examine startup attempt for services, and scroll up until you see output for node startup attempt) for any errors while starting node.

You can use [gLiveView](../Scripts/gliveview.md) to monitor your node that was started as a systemd service.

Expand Down
2 changes: 1 addition & 1 deletion docs/Scripts/blockperf.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The script is best run as a background process. This can be accomplished in many
#### Run as service

Use the `deploy-as-systemd.sh` script to create a systemd unit file.
In this setup the script is started in "service" mode. Error/Warn level log output is handled by syslog and end up in the systems standard syslog file, normally `/var/log/syslog`. `journalctl -f -u cnode-tu-blockperf.service` can be used to check service output (follow mode).
In this setup the script is started in "service" mode. Error/Warn level log output is handled by journald. `journalctl -f -u cnode-tu-blockperf.service` can be used to check service output (follow mode).

Outside the cnTools environment call `blockPerf.sh -d` to install it as a systemd service.

Expand Down
2 changes: 1 addition & 1 deletion docs/Scripts/cncli.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ You can override the values in the script at the User Variables section shown be
Services are controlled by `sudo systemctl <status|start|stop|restart> <service name>`
All services are configured as child services to `cnode.service` and as such, when an action is taken against this service it's replicated to all child services. E.g running `sudo systemctl start cnode.service` will also start all child services.

Log output is handled by syslog and end up in the systems standard syslog file, normally `/var/log/syslog`. `journalctl -f -u <service>` can be used to check service output (follow mode). Other logging configurations are not covered here.
Log output is handled by journald. `journalctl -f -u <service>` can be used to check service output (follow mode). Other logging configurations are not covered here.

Recommended workflow to get started with CNCLI blocklog.

Expand Down
2 changes: 1 addition & 1 deletion docs/Scripts/logmonitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For optimal coverage, it's best run together with [CNCLI](../Scripts/cncli.md) s
The script is best run as a background process. This can be accomplished in many ways but the preferred method is to run it as a systemd service. A terminal multiplexer like tmux or screen could also be used but not covered here.

Use the `deploy-as-systemd.sh` script to create a systemd unit file (deployed together with [CNCLI](../Scripts/cncli.md)).
Log output is handled by syslog and end up in the systems standard syslog file, normally `/var/log/syslog`. `journalctl -f -u cnode-logmonitor.service` can be used to check service output (follow mode). Other logging configurations are not covered here.
Log output is handled by journald. `journalctl -f -u cnode-logmonitor.service` can be used to check service output (follow mode). Other logging configurations are not covered here.

##### View Blocklog
Best viewed in CNTools or gLiveView. See [CNCLI](../Scripts/cncli.md) for example output.
2 changes: 0 additions & 2 deletions scripts/cnode-helper-scripts/blockPerf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ User=$USER
WorkingDirectory=${CNODE_HOME}/scripts
ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/blockPerf.sh -s\"
KillSignal=SIGINT
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${CNODE_VNAME}-tu-blockperf
TimeoutStopSec=5
KillMode=mixed
Expand Down
2 changes: 0 additions & 2 deletions scripts/cnode-helper-scripts/cncli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,6 @@ WorkingDirectory=${CNODE_HOME}/scripts
ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/cncli.sh metrics serve\"
KillSignal=SIGINT
SuccessExitStatus=143
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${CNODE_VNAME}_cncli_exporter
TimeoutStopSec=5
KillMode=mixed
Expand Down
2 changes: 0 additions & 2 deletions scripts/cnode-helper-scripts/dbsync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ deploy_systemd() {
WorkingDirectory=${CNODE_HOME}/scripts
ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/dbsync.sh\"
KillSignal=SIGINT
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${CNODE_VNAME}-dbsync
TimeoutStopSec=5
KillMode=mixed
Expand Down
18 changes: 0 additions & 18 deletions scripts/cnode-helper-scripts/deploy-as-systemd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ Type=oneshot
User=$USER
WorkingDirectory=${CNODE_HOME}/scripts
ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/topologyUpdater.sh -f\"
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${vname}-tu-push
EOF"
sudo bash -c "cat << 'EOF' > /etc/systemd/system/${vname}-tu-push.timer
Expand Down Expand Up @@ -103,8 +101,6 @@ User=$USER
WorkingDirectory=${CNODE_HOME}/scripts
ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/topologyUpdater.sh -p\"
ExecStartPost=/bin/sleep 5
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${vname}-tu-fetch
[Install]
Expand All @@ -118,8 +114,6 @@ Description=Cardano Node - Topology Updater - restart ${vname}.service for topol
Type=oneshot
WorkingDirectory=${CNODE_HOME}/scripts
ExecStart=/bin/bash -c \"/bin/systemctl try-restart ${vname}.service 2>/dev/null || /usr/bin/systemctl try-restart ${vname}.service 2>/dev/null\"
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${vname}-tu-restart
EOF"
sudo bash -c "cat << 'EOF' > /etc/systemd/system/${vname}-tu-restart.timer
Expand Down Expand Up @@ -185,8 +179,6 @@ ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/cncli.sh sync\"
ExecStop=/bin/bash -l -c \"exec kill -2 \$(ps -ef | grep [c]ncli.sync.*.${CNODE_HOME}/ | tr -s ' ' | cut -d ' ' -f2) &>/dev/null\"
KillSignal=SIGINT
SuccessExitStatus=143
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${vname}-cncli-sync
TimeoutStopSec=5
KillMode=mixed
Expand All @@ -207,8 +199,6 @@ User=$USER
WorkingDirectory=${CNODE_HOME}/scripts
ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/cncli.sh leaderlog\"
SuccessExitStatus=143
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${vname}-cncli-leaderlog
TimeoutStopSec=5
KillMode=mixed
Expand All @@ -231,8 +221,6 @@ WorkingDirectory=${CNODE_HOME}/scripts
ExecStartPre=/bin/sleep 5
ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/cncli.sh validate\"
SuccessExitStatus=143
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${vname}-cncli-validate
TimeoutStopSec=5
KillMode=mixed
Expand Down Expand Up @@ -264,8 +252,6 @@ ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/cncli.sh ptsendslots\"
ExecStop=/bin/bash -l -c \"exec kill -2 \$(ps -ef | grep [c]ncli.sendslots.*.${vname}-pooltool.json | tr -s ' ' | cut -d ' ' -f2) &>/dev/null\"
KillSignal=SIGINT
SuccessExitStatus=143
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${vname}-cncli-ptsendslots
TimeoutStopSec=5
KillMode=mixed
Expand Down Expand Up @@ -306,8 +292,6 @@ ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/logMonitor.sh\"
ExecStop=/bin/bash -l -c \"exec kill -2 \$(ps -ef | grep -m1 ${CNODE_HOME}/scripts/logMonitor.sh | tr -s ' ' | cut -d ' ' -f2) &>/dev/null\"
KillSignal=SIGINT
SuccessExitStatus=143
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${vname}-logmonitor
TimeoutStopSec=5
KillMode=mixed
Expand Down Expand Up @@ -373,8 +357,6 @@ ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/cncli.sh ptsendtip\"
ExecStop=/bin/bash -l -c \"exec kill -2 \$(ps -ef | grep [c]ncli.sendtip.*.${vname}-pooltool.json | tr -s ' ' | cut -d ' ' -f2) &>/dev/null\"
KillSignal=SIGINT
SuccessExitStatus=143
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${vname}-cncli-ptsendtip
TimeoutStopSec=5
KillMode=mixed
Expand Down
2 changes: 0 additions & 2 deletions scripts/cnode-helper-scripts/mithril-signer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ deploy_systemd() {
ExecStart=/bin/bash -l -c \"exec ${HOME}/.local/bin/$(basename "${0::-3}") -vv\"
KillSignal=SIGINT
SuccessExitStatus=143
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${CNODE_VNAME}-$(basename "${0::-3}")
TimeoutStopSec=5
KillMode=mixed
Expand Down
2 changes: 0 additions & 2 deletions scripts/cnode-helper-scripts/ogmios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ deploy_systemd() {
ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/ogmios.sh \"
KillSignal=SIGINT
SuccessExitStatus=143
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${CNODE_VNAME}-ogmios
TimeoutStopSec=5
KillMode=mixed
Expand Down
2 changes: 0 additions & 2 deletions scripts/cnode-helper-scripts/submitapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ deploy_systemd() {
ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/submitapi.sh\"
KillSignal=SIGINT
SuccessExitStatus=143
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=${CNODE_VNAME}-submit-api
TimeoutStopSec=5
KillMode=mixed
Expand Down
4 changes: 0 additions & 4 deletions scripts/grest-helper-scripts/setup-grest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,6 @@ SGVERSION=1.2.0a
LimitNOFILE=1048576
ExecStart=/home/authenticator/.local/bin/postgrest ${CNODE_HOME}/priv/grest.conf
ExecReload=/bin/kill -SIGUSR1 \\\$MAINPID
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=postgrest
[Install]
Expand Down Expand Up @@ -520,8 +518,6 @@ SGVERSION=1.2.0a
ExecStart=/bin/bash -l -c \"exec ${CNODE_HOME}/scripts/grest-exporter.sh\"
KillSignal=SIGINT
SuccessExitStatus=143
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=grest_exporter
TimeoutStopSec=5
KillMode=mixed
Expand Down

0 comments on commit b0164ca

Please sign in to comment.