gut-space / svarog

📡 A ground stations network for receiving satellite transmissions, using VHF, UHF, and more.
MIT License
9 stars 0 forks source link

Unable to upload observation #69

Closed tomaszmrugalski closed 2 years ago

tomaszmrugalski commented 2 years ago

I'm trying to upload an observation: python3 submitobs.py ~/radio/data/noaa-18.png "NOAA 18" "2021-11-27 21:35:00" "2021-11-27 21:37:00" "2021-11-27 21:39:00" '{ "antenna": "3D corner", "antenna-type": "corner", "receiver": "RTL-SDR v3", "lna": "none", "filter": "none", "frequency": 137912500 }'

This results in the following error:

DEBUG 2021-12-23 00:04:07,295 - searching a TLE for NOAA 18, date: 2021-12-22 23:04:07.295715
DEBUG 2021-12-23 00:04:07,295 - searching a TLE for NOAA 18, date: 2021-11-27 21:35:00
DEBUG 2021-12-23 00:04:07,299 - Meta-data = { "antenna": "3D corner", "antenna-type": "corner", "receiver": "RTL-SDR v3", "lna": "none", "filter": "none", "frequency": 137912500 }
INFO 2021-12-23 00:04:07,299 - Submitting observation, url=https://svarog.space/receive, file(s)=['/home/thomson/radio/data/noaa-18.png']
DEBUG 2021-12-23 00:04:07,303 - Starting new HTTPS connection (1): svarog.space:443
DEBUG 2021-12-23 00:04:09,024 - https://svarog.space:443 "POST /receive HTTP/1.1" 413 183
WARNING 2021-12-23 00:04:09,024 - Response status: 413
INFO 2021-12-23 00:04:09,025 - Submission details: headers: Authorization, form: aos,tca,los,sat,rating,config,tle
DEBUG 2021-12-23 00:04:09,025 - headers={'Authorization': 'HMAC-SHA256 5,2021-12-22T23:04:07,58ef972c8f6bc1af40a6c0e149ac3e90f05e9ab8d39ca166d14a77b5617b3340'}
DEBUG 2021-12-23 00:04:09,025 - form={'aos': '2021-11-27T21:35:00', 'tca': '2021-11-27T21:37:00', 'los': '2021-11-27T21:39:00', 'sat': 'NOAA 18', 'rating': None, 'config': '{ "antenna": "3D corner", "antenna-type": "corner", "receiver": "RTL-SDR v3", "lna": "none", "filter": "none", "frequency": 137912500 }', 'tle': ('1 28654U 05018A   21356.56718912  .00000138  00000+0  98649-4 0  9996', '2 28654  98.9729  61.9735 0015182 110.7552 249.5248 14.12669252855000')}
DEBUG 2021-12-23 00:04:09,025 - Response details: <html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx/1.18.0</center>
</body>
</html>

ERROR 2021-12-23 00:04:09,025 - Upload result: Upload failed, status code 413
tomaszmrugalski commented 2 years ago

I found this in the nginx-error.log file:

2021/12/23 00:49:21 [error] 350833#350833: *1 client intended to send too large body: 1859243 bytes, client: 2001:470:X:Y:Z:W, server: svarog.space, request: "POST /receive HTTP/1.1", host: "svarog.space"

Maybe there's something wrong with the submitobs.py script?

tomaszmrugalski commented 2 years ago

This was solved as nginx misconfiguration. I needed to add: client_max_body_size 5M; to the nginx configuration. Will update the docs later.