Closed leejoow closed 2 years ago
Does it run smooth when running from commandline?
I am under the impression it does, I will start it a leave a shell open to check for a few hours.
If I run from the command line it works for hours until I shut it down. The service however will not start. I see five retries in the log, but nothing more then that.
Does the logfile shows any more info?
/home/pi/RTL-SDR-P2000Receiver-HA/rtlsdrp2000.log
I am under the impression it does, I will start it a leave a shell open to check for a few hours.
Do you see any messages posted to Home assistant? Did you try to enable the debug option in the config? Does 'root'user has acces to the p2000.py?
There are no message posted in Home Assistant when running as a service. When running form the command line messages are posted to HA. I enabled the debug option in the config
The access to p2000.py is as follows:
-rwxr-xr-x 1 pi pi 30457 Jan 8 06:29 p2000.py
When I give the command systemctl start rtlsdrp2000 the log file is created with the following content:
Found 1 device(s):
multimon-ng 1.1.8
(C) 1996/1997 by Tom Sailer HB9JNX/AE4WA
(C) 2012-2019 by Elias Oenal
Available demodulators: POCSAG512 POCSAG1200 POCSAG2400 FLEX EAS UFSK1200 CLIPFSK FMSFSK AFSK1200 AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 DTMF ZVEI1 ZVEI2 ZVEI3 DZVEI PZVEI EEA EIA CCIR MORSE_CW DUMPCSV X10 SCOPE
0: Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Generic RTL2832U OEM
Found Fitipower FC0012 tuner
Tuner gain set to automatic.
Tuned to 169903575 Hz.
Oversampling input by: 46x.
Oversampling output by: 1x.
Buffer size: 8.08ms
Exact sample rate is: 1014300.020041 Hz
Sampling at 1014300 S/s.
Output at 22050 Hz.
After 30 seconds the service is aborted and retried to start. A new logfile is created with the same content as above.
The following appears in the journalctl:
Jan 16 07:52:50 raspberrypi sudo[770]: pi : TTY=pts/0 ; PWD=/home/pi/RTL-SDR-P2000Receiver-HA ; USER=root ; COMMAND=/usr/bin/systemctl start rtlsdrp2000.service
Jan 16 07:52:50 raspberrypi sudo[770]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Jan 16 07:52:50 raspberrypi systemd[1]: Started RTL-SDR P2000 Receiver.
Jan 16 07:52:50 raspberrypi sudo[770]: pam_unix(sudo:session): session closed for user root
Jan 16 07:53:13 raspberrypi sudo[794]: pi : TTY=pts/0 ; PWD=/home/pi/RTL-SDR-P2000Receiver-HA ; USER=root ; COMMAND=/usr/bin/systemctl status rtlsdrp2000.service
Jan 16 07:53:13 raspberrypi sudo[794]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Jan 16 07:53:20 raspberrypi systemd[1]: rtlsdrp2000.service: Watchdog timeout (limit 30s)!
Jan 16 07:53:20 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 773 (python3) with signal SIGABRT.
Jan 16 07:53:20 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 783 (sh) with signal SIGABRT.
Jan 16 07:53:20 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 784 (rtl_fm) with signal SIGABRT.
Jan 16 07:53:20 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 785 (multimon-ng) with signal SIGABRT.
Jan 16 07:53:20 raspberrypi systemd[1]: rtlsdrp2000.service: Main process exited, code=killed, status=6/ABRT
Jan 16 07:53:20 raspberrypi systemd[1]: rtlsdrp2000.service: Failed with result 'watchdog'.
Jan 16 07:53:21 raspberrypi sudo[794]: pam_unix(sudo:session): session closed for user root
Jan 16 07:53:22 raspberrypi sudo[797]: pi : TTY=pts/0 ; PWD=/home/pi/RTL-SDR-P2000Receiver-HA ; USER=root ; COMMAND=/usr/bin/systemctl status rtlsdrp2000.service
Jan 16 07:53:22 raspberrypi sudo[797]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Jan 16 07:53:26 raspberrypi systemd[1]: rtlsdrp2000.service: Service RestartSec=5s expired, scheduling restart.
Jan 16 07:53:26 raspberrypi systemd[1]: rtlsdrp2000.service: Scheduled restart job, restart counter is at 1.
Jan 16 07:53:26 raspberrypi systemd[1]: Stopped RTL-SDR P2000 Receiver.
Jan 16 07:53:26 raspberrypi systemd[1]: Started RTL-SDR P2000 Receiver.
Jan 16 07:53:28 raspberrypi sudo[797]: pam_unix(sudo:session): session closed for user root
Jan 16 07:53:29 raspberrypi sudo[816]: pi : TTY=pts/0 ; PWD=/home/pi/RTL-SDR-P2000Receiver-HA ; USER=root ; COMMAND=/usr/bin/systemctl status rtlsdrp2000.service
Jan 16 07:53:29 raspberrypi sudo[816]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Jan 16 07:53:31 raspberrypi sudo[816]: pam_unix(sudo:session): session closed for user root
Jan 16 07:53:56 raspberrypi systemd[1]: rtlsdrp2000.service: Watchdog timeout (limit 30s)!
Jan 16 07:53:56 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 800 (python3) with signal SIGABRT.
Jan 16 07:53:56 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 809 (sh) with signal SIGABRT.
Jan 16 07:53:56 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 810 (rtl_fm) with signal SIGABRT.
Jan 16 07:53:56 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 811 (multimon-ng) with signal SIGABRT.
Jan 16 07:53:56 raspberrypi systemd[1]: rtlsdrp2000.service: Main process exited, code=killed, status=6/ABRT
Jan 16 07:53:56 raspberrypi systemd[1]: rtlsdrp2000.service: Failed with result 'watchdog'.
Jan 16 07:54:01 raspberrypi systemd[1]: rtlsdrp2000.service: Service RestartSec=5s expired, scheduling restart.
Jan 16 07:54:01 raspberrypi systemd[1]: rtlsdrp2000.service: Scheduled restart job, restart counter is at 2.
Jan 16 07:54:01 raspberrypi systemd[1]: Stopped RTL-SDR P2000 Receiver.
Jan 16 07:54:01 raspberrypi systemd[1]: Started RTL-SDR P2000 Receiver.
Jan 16 07:54:31 raspberrypi systemd[1]: rtlsdrp2000.service: Watchdog timeout (limit 30s)!
Jan 16 07:54:31 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 835 (python3) with signal SIGABRT.
Jan 16 07:54:31 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 846 (sh) with signal SIGABRT.
Jan 16 07:54:31 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 847 (rtl_fm) with signal SIGABRT.
Jan 16 07:54:31 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 848 (multimon-ng) with signal SIGABRT.
Jan 16 07:54:31 raspberrypi systemd[1]: rtlsdrp2000.service: Main process exited, code=killed, status=6/ABRT
Jan 16 07:54:31 raspberrypi systemd[1]: rtlsdrp2000.service: Failed with result 'watchdog'.
Jan 16 07:54:37 raspberrypi systemd[1]: rtlsdrp2000.service: Service RestartSec=5s expired, scheduling restart.
Jan 16 07:54:37 raspberrypi systemd[1]: rtlsdrp2000.service: Scheduled restart job, restart counter is at 3.
Jan 16 07:54:37 raspberrypi systemd[1]: Stopped RTL-SDR P2000 Receiver.
Jan 16 07:54:37 raspberrypi systemd[1]: Started RTL-SDR P2000 Receiver.
Jan 16 07:55:07 raspberrypi systemd[1]: rtlsdrp2000.service: Watchdog timeout (limit 30s)!
Jan 16 07:55:07 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 859 (python3) with signal SIGABRT.
Jan 16 07:55:07 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 868 (sh) with signal SIGABRT.
Jan 16 07:55:07 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 869 (rtl_fm) with signal SIGABRT.
Jan 16 07:55:07 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 870 (multimon-ng) with signal SIGABRT.
Jan 16 07:55:07 raspberrypi systemd[1]: rtlsdrp2000.service: Main process exited, code=killed, status=6/ABRT
Jan 16 07:55:07 raspberrypi systemd[1]: rtlsdrp2000.service: Failed with result 'watchdog'.
Jan 16 07:55:12 raspberrypi systemd[1]: rtlsdrp2000.service: Service RestartSec=5s expired, scheduling restart.
Jan 16 07:55:12 raspberrypi systemd[1]: rtlsdrp2000.service: Scheduled restart job, restart counter is at 4.
Jan 16 07:55:12 raspberrypi systemd[1]: Stopped RTL-SDR P2000 Receiver.
Jan 16 07:55:12 raspberrypi systemd[1]: Started RTL-SDR P2000 Receiver.
Jan 16 07:55:42 raspberrypi systemd[1]: rtlsdrp2000.service: Watchdog timeout (limit 30s)!
Jan 16 07:55:42 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 880 (python3) with signal SIGABRT.
Jan 16 07:55:42 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 889 (sh) with signal SIGABRT.
Jan 16 07:55:42 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 890 (rtl_fm) with signal SIGABRT.
Jan 16 07:55:42 raspberrypi systemd[1]: rtlsdrp2000.service: Killing process 891 (multimon-ng) with signal SIGABRT.
Jan 16 07:55:42 raspberrypi systemd[1]: rtlsdrp2000.service: Main process exited, code=killed, status=6/ABRT
Jan 16 07:55:42 raspberrypi systemd[1]: rtlsdrp2000.service: Failed with result 'watchdog'.
Jan 16 07:55:48 raspberrypi systemd[1]: rtlsdrp2000.service: Service RestartSec=5s expired, scheduling restart.
Jan 16 07:55:48 raspberrypi systemd[1]: rtlsdrp2000.service: Scheduled restart job, restart counter is at 5.
Jan 16 07:55:48 raspberrypi systemd[1]: Stopped RTL-SDR P2000 Receiver.
Jan 16 07:55:48 raspberrypi systemd[1]: rtlsdrp2000.service: Start request repeated too quickly.
Jan 16 07:55:48 raspberrypi systemd[1]: rtlsdrp2000.service: Failed with result 'watchdog'.
Jan 16 07:55:48 raspberrypi systemd[1]: Failed to start RTL-SDR P2000 Receiver.
If I'm reading it correctly, it is started and stops because of a watchdog timeout, after which is tries four more times, every time with the same result.
Maybe a long shot... Start the python3 as root..
sudo python3 /home/pi/RTL-SDR-P2000Receiver-HA/p2000.py Does it work normal?
Google geeft nog de volgende optie:
sudo systemctl disable watchdog
its works... sudo nano /etc/rc.local
su - pi -c /home/pi/RTL-SDR-P2000Receiver-HA/p2000.py > /dev/null 2>&1 & thanks Ron
Google geeft nog de volgende optie:
sudo systemctl disable watchdog
Then the watchdog won't work anymore. I'd like to automatically restart when it fails. But I've seen long uptimes using rc.local so I'm going that way. Just trying to get a message from HASS when it doesn't update.
I try to use the method to run the receiver as a service, but it stops after some time.
Is there a way to debug to check what is going wrong?
This is the error I get: