[GH-ISSUE #887] No logs in log files #708

Open
opened 2026-05-05 06:58:32 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @TheKaese on GitHub (Sep 27, 2020).
Original GitHub issue: https://github.com/debauchee/barrier/issues/887

Describe the bug
I've been trying to debug why my barrier service has not been starting on boot, but the log file specified from --log on barrierc is not present or empty, regardless of where the logfile is, or the set debug level.

To Reproduce
Reqs.

sudo apt-get -y install barrier
  1. Setup a barrier service (/etc/systemd/system/barrier.service) with something like:
[Unit]
Description=Barrier Client
After=graphical.target
Requires=network.target

[Service]
Type=forking
ExecStart=barrierc --name PiLab --enable-crypto --debug DEBUG --log ~/log/barriec.log --no-restart <PC_Name>:24842
Restart=always
RestartSec=5
User=pi

[Install]
WantedBy=multi-user.target
  1. Enable it and start it
sudo systemctl enable barrier.service
sudo systemctl start barrier.service
  1. On first startup (or manual startups after boot), you should see output from a status check:
pi@PiLab:~ $ sudo systemctl status barrier
● barrier.service - Barrier Client
   Loaded: loaded (/etc/systemd/system/barrier.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-09-27 11:40:37 CDT; 2s ago
  Process: 7532 ExecStart=/usr/bin/barrierc --name PiLab --enable-crypto --debug DEBUG --log ~/log/barriec.log --no-restart <PC_Name>:24842 (code=exited, status=0/SUCCESS)
 Main PID: 7533 (barrierc)
    Tasks: 3 (limit: 1480)
   CGroup: /system.slice/barrier.service
           └─7533 /usr/bin/barrierc --name PiLab --enable-crypto --debug DEBUG --log ~/log/barriec.log --no-restart <PC_Name>:24842

Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] INFO: AES256-GCM-SHA384       TLSv1.2 Kx=RSA      Au=RSA  Enc=AESGCM(256) Mac=AEAD
Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: open clipboard 0
Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: empty clipboard 0
Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: grabbed clipboard 0
Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: close clipboard 0
Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: open clipboard 1
Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: empty clipboard 1
Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: grabbed clipboard 1
Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: close clipboard 1
Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] NOTE: connected to server
  1. Check the log files and note that it doesn't exist
pi@PiLab:~ $ tail ~/log/barriec.log
tail: cannot open '/home/pi/log/barriec.log' for reading: No such file or directory

Expected behavior
The log files not to be empty

Desktop (please complete the following information):

  • OS: Fresh install of
Raspberry Pi OS (32-bit) with desktop
Version: August 2020
Release date: 2020-08-20
Kernel version: 5.4

pi@PiLab:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
  • Barrier version (Interesting that the root project README says we should be on 2.1.3... probably outdated?)
pi@PiLab:~ $ barrierc --version
barrierc 2.2.0-Release
Protocol version 1.6
Copyright (C) 2018 Debauchee Open Source Group
Copyright (C) 2012-2016 Symless Ltd.
Copyright (C) 2008-2014 Nick Bolton
Copyright (C) 2002-2014 Chris Schoeneman

Additional context

I've tried

  • various log locations such as /var/log/barrierc.log, ~/barrierc.log, /home/pi/barrierc.log, etc.
  • Running a sudo chmod 777 on the logs
  • Manually creating the log files (they remain empty
  • Changing the owners of the logs and parent directories to user 'pi' (They default to root when you create them manually)
  • Various debug levels
  • Daemon/no daemon and Rest/No-restart flags (and relevant systemd service flags)

Nothing seems to work, so I'm logging this as a bug against 2.2.0 on RPi OS, unless someone can point out something I'm missing. I should also point out that the service works fine, AFTER a user logs in. But the service will boot as 'successful' with no output, and it's not actually running. I can then run a 'systemctl start' on barrier and everything is perfectly fine from then on, so it seems like barrier is failing but the OS seems to think it's running. Hard to tell with no logs :(

Originally created by @TheKaese on GitHub (Sep 27, 2020). Original GitHub issue: https://github.com/debauchee/barrier/issues/887 **Describe the bug** I've been trying to debug why my barrier service has not been starting on boot, but the log file specified from --log on barrierc is not present or empty, regardless of where the logfile is, or the set debug level. **To Reproduce** Reqs. ``` sudo apt-get -y install barrier ``` 1. Setup a barrier service (/etc/systemd/system/barrier.service) with something like: ``` [Unit] Description=Barrier Client After=graphical.target Requires=network.target [Service] Type=forking ExecStart=barrierc --name PiLab --enable-crypto --debug DEBUG --log ~/log/barriec.log --no-restart <PC_Name>:24842 Restart=always RestartSec=5 User=pi [Install] WantedBy=multi-user.target ``` 2. Enable it and start it ``` sudo systemctl enable barrier.service sudo systemctl start barrier.service ``` 3. On first startup (or manual startups after boot), you should see output from a status check: ``` pi@PiLab:~ $ sudo systemctl status barrier ● barrier.service - Barrier Client Loaded: loaded (/etc/systemd/system/barrier.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2020-09-27 11:40:37 CDT; 2s ago Process: 7532 ExecStart=/usr/bin/barrierc --name PiLab --enable-crypto --debug DEBUG --log ~/log/barriec.log --no-restart <PC_Name>:24842 (code=exited, status=0/SUCCESS) Main PID: 7533 (barrierc) Tasks: 3 (limit: 1480) CGroup: /system.slice/barrier.service └─7533 /usr/bin/barrierc --name PiLab --enable-crypto --debug DEBUG --log ~/log/barriec.log --no-restart <PC_Name>:24842 Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] INFO: AES256-GCM-SHA384 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(256) Mac=AEAD Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: open clipboard 0 Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: empty clipboard 0 Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: grabbed clipboard 0 Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: close clipboard 0 Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: open clipboard 1 Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: empty clipboard 1 Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: grabbed clipboard 1 Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] DEBUG: close clipboard 1 Sep 27 11:40:38 PiLab barrierc[7533]: Barrier 2.2.0-Release: [2020-09-27T11:40:38] NOTE: connected to server ``` 5. Check the log files and note that it doesn't exist ``` pi@PiLab:~ $ tail ~/log/barriec.log tail: cannot open '/home/pi/log/barriec.log' for reading: No such file or directory ``` **Expected behavior** The log files not to be empty **Desktop (please complete the following information):** - OS: Fresh install of ``` Raspberry Pi OS (32-bit) with desktop Version: August 2020 Release date: 2020-08-20 Kernel version: 5.4 pi@PiLab:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" ``` - Barrier version _(Interesting that the root project README says we should be on 2.1.3... probably outdated?)_ ``` pi@PiLab:~ $ barrierc --version barrierc 2.2.0-Release Protocol version 1.6 Copyright (C) 2018 Debauchee Open Source Group Copyright (C) 2012-2016 Symless Ltd. Copyright (C) 2008-2014 Nick Bolton Copyright (C) 2002-2014 Chris Schoeneman ``` **Additional context** I've tried - various log locations such as /var/log/barrierc.log, ~/barrierc.log, /home/pi/barrierc.log, etc. - Running a sudo chmod 777 on the logs - Manually creating the log files (they remain empty - Changing the owners of the logs and parent directories to user 'pi' (They default to root when you create them manually) - Various debug levels - Daemon/no daemon and Rest/No-restart flags (and relevant systemd service flags) Nothing seems to work, so I'm logging this as a bug against 2.2.0 on RPi OS, unless someone can point out something I'm missing. I should also point out that the service works fine, AFTER a user logs in. But the service will boot as 'successful' with no output, and it's not actually running. I can then run a 'systemctl start' on barrier and everything is perfectly fine from then on, so it seems like barrier is failing but the OS seems to think it's running. Hard to tell with no logs :(
Author
Owner

@tibmeister commented on GitHub (Jun 21, 2021):

This is occurring on Ubuntu 20.04 x86_64 as well.

<!-- gh-comment-id:865140524 --> @tibmeister commented on GitHub (Jun 21, 2021): This is occurring on Ubuntu 20.04 x86_64 as well.
Author
Owner

@k-lyda commented on GitHub (Jul 27, 2021):

The same is at Ubuntu 20.04 x86_64, v.2.3.3 from snap. A log file is not created.
This is the beginning of the log (from "Show log" window)

[2021-07-27T12:35:22] DEBUG: starting process

[2021-07-27T12:35:22] INFO: starting server
[2021-07-27T12:35:22] DEBUG: command: /snap/barrier/384/usr/bin/barriers -f --no-tray --debug DEBUG2 --name klyda.nb.ipa.dataart.net --enable-crypto --log /home/klyda/snap/barrier/current/barrier.log -c /tmp/Barrier.f35802 --address :24800
[2021-07-27T12:35:22] INFO: config file: /tmp/Barrier.g35802
[2021-07-27T12:35:22] INFO: log level: DEBUG2
[2021-07-27T12:35:22] INFO: log file: /home/klyda/snap/barrier/current/barrier.log
[2021-07-27T12:35:22] DEBUG1: logging to file (/home/klyda/snap/barrier/current/barrier.log) enabled

I can't see any other log lines connected with any error when logging to the file. If you maybe can point me in the right direction, I can seek through logs to look for more clues.

<!-- gh-comment-id:887401749 --> @k-lyda commented on GitHub (Jul 27, 2021): The same is at Ubuntu 20.04 x86_64, v.2.3.3 from snap. A log file is not created. This is the beginning of the log (from "Show log" window) ``` [2021-07-27T12:35:22] DEBUG: starting process [2021-07-27T12:35:22] INFO: starting server [2021-07-27T12:35:22] DEBUG: command: /snap/barrier/384/usr/bin/barriers -f --no-tray --debug DEBUG2 --name klyda.nb.ipa.dataart.net --enable-crypto --log /home/klyda/snap/barrier/current/barrier.log -c /tmp/Barrier.f35802 --address :24800 [2021-07-27T12:35:22] INFO: config file: /tmp/Barrier.g35802 [2021-07-27T12:35:22] INFO: log level: DEBUG2 [2021-07-27T12:35:22] INFO: log file: /home/klyda/snap/barrier/current/barrier.log [2021-07-27T12:35:22] DEBUG1: logging to file (/home/klyda/snap/barrier/current/barrier.log) enabled ``` I can't see any other log lines connected with any error when logging to the file. If you maybe can point me in the right direction, I can seek through logs to look for more clues.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#708
No description provided.