Satnogs Raspberry Pi Image Installation

Hi Guys,

So Im trying to re-install with the Raspbian image and re-setup my Raspberry Pi per Raspberry Pi - SatNOGS Wiki

But I noticed when it’s going through the setup, I get a failure:

TASK [satnogs-client : Install satnogs-client] ***********************************************
fatal: [localhost]: FAILED! => {“changed”: false, “cmd”: “/var/lib/satnogs/bin/pip2 install satnogsclient==0.5”, “failed”: true, “msg”: “stdout: Collecting satnogsclient==0.5\n Using cached satnogsclient-0.5.tar.gz\nCollecting APScheduler (from satnogsclient==0.5)\n Using cached APScheduler-3.3.1-py2.py3-none-any.whl\nCollecting SQLAlchemy (from satnogsclient==0.5)\n Using cached SQLAlchemy-1.1.14.tar.gz\nCollecting requests (from satnogsclient==0.5)\n Using cached requests-2.18.4-py2.py3-none-any.whl\nCollecting validators (from satnogsclient==0.5)\n Using cached validators-0.12.0.tar.gz\nCollecting python-dateutil (from satnogsclient==0.5)\n Using cached python_dateutil-2.6.1-py2.py3-none-any.whl\nCollecting ephem (from satnogsclient==0.5)\n Using cached ephem-3.7.6.0.tar.gz\nCollecting pytz (from satnogsclient==0.5)\n Using cached pytz-2017.2-py2.py3-none-any.whl\nCollecting flask (from satnogsclient==0.5)\n Using cached Flask-0.12.2-py2.py3-none-any.whl\nCollecting pyopenssl (from satnogsclient==0.5)\n Using cached pyOpenSSL-17.3.0-py2.py3-none-any.whl\nCollecting pyserial (from satnogsclient==0.5)\n Using cached pyserial-3.4-py2.py3-none-any.whl\nCollecting flask-socketio (from satnogsclient==0.5)\n Using cached Flask-SocketIO-2.9.2.tar.gz\nCollecting redis (from satnogsclient==0.5)\n\n:stderr: Exception:\nTraceback (most recent call last):\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main\n status = self.run(options, args)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/commands/install.py", line 353, in run\n wb.build(autobuilding=True)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/wheel.py", line 749, in build\n self.requirement_set.prepare_files(self.finder)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files\n ignore_dependencies=self.ignore_dependencies))\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/req/req_set.py", line 554, in _prepare_file\n require_hashes\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/req/req_install.py", line 278, in populate_link\n self.link = finder.find_requirement(self, upgrade)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py", line 465, in find_requirement\n all_candidates = self.find_all_candidates(req.name)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py", line 423, in find_all_candidates\n for page in self._get_pages(url_locations, project_name):\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py", line 568, in _get_pages\n page = self._get_page(location)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py", line 683, in _get_page\n return HTMLPage.get_page(link, session=self.session)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py", line 792, in get_page\n "Cache-Control": "max-age=600",\n File "/var/lib/satnogs/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 501, in get\n return self.request(‘GET’, url, **kwargs)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/download.py", line 386, in request\n return super(PipSession, self).request(method, url, *args, **kwargs)\n File "/var/lib/satnogs/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 488, in request\n resp = self.send(prep, **send_kwargs)\n File "/var/lib/satnogs/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 609, in send\n r = adapter.send(request, **kwargs)\n File "/var/lib/satnogs/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 47, in send\n resp = super(CacheControlAdapter, self).send(request, **kw)\n File "/var/lib/satnogs/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/adapters.py", line 423, in send\n timeout=timeout\n File "/var/lib/satnogs/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 643, in urlopen\n _stacktrace=sys.exc_info()[2])\n File "/var/lib/satnogs/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 315, in increment\n total -= 1\nTypeError: unsupported operand type(s) for -=: ‘Retry’ and ‘int’\n”}
to retry, use: --limit @/root/.ansible/pull/SATNOGS_ANTBEAR_COMPOUND/local.retry

Thoughts?

I ran into this today while testing and working on docs. I’ve poked @Acinonyx and he’s going to take a look.

I cannot reproduce it. Any hints? Btw, does the RPi have internet connectivity?

Yep, I set up the wireless through command line and can successfully ssh into it

Could it be possible that the RPi is accessible in LAN but not having access to the internet? Try pinging 8.8.8.8.

I can recreate it using a fresh image from tag 2017092900… :confused:

Something is timing out here for you and I…

Try this as a workaround (not a permanent solution to the problem for anyone else following along):

sudo /var/lib/satnogs/bin/pip2 install satnogsclient==0.5
sudo chown -R satnogs /var/lib/satnogs/lib/python2.7/site-packages/satnogsclient*
sudo satnogs-setup

Thanks! I’m giving it a try now, I’ll report back :slight_smile:

I think it went through…? I tried to check the journal logs and had nothing that looked liked errors. But When I try to run satnogs-client, it says it cant find the command.

I think the problem is that installed version of ‘urllib’ fails to retry after a network connection timeout. Can you open an issue in GitLab?

I can still open up something with them, but re-reading the documentation, I went to my Raspberry Pi’s local host page
(xxx.xxx.xxx.xxx:5000) and I was able to load up the on-board webserver successfully.

did this mean it started the service successfully…? also I think I found a bug in the network-dev site :slight_smile: LOL I’ll save that for another post.

Sounds like the client itself is working, but it does not appear to be checking in to the network. Are you sure you have the API key, station ID, and url set right? (url should be https://network-dev.satnogs.org/api/ )

Good idea, But when I go onto the network-dev site, and try to view my profile I get a 500 error :frowning:

I’m making another station, just on the dev side to try out the new RPi images, before upgrading the 2 production stations.

Installing tag 2017092900

sudo satnogs-setup

Got a similar error as above:

TASK [satnogs-client : Install satnogs-client] **************************************
fatal: [localhost]: FAILED! => {“changed”: false, “cmd”: “/var/lib/satnogs/bin/pip2 install satnogsclient==0.5”, “failed”: true, “msg”: “stdout: Collecting satnogsclient==0.5\n Downloading satnogsclient-0.5.tar.gz (441kB)\nCollecting APScheduler (from satnogsclient==0.5)\n Downloading APScheduler-3.3.1-py2.py3-none-any.whl (56kB)\nCollecting SQLAlchemy (from satnogsclient==0.5)\n Downloading SQLAlchemy-1.1.14.tar.gz (5.2MB)\nCollecting requests (from satnogsclient==0.5)\n Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)\nCollecting validators (from satnogsclient==0.5)\n Downloading validators-0.12.0.tar.gz\nCollecting python-dateutil (from satnogsclient==0.5)\n Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)\nCollecting ephem (from satnogsclient==0.5)\n Downloading ephem-3.7.6.0.tar.gz (739kB)\nCollecting pytz (from satnogsclient==0.5)\n Downloading pytz-2017.2-py2.py3-none-any.whl (484kB)\nCollecting flask (from satnogsclient==0.5)\n Downloading Flask-0.12.2-py2.py3-none-any.whl (83kB)\nCollecting pyopenssl (from satnogsclient==0.5)\n Downloading pyOpenSSL-17.3.0-py2.py3-none-any.whl (51kB)\nCollecting pyserial (from satnogsclient==0.5)\n Downloading pyserial-3.4-py2.py3-none-any.whl (193kB)\nCollecting flask-socketio (from satnogsclient==0.5)\n Downloading Flask-SocketIO-2.9.2.tar.gz\nCollecting redis (from satnogsclient==0.5)\n Downloading redis-2.10.6-py2.py3-none-any.whl (64kB)\nCollecting funcsigs; python_version == "2.7" (from APScheduler->satnogsclient==0.5)\n Downloading funcsigs-1.0.2-py2.py3-none-any.whl\nCollecting tzlocal>=1.2 (from APScheduler->satnogsclient==0.5)\n Downloading tzlocal-1.4.tar.gz\nRequirement already satisfied: setuptools>=0.7 in /var/lib/satnogs/lib/python2.7/site-packages (from APScheduler->satnogsclient==0.5)\nCollecting six>=1.4.0 (from APScheduler->satnogsclient==0.5)\n Downloading six-1.11.0-py2.py3-none-any.whl\nCollecting futures; python_version == "2.7" (from APScheduler->satnogsclient==0.5)\n Downloading futures-3.1.1-py2-none-any.whl\nCollecting urllib3<1.23,>=1.21.1 (from requests->satnogsclient==0.5)\n Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)\nCollecting idna<2.7,>=2.5 (from requests->satnogsclient==0.5)\n Downloading idna-2.6-py2.py3-none-any.whl (56kB)\nCollecting chardet<3.1.0,>=3.0.2 (from requests->satnogsclient==0.5)\n Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)\nCollecting certifi>=2017.4.17 (from requests->satnogsclient==0.5)\n Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB)\nCollecting decorator>=3.4.0 (from validators->satnogsclient==0.5)\n Downloading decorator-4.1.2-py2.py3-none-any.whl\nCollecting itsdangerous>=0.21 (from flask->satnogsclient==0.5)\n Downloading itsdangerous-0.24.tar.gz (46kB)\nCollecting click>=2.0 (from flask->satnogsclient==0.5)\n Downloading click-6.7-py2.py3-none-any.whl (71kB)\nCollecting Werkzeug>=0.7 (from flask->satnogsclient==0.5)\n Downloading Werkzeug-0.12.2-py2.py3-none-any.whl (312kB)\nCollecting Jinja2>=2.4 (from flask->satnogsclient==0.5)\n Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)\nCollecting cryptography>=1.9 (from pyopenssl->satnogsclient==0.5)\n\n:stderr: Exception:\nTraceback (most recent call last):\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main\n status = self.run(options, args)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/commands/install.py", line 353, in run\n wb.build(autobuilding=True)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/wheel.py", line 749, in build\n self.requirement_set.prepare_files(self.finder)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files\n ignore_dependencies=self.ignore_dependencies))\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/req/req_set.py", line 554, in _prepare_file\n require_hashes\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/req/req_install.py", line 278, in populate_link\n self.link = finder.find_requirement(self, upgrade)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py", line 465, in find_requirement\n all_candidates = self.find_all_candidates(req.name)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py", line 423, in find_all_candidates\n for page in self._get_pages(url_locations, project_name):\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py", line 568, in _get_pages\n page = self._get_page(location)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py", line 683, in _get_page\n return HTMLPage.get_page(link, session=self.session)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py", line 792, in get_page\n "Cache-Control": "max-age=600",\n File "/var/lib/satnogs/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 501, in get\n return self.request(‘GET’, url, **kwargs)\n File "/var/lib/satnogs/local/lib/python2.7/site-packages/pip/download.py", line 386, in request\n return super(PipSession, self).request(method, url, *args, **kwargs)\n File "/var/lib/satnogs/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 488, in request\n resp = self.send(prep, **send_kwargs)\n File "/var/lib/satnogs/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 609, in send\n r = adapter.send(request, **kwargs)\n File "/var/lib/satnogs/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 47, in send\n resp = super(CacheControlAdapter, self).send(request, **kw)\n File "/var/lib/satnogs/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/adapters.py", line 423, in send\n timeout=timeout\n File "/var/lib/satnogs/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 643, in urlopen\n _stacktrace=sys.exc_info()[2])\n File "/var/lib/satnogs/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 315, in increment\n total -= 1\nTypeError: unsupported operand type(s) for -=: ‘Retry’ and ‘int’\n”}

RUNNING HANDLER [satnogs-client : Restart satnogs-client service] *******************
to retry, use: --limit @/root/.ansible/pull/satnogs-wxr/local.retry

PLAY RECAP **************************************************************************
localhost : ok=20 changed=3 unreachable=0 failed=1

sudo ping 8.8.8.8 is ok
Tried the workaround but crashed during “sudo /var/lib/satnogs/bin/pip2 install satnogsclient==0.5”

Collecting satnogsclient==0.5
Downloading satnogsclient-0.5.tar.gz (441kB)
100% |████████████████████████████████| 450kB 293kB/s
Collecting APScheduler (from satnogsclient==0.5)
Downloading APScheduler-3.3.1-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 863kB/s
Collecting SQLAlchemy (from satnogsclient==0.5)
Downloading SQLAlchemy-1.1.14.tar.gz (5.2MB)
100% |████████████████████████████████| 5.2MB 31kB/s
Collecting requests (from satnogsclient==0.5)
Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
100% |████████████████████████████████| 92kB 782kB/s
Collecting validators (from satnogsclient==0.5)
Downloading validators-0.12.0.tar.gz
Collecting python-dateutil (from satnogsclient==0.5)
Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
100% |████████████████████████████████| 194kB 525kB/s
Collecting ephem (from satnogsclient==0.5)
Downloading ephem-3.7.6.0.tar.gz (739kB)
100% |████████████████████████████████| 747kB 198kB/s
Collecting pytz (from satnogsclient==0.5)
Downloading pytz-2017.2-py2.py3-none-any.whl (484kB)
100% |████████████████████████████████| 491kB 323kB/s
Collecting flask (from satnogsclient==0.5)
Downloading Flask-0.12.2-py2.py3-none-any.whl (83kB)
100% |████████████████████████████████| 92kB 834kB/s
Collecting pyopenssl (from satnogsclient==0.5)
Downloading pyOpenSSL-17.3.0-py2.py3-none-any.whl (51kB)
100% |████████████████████████████████| 51kB 767kB/s
Collecting pyserial (from satnogsclient==0.5)
Downloading pyserial-3.4-py2.py3-none-any.whl (193kB)
100% |████████████████████████████████| 194kB 541kB/s
Collecting flask-socketio (from satnogsclient==0.5)
Downloading Flask-SocketIO-2.9.2.tar.gz
Collecting redis (from satnogsclient==0.5)
Exception:
Traceback (most recent call last):
File “/var/lib/satnogs/local/lib/python2.7/site-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/var/lib/satnogs/local/lib/python2.7/site-packages/pip/commands/install.py”, line 353, in run
wb.build(autobuilding=True)
File “/var/lib/satnogs/local/lib/python2.7/site-packages/pip/wheel.py”, line 749, in build
self.requirement_set.prepare_files(self.finder)
File “/var/lib/satnogs/local/lib/python2.7/site-packages/pip/req/req_set.py”, line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File “/var/lib/satnogs/local/lib/python2.7/site-packages/pip/req/req_set.py”, line 554, in _prepare_file
require_hashes
File “/var/lib/satnogs/local/lib/python2.7/site-packages/pip/req/req_install.py”, line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File “/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py”, line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File “/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py”, line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File “/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py”, line 568, in _get_pages
page = self._get_page(location)
File “/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py”, line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File “/var/lib/satnogs/local/lib/python2.7/site-packages/pip/index.py”, line 792, in get_page
“Cache-Control”: “max-age=600”,
File “/var/lib/satnogs/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py”, line 501, in get
return self.request(‘GET’, url, **kwargs)
File “/var/lib/satnogs/local/lib/python2.7/site-packages/pip/download.py”, line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File “/var/lib/satnogs/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py”, line 488, in request
resp = self.send(prep, **send_kwargs)
File “/var/lib/satnogs/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py”, line 609, in send
r = adapter.send(request, **kwargs)
File “/var/lib/satnogs/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py”, line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File “/var/lib/satnogs/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/adapters.py”, line 423, in send
timeout=timeout
File “/var/lib/satnogs/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 643, in urlopen
_stacktrace=sys.exc_info()[2])
File “/var/lib/satnogs/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py”, line 315, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: ‘Retry’ and ‘int’

Where to go from here ???

You’ve found a bug! Its been filed here: Exception: NoReverseMatch for station_view (#408) · Issues · librespacefoundation / SatNOGS / satnogs-network · GitLab

Meanwhile I’ll PM you your API key

I’m wondering if my failures are due to an RPi 2, not 3??

Interestingly I’m trying 20170910 image now on RPi 2
Same failure as with 20170929 :frowning:
This time using the “work around” completed with no errors. Let’s see if it’ll collect and process…