spacepaste

  1.  
  2. pi@blackknight:~ $ cat /lib/systemd/system/door_database.service
  3. [Unit]
  4. Description=Door Database Reader
  5. After=multi-user.target
  6. [Service]
  7. Type=idle
  8. ExecStart=/usr/bin/python3 /home/pi/apribot.py
  9. WorkingDirectory=/home/pi
  10. [Install]
  11. WantedBy=multi-user.target
  12. pi@blackknight:~ $ cat /lib/systemd/system/door_rfid_reader.service
  13. [Unit]
  14. Description=Door RFID Reader
  15. After=multi-user.target
  16. [Service]
  17. Type=idle
  18. ExecStart=/usr/bin/python /home/pi/doorlock.py
  19. WorkingDirectory=/home/pi
  20. [Install]
  21. WantedBy=multi-user.target
  22. pi@blackknight:~ $
  23. pi@blackknight:~ $ journalctl -u door_database
  24. -- Logs begin at Thu 2016-11-03 17:16:43 UTC, end at Fri 2018-03-23 01:02:06 UTC. --
  25. Mar 23 01:00:08 blackknight systemd[1]: Started Door Database Reader.
  26. Mar 23 01:00:11 blackknight python3[491]: ########################### requesting member data ############################
  27. Mar 23 01:00:11 blackknight python3[491]: Traceback (most recent call last):
  28. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
  29. Mar 23 01:00:11 blackknight python3[491]: h.request(req.get_method(), req.selector, req.data, headers)
  30. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/http/client.py", line 1107, in request
  31. Mar 23 01:00:11 blackknight python3[491]: self._send_request(method, url, body, headers)
  32. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/http/client.py", line 1152, in _send_request
  33. Mar 23 01:00:11 blackknight python3[491]: self.endheaders(body)
  34. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/http/client.py", line 1103, in endheaders
  35. Mar 23 01:00:11 blackknight python3[491]: self._send_output(message_body)
  36. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
  37. Mar 23 01:00:11 blackknight python3[491]: self.send(msg)
  38. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/http/client.py", line 877, in send
  39. Mar 23 01:00:11 blackknight python3[491]: self.connect()
  40. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/http/client.py", line 1253, in connect
  41. Mar 23 01:00:11 blackknight python3[491]: super().connect()
  42. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/http/client.py", line 849, in connect
  43. Mar 23 01:00:11 blackknight python3[491]: (self.host,self.port), self.timeout, self.source_address)
  44. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/socket.py", line 694, in create_connection
  45. Mar 23 01:00:11 blackknight python3[491]: for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  46. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/socket.py", line 733, in getaddrinfo
  47. Mar 23 01:00:11 blackknight python3[491]: for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  48. Mar 23 01:00:11 blackknight python3[491]: socket.gaierror: [Errno -3] Temporary failure in name resolution
  49. Mar 23 01:00:11 blackknight python3[491]: During handling of the above exception, another exception occurred:
  50. Mar 23 01:00:11 blackknight python3[491]: Traceback (most recent call last):
  51. Mar 23 01:00:11 blackknight python3[491]: File "/home/pi/apribot.py", line 352, in <module>
  52. Mar 23 01:00:11 blackknight python3[491]: api.authenticate_with_contact_credentials("chadselish@gmail.com", "applehack!")
  53. Mar 23 01:00:11 blackknight python3[491]: File "/home/pi/apribot.py", line 79, in authenticate_with_contact_credentials
  54. Mar 23 01:00:11 blackknight python3[491]: response = urllib.request.urlopen(request)
  55. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
  56. Mar 23 01:00:11 blackknight python3[491]: return opener.open(url, data, timeout)
  57. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/urllib/request.py", line 466, in open
  58. Mar 23 01:00:11 blackknight python3[491]: response = self._open(req, data)
  59. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
  60. Mar 23 01:00:11 blackknight python3[491]: '_open', req)
  61. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
  62. Mar 23 01:00:11 blackknight python3[491]: result = func(*args)
  63. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/urllib/request.py", line 1297, in https_open
  64. Mar 23 01:00:11 blackknight python3[491]: context=self._context, check_hostname=self._check_hostname)
  65. Mar 23 01:00:11 blackknight python3[491]: File "/usr/lib/python3.5/urllib/request.py", line 1256, in do_open
  66. Mar 23 01:00:11 blackknight python3[491]: raise URLError(err)
  67. Mar 23 01:00:11 blackknight python3[491]: urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
  68. Mar 23 01:00:11 blackknight systemd[1]: door_database.service: Main process exited, code=exited, status=1/FAILURE
  69. Mar 23 01:00:11 blackknight systemd[1]: door_database.service: Unit entered failed state.
  70. Mar 23 01:00:11 blackknight systemd[1]: door_database.service: Failed with result 'exit-code'.
  71. Mar 23 01:01:56 blackknight systemd[1]: Started Door Database Reader.
  72.