SatNOGS install errors

Have renewed my station setup with RPi4 and installed 2022-04-05-PE0SAT_Raspian-SatNOGS-lite image, configured the RPi4 and the SatNOGS client setup but, having investigated the cause of errors without success, I can see no obvious reason for errors. So I’ve copied below the various log outputs and ask if someone can please help me resolve the problem?

Generating support report. Please wait…
------------[ copy here ]------------
{
“versions”: {
“satnogs-client”: “1.6”,
“satnogs-client-ansible”: “202205101826”,
“satnogs-flowgraphs”: “1.4-1”,
“gr-satnogs”: “2.3.1.1-1”,
“gr-soapy”: “2.1.3-1”,
“gnuradio”: “3.8.2.0-2”,
“satnogs-config”: “0.12”
},
“state”: {
“is-applied”: true,
“pending-tags”: null
},
“system”: {
“date”: “2022-07-16T16:47:10.195873+00:00”,
“distribution”: {
“DESCRIPTION”: “Raspbian GNU/Linux 10 (buster)”,
“RELEASE”: “10”,
“CODENAME”: “buster”,
“ID”: “Raspbian”
},
“pending-updates”: true,
“platform”: {
“system”: “Linux”,
“node”: “SatGOLD”,
“release”: “5.10.103-v7l+”,
“version”: “#1529 SMP Tue Mar 8 12:24:00 GMT 2022”,
“machine”: “armv7l”,
“processor”: “”
},
“memory”: {
“total”: 3838124032,
“available”: 3585740800,
“percent”: 6.6,
“used”: 118259712,
“free”: 3524214784,
“active”: 102072320,
“inactive”: 153120768,
“buffers”: 21389312,
“cached”: 174260224,
“shared”: 8851456,
“slab”: 29982720
},
“disk”: {
“total”: 31078248448,
“used”: 3649937408,
“free”: 26111180800,
“percent”: 12.3
}
},
“configuration”: {
“satnogs_antenna”: “RX”,
“satnogs_api_token”: “[redacted]”,
“satnogs_lo_offset”: “100e3”,
“satnogs_rf_gain”: “40”,
“satnogs_rx_samp_rate”: “2.5e6”,
“satnogs_soapy_rx_device”: “driver=airspy”,
“satnogs_station_elev”: “138”,
“satnogs_station_id”: “2122”,
“satnogs_station_lat”: “53.0666”,
“satnogs_station_lon”: “-2.7429”
}
}
------------[ copy end ]-------------

*********:~ $ journalctl -f -u satnogs-client.service
– Logs begin at Sat 2022-07-16 16:36:32 UTC. –
Jul 16 16:36:40 SatGOLD satnogs-client[437]: File “/var/lib/satnogs/lib/python3.7/site-packages/requests/adapters.py”, line 516, in send
Jul 16 16:36:40 SatGOLD satnogs-client[437]: raise ConnectionError(e, request=request)
Jul 16 16:36:40 SatGOLD satnogs-client[437]: requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘network.satnogs.org’, port=443): Max retries exceeded with url: /api/jobs/?ground_station=2122&lat=53.0666&lon=-2.7429&alt=138 (Caused by NewConnectionError(’<urllib3.connection.HTTPSConnection object at 0xb21ca310>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution’))
Jul 16 16:36:40 SatGOLD satnogs-client[437]: apscheduler.executors.default - ERROR - Job “get_jobs (trigger: interval[0:01:00], next run at: 2022-07-16 16:37:40 UTC)” raised an exception
Jul 16 16:36:40 SatGOLD satnogs-client[437]: Traceback (most recent call last):
Jul 16 16:36:40 SatGOLD satnogs-client[437]: File “/var/lib/satnogs/lib/python3.7/site-packages/apscheduler/executors/base.py”, line 125, in run_job
Jul 16 16:36:40 SatGOLD satnogs-client[437]: retval = job.func(*job.args, **job.kwargs)
Jul 16 16:36:40 SatGOLD satnogs-client[437]: File “/var/lib/satnogs/lib/python3.7/site-packages/satnogsclient/scheduler/tasks.py”, line 177, in get_jobs
Jul 16 16:36:40 SatGOLD satnogs-client[437]: response.raise_for_status()
Jul 16 16:36:40 SatGOLD satnogs-client[437]: UnboundLocalError: local variable ‘response’ referenced before assignment

------------- [Copy End]---------------

*********:~ $ systemctl status satnogs-client
● satnogs-client.service - SatNOGS client
Loaded: loaded (/etc/systemd/system/satnogs-client.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2022-07-16 16:36:36 UTC; 39min ago
Main PID: 437 (satnogs-client)
Tasks: 22 (limit: 4915)
CGroup: /system.slice/satnogs-client.service
└─437 /var/lib/satnogs/bin/python3 /var/lib/satnogs/bin/satnogs-client

Jul 16 16:36:40 SatGOLD satnogs-client[437]: File "/var/lib/satnogs/lib/python3.7/site-packages/re
Jul 16 16:36:40 SatGOLD satnogs-client[437]: raise ConnectionError(e, request=request)
Jul 16 16:36:40 SatGOLD satnogs-client[437]: requests.exceptions.ConnectionError: HTTPSConnectionPoo
Jul 16 16:36:40 SatGOLD satnogs-client[437]: apscheduler.executors.default - ERROR - Job "get_jobs (
Jul 16 16:36:40 SatGOLD satnogs-client[437]: Traceback (most recent call last):
Jul 16 16:36:40 SatGOLD satnogs-client[437]: File "/var/lib/satnogs/lib/python3.7/site-packages/ap
Jul 16 16:36:40 SatGOLD satnogs-client[437]: retval = job.func(*job.args, **job.kwargs)
Jul 16 16:36:40 SatGOLD satnogs-client[437]: File "/var/lib/satnogs/lib/python3.7/site-packages/sa
Jul 16 16:36:40 SatGOLD satnogs-client[437]: response.raise_for_status()
Jul 16 16:36:40 SatGOLD satnogs-client[437]: UnboundLocalError: local variable ‘response’ referenced

Many thanks in advance.

1 Like

This is something we see after every boot, after a reboot you can ignore this error.
When the system is running for a while this is an indication of network connection problems.

Ya, I noticed this now. When you first boot up, it tries to resolve network.satnogs.org before the network is up. Then it barfs on that, which I think is why we see the error in the forum. The user boots up, sees that error. Perhaps the systemd file can wait til net is fully up. (I think that’s what is going on.)

This /etc/systemd/system/satnogs-client.service change will solve boot error:

And the the line: After=network-online.target

[Unit]
Description=SatNOGS client
After=network-online.target

[Service]
EnvironmentFile=-/etc/default/satnogs-client
ExecStart=/var/lib/satnogs/bin/satnogs-client
Restart=on-failure
User=satnogs
Group=satnogs

[Install]
WantedBy=multi-user.target

This line is only removed after every sudo satnogs-setup and then apply execution.

2 Likes

Thanks guys.
No master network errors found, so I can hardly suspect it being an inherent network problem, and with it producing error logs at any time journalctl is run. Other apps using the network have found to be fine.
I think Jan’s suggestion is the way forward. I’ll try it later or tomorrow.
Thanks again.

Oh well. Good try, but didn’t make any difference.
I guess I’ll live with it, as it doesn’t appear to effect observations.
Thanks again.

For posterity two links:

  • The bug in satnogs-client of not handling network errors correctly is tracked in satnogs-client#427 and a fix is already available in the latest development version.
  • The suggestion of starting satnogs-client only after the network is “up” is tracked in satnogs-client-ansible#112 now.
1 Like

Thanks Fabian. Still get the errors when the network has been running a while.
I’ll live with it for now as observations are unaffected.

I think there’s two issues at play here. One is the boot up issue, which it looks like they are heading to fix.

I also see this error you see, ala:

UnboundLocalError: local variable 'response' referenced before assignment

As you point out, it isn’t fatal error, and the system continues. The real reason for this error, I think is a few lines up. Here’s an example from my Pi:

Jul 20 00:50:38 cruftpi1 satnogs-client[338]: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='network.satnogs.org', port=443): Max retries exceeded with url: /api/jobs/?ground_station=1152&lat=40.569&lon=-105.226&alt=1840 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xb4961390>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

I think in these errors, which appear even if the system has been running for days, come from either transient Internet connection issues, or load on the SatNOGs server, which times out.

In sum, you’ll probably get this error at least once each time you boot, plus on a system that runs for days will occassionally encounter network/server issues connecting to network.satnogs.org.

A more graceful error than just python barfing would perhaps lessen confusion.

1 Like

This is done by the fix mentioned above, yes.

1 Like

Hello,

after having trouble with my old installation, I’ve installed the image file from PE1SAT.
AirSpy HF+ is not supported, so I had to install those drivers manually.

Unfortunatly satnogs-setup gives still errors…

Install SatNOGS Flowgraphs…
Retrying… (1 of 4)
Retrying… (2 of 4)
Retrying… (3 of 4)
localhost failed | msg: ‘/usr/bin/apt-get -y -o “Dpkg::Options::=–force-confdef” -o “Dpkg::Options::=–force-confold” install ‘satnogs-flowgraphs=1.4-1’’ failed: E: Version ‘1.4-1’ for ‘satnogs-flowgraphs’ was not found
| stdout: Reading package lists…
Building dependency tree…
Reading state information…
| stderr: E: Version ‘1.4-1’ for ‘satnogs-flowgraphs’ was not found

If I enter manually, it complains that the file was not found.

pi@satnogs-vhf:~ $ sudo apt-get -y -o “Dpkg::Options::=–force-confdef” -o “Dpkg::Options::=–force-confold” install ‘satnogs-flowgraphs=1.4’
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen… Fertig
E: Version »1.4« für »satnogs-flowgraphs« konnte nicht gefunden werden.

I tried all the hints regarding above, but I’m not getting anywhere at the moment…

Generating support report. Please wait…
dpkg-query: Kein Paket gefunden, das auf satnogs-flowgraphs passt
dpkg-query: Kein Paket gefunden, das auf gr-satnogs passt
dpkg-query: Kein Paket gefunden, das auf gr-soapy passt
------------[ copy here ]------------
{
“versions”: {
“satnogs-client”: “1.6”,
“satnogs-client-ansible”: “202205101826”,
“satnogs-flowgraphs”: “unknown”,
“gr-satnogs”: “unknown”,
“gr-soapy”: “unknown”,
“gnuradio”: “3.8.2.0-2”,
“satnogs-config”: “0.12”
},

Any ideas?

73s Peter

It may be best to split this into a separate thread. I don’t think the two install issues are related.

If it can’t find that package for some reason, it isn’t reading the apt source for satnogs possibly. The installer should have a file like this:

 $ cat /etc/apt/sources.list.d/satnogs.list 
deb http://download.opensuse.org/repositories/home:/librespace:/satnogs/Raspbian_10 ./
deb-src http://download.opensuse.org/repositories/home:/librespace:/satnogs/Raspbian_10 ./

Also, you could run sudo apt update before the install to may sure it has the latest package list. If that doesn’t work, nothing past it will either. Good luck.

Hi Peter,

My first thought, “driver install” removed packages, can you share some details on the AirSPY HF+ install ?
I can remember from past events, that these installs also want to update dependencies and then things could go wrong.

And small note it is PE0SAT and not PE1SAT :wink:

1 Like

Yes, I run update etc… but didn’t help…

The installer seems to be missing the second line:

pi@satnogs-vhf:~ $ cat /etc/apt/sources.list.d/satnogs.list
deb Index of /repositories/home:/librespace:/satnogs/Raspbian_10 ./
pi@satnogs-vhf:~ $

Just to be sure, no Index

cat sources.list.d/satnogs.list 
deb http://download.opensuse.org/repositories/home:/librespace:/satnogs/Raspbian_10 ./
1 Like

Hi Jan,

indeed PE0SAT :slight_smile:

Yes, I was first installing the ‘airspyhf’ driver https://github.com/airspy/airspyhf/archive/master.zip, than GitHub - pothosware/SoapyAirspyHF: SoapySDR plugin to support the Airspy HF+
I also needed to install libsoapysdr-dev if I remember correctly…

1 Like

The deb-src line is just for the source package, you don’t need that, but it doesn’t hurt either.

1 Like

To re-iterate what @PE0SAT wrote about your satnogs.list. You wrote:

pi@satnogs-vhf:~ $ cat /etc/apt/sources.list.d/satnogs.list
deb Index of /repositories/home:/librespace:/satnogs/Raspbian_10 ./
pi@satnogs-vhf:~ $

Your line says deb Index, which it shouldn’t. It should be like @PE0SAT has above:

deb http://download.opensuse.org/repositories/home:/librespace:/satnogs/Raspbian_10 ./

If you do have Index in there and run apt update, it should give this error:

# apt update
E: Malformed entry 2 in list file /etc/apt/sources.list.d/satnogs.list (URI parse)
E: The list of sources could not be read.

Here is what I did on a Pi3b

git clone https://github.com/airspy/airspyhf.git

$ cd airspyhf/
$ mkdir build
$ cd build/
$ cmake ../ -DINSTALL_UDEV_RULES=ON
$ make
$ sudo make install
$ sudo ldconfig

$ sudo apt-get install libsoapysdr-dev
$ git clone https://github.com/pothosware/SoapyAirspyHF.git
$ cd SoapyAirspyHF/
$ mkdir build
$ cd build
$ cmake ../
$ make

$ SoapySDRUtil --info

$ sudo cp libairspyhfSupport.so /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/

######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Lib Version: v0.7.2-1
API Version: v0.7.1
ABI Version: v0.7
Install root: /usr
Search path:  /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7
Search path:  /usr/local/lib/arm-linux-gnueabihf/SoapySDR/modules0.7                 (missing)
Search path:  /usr/local/lib/SoapySDR/modules0.7                                     (missing)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libHackRFSupport.so   (0.3.3)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libLMS7Support.so     (20.01.0)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libRedPitaya.so       (0.1.1)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libairspySupport.so   (0.1.2)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libairspyhfSupport.so (0.2.0-d682533)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libaudioSupport.so    (0.1.1)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libbladeRFSupport.so  (0.4.1)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libosmosdrSupport.so  (0.2.5)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libremoteSupport.so   (0.5.2)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/librtlsdrSupport.so   (0.3.1)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libuhdSupport.so      (0.3.6)
Available factories... airspy, airspyhf, audio, bladerf, hackrf, lime, osmosdr, redpitaya, remote, rtlsdr, uhd

Now it shows the AirSPY HF+

SoapySDRUtil --probe="driver=airspyhf" should detect the SDR

1 Like

I have no clue where the “deb Index of…” came from…

Just re-run:

pi@satnogs-vhf:~ $ cat /etc/apt/sources.list.d/satnogs.list
deb Index of /repositories/home:/librespace:/satnogs/Raspbian_10 ./
pi@satnogs-vhf:~ $