This topic exists and there is no solution?
Dec 10 16:30:46 tinypilot1 systemd[1]: Started TinyPilot - RPi-based virtual KVM.
Dec 10 16:30:47 tinypilot1 python[976]: [2021-12-10 16:30:47,453] INFO in main: Starting app
Dec 10 16:30:47 tinypilot1 python[976]: Traceback (most recent call last):
Dec 10 16:30:47 tinypilot1 python[976]: File "app/main.py", line 46, in
Dec 10 16:30:47 tinypilot1 python[976]: SECRET_KEY=secret_key.get_or_create(),
Dec 10 16:30:47 tinypilot1 python[976]: File "/opt/tinypilot/app/secret_key.py", line 101, in get_or_create
Dec 10 16:30:47 tinypilot1 python[976]: return _get()
Dec 10 16:30:47 tinypilot1 python[976]: File "/opt/tinypilot/app/secret_key.py", line 54, in _get
Dec 10 16:30:47 tinypilot1 python[976]: 'The secret key file must have a file permission of 600.')
Dec 10 16:30:47 tinypilot1 python[976]: secret_key.InvalidSecretKeyError: The secret key file must have a file permission of 600.
Dec 10 16:30:47 tinypilot1 systemd[1]: tinypilot.service: Main process exited, code=exited, status=1/FAILURE
Dec 10 16:30:47 tinypilot1 systemd[1]: tinypilot.service: Failed with result 'exit-code'.
Dec 10 16:30:47 tinypilot1 systemd[1]: tinypilot.service: Service RestartSec=100ms expired, scheduling restart.
Dec 10 16:30:47 tinypilot1 systemd[1]: tinypilot.service: Scheduled restart job, restart counter is at 182.
Dec 10 16:30:47 tinypilot1 systemd[1]: Stopped TinyPilot - RPi-based virtual KVM.
Dec 10 16:30:47 tinypilot1 systemd[1]: Started TinyPilot - RPi-based virtual KVM.
Dec 10 16:30:48 tinypilot1 python[977]: [2021-12-10 16:30:48,762] INFO in main: Starting app
Dec 10 16:30:48 tinypilot1 python[977]: Traceback (most recent call last):
Dec 10 16:30:48 tinypilot1 python[977]: File "app/main.py", line 46, in
Dec 10 16:30:48 tinypilot1 python[977]: SECRET_KEY=secret_key.get_or_create(),
Dec 10 16:30:48 tinypilot1 python[977]: File "/opt/tinypilot/app/secret_key.py", line 101, in get_or_create
Dec 10 16:30:48 tinypilot1 python[977]: return _get()
Dec 10 16:30:48 tinypilot1 python[977]: File "/opt/tinypilot/app/secret_key.py", line 54, in _get
Dec 10 16:30:48 tinypilot1 python[977]: 'The secret key file must have a file permission of 600.')
Dec 10 16:30:48 tinypilot1 python[977]: secret_key.InvalidSecretKeyError: The secret key file must have a file permission of 600.
Dec 10 16:30:48 tinypilot1 systemd[1]: tinypilot.service: Main process exited, code=exited, status=1/FAILURE
Dec 10 16:30:48 tinypilot1 systemd[1]: tinypilot.service: Failed with result 'exit-code'.
Dec 10 16:30:49 tinypilot1 systemd[1]: tinypilot.service: Service RestartSec=100ms expired, scheduling restart.
Dec 10 16:30:49 tinypilot1 systemd[1]: tinypilot.service: Scheduled restart job, restart counter is at 183.
Dec 10 16:30:49 tinypilot1 systemd[1]: Stopped TinyPilot - RPi-based virtual KVM.
- Michael Lynch @michael2021-12-10 16:52:14.196Z
Thanks for reporting this?
It looks like the web server is refusing to start because the permissions are incorrect on
/home/tinypilot/.flask-secret-key
Do you know of anything that would have changed the permissions?
You should be able to fix this by running:
sudo chmod 600 /home/tinypilot/.flask-secret-key
- DIn reply toderdast⬆:@derdast
root@tinypilot1:~# ls -al /home/tinypilot/.flask-secret-key
-rw-r--r-- 1 root root 1666 Mar 25 2021 /home/tinypilot/.flask-secret-key
root@tinypilot1:~# chmod 600 /home/tinypilot/.flask-secret-key
root@tinypilot1:~# ls -al /home/tinypilot/.flask-secret-key
-rw------- 1 root root 1666 Mar 25 2021 /home/tinypilot/.flask-secret-key
root@tinypilot1:~# - DIn reply toderdast⬆:@derdast
Dec 10 17:00:18 tinypilot1 python[847]: [2021-12-10 17:00:18,692] INFO in main: Starting app
Dec 10 17:00:18 tinypilot1 python[847]: [2021-12-10 17:00:18,695] INFO in secret_key: Creating new flask secret key at /home/tinypilot/.flas
k-secret-key
Dec 10 17:00:18 tinypilot1 python[847]: Traceback (most recent call last):
Dec 10 17:00:18 tinypilot1 python[847]: File "/opt/tinypilot/app/secret_key.py", line 101, in get_or_create
Dec 10 17:00:18 tinypilot1 python[847]: return _get()
Dec 10 17:00:18 tinypilot1 python[847]: File "/opt/tinypilot/app/secret_key.py", line 50, in _get
Dec 10 17:00:18 tinypilot1 python[847]: with open(_SECRET_KEY_FILE, 'rb') as key_file:
Dec 10 17:00:18 tinypilot1 python[847]: PermissionError: [Errno 13] Permission denied: '/home/tinypilot/.flask-secret-key'
Dec 10 17:00:18 tinypilot1 python[847]: During handling of the above exception, another exception occurred:
Dec 10 17:00:18 tinypilot1 python[847]: Traceback (most recent call last):
Dec 10 17:00:18 tinypilot1 python[847]: File "app/main.py", line 46, in
Dec 10 17:00:18 tinypilot1 python[847]: SECRET_KEY=secret_key.get_or_create(),
Dec 10 17:00:18 tinypilot1 python[847]: File "/opt/tinypilot/app/secret_key.py", line 103, in get_or_create
Dec 10 17:00:18 tinypilot1 python[847]: return _create()
Dec 10 17:00:18 tinypilot1 python[847]: File "/opt/tinypilot/app/secret_key.py", line 75, in _create
Dec 10 17:00:18 tinypilot1 python[847]: with open(_SECRET_KEY_FILE, 'wb') as key_file:
Dec 10 17:00:18 tinypilot1 python[847]: PermissionError: [Errno 13] Permission denied: '/home/tinypilot/.flask-secret-key' - In reply toderdast⬆:Michael Lynch @michael2021-12-10 17:17:41.825Z
Hmm, not sure how it got out of whack like that. You can just remove it and let Flask recreate the file:
sudo rm /home/tinypilot/.flask-secret-key
- DIn reply toderdast⬆:@derdast
Unfortunately it seems dead now
I did a reboot from the command and it does not come up again
I already ask for download of an SD Image
I bought the tinypilot from https://www.kvm-ip.de/- Michael Lynch @michael2021-12-10 18:59:12.599Z
Okay, got your email. We'll email you the new image. Sorry for the inconvenience. I'm not sure how the update mangled those permissions.