From 75e8e7199302e8980da8870e056b9eefebd7edde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 21 Sep 2021 17:25:36 +0200 Subject: [PATCH] set SyslogLevel=debug for systemd service avoid journald MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This setting in combination with `MaxLevelStore=info` in `/etc/systemd/journald.conf` will prevent Journald from being constantly filled by a considerable flow of logs from beacon nodes and making debugging of other servics on the host harder. Due to this `journalctl` will no longer show logs for the service. Issue: https://github.com/status-im/infra-role-bootstrap-linux/issues/24 Signed-off-by: Jakub SokoĊ‚owski --- README.md | 29 ++++++++++------------------- templates/beacon-node.service.j2 | 1 + 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index f69a411..ee57719 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,6 @@ The service exposes three ports by default: # Installation Add to your `requirements.yml` file: - ```yaml - name: infra-role-beacon-node-linux src: git+git@github.com:status-im/infra-role-beacon-node-linux.git @@ -34,52 +33,44 @@ Add to your `requirements.yml` file: # Configuration The crucial settings are: - ```yaml # branch which should be built beacon_node_repo_branch: 'stable' - # ethereum network to connect to beacon_node_network: 'mainnet' - # optional setting for debug mode beacon_node_log_level: 'DEBUG' - # Infura WebSocket URLs beacon_node_web3_urls: ['wss://mainnet.infura.io/ws/v3/123qwe123qwe123qwe'] ``` - The order of WebSocket URLs matters. First is the default, the rest are fallbacks. # Usage Assuming the `stable` branch was built you can manage the service with: - -``` +```sh systemctl start beacon-node-stable systemctl status beacon-node-stable systemctl stop beacon-node-stable - -# logs -journalctl -u beacon-node-stable ``` - +You can view logs under: +```sh +tail -f /data/beacon-node-stable/logs/service.log +``` The service will store all data in the `/data/beacon-node-stable` directory. # Building A timer will be installed to build the image: - -``` +```sh systemctl list-timers beacon-node-stable-build ``` - To rebuild the image: - -``` +```sh systemctl start beacon-node-stable-build.service - -# check build logs +``` +To check build logs use: +```sh journalctl -u beacon-node-stable-build.service ``` diff --git a/templates/beacon-node.service.j2 b/templates/beacon-node.service.j2 index ff1a543..28c2a1c 100644 --- a/templates/beacon-node.service.j2 +++ b/templates/beacon-node.service.j2 @@ -10,6 +10,7 @@ Group={{ beacon_node_group }} WorkingDirectory={{ beacon_node_path }} SyslogIdentifier={{ beacon_node_service_name }} SyslogFacility=local6 +SyslogLevel=debug Restart=on-failure ExecStart={{ beacon_node_repo_path }}/build/nimbus_beacon_node \ --network={{ beacon_node_network }} \