Closed vosdev closed 5 years ago
I encountered the same error. In the pykms_Server.py simply replace everything in the
if __name__=="__main__":
block with srv_main_without_gui()
.
The isatty function sometimes doesn't seem to detect it properly(my issue was when running it as a systemd service).
Created this service:
Description=py-kms
After=network.target
Wants=network-online.target
[Service]
ExecStart=/usr/bin/python3 -u path/to/py-kms/pykms_Server.py
Restart=always
KillMode=process
Type=simple
User=nobody
Group=nogroup
[Install]
WantedBy=multi-user.target
Reproduced the error and adjusted with a try-except.
Another error met during debug is:
IOError: [Errno 13] Permission denied: 'path/to/py-kms/pykms_logserver.log
So if you get this, remember to grant permission with:
sudo chmod 777 path/to/py-kms/pykms_logserver.log
.
Finally:
journalctl -b -u py-kms.service -o cat
and i can now see that all works.
Note:
I have to put -u
option to see systemd messages output though
print statements are flushed. I don't know why. Mystery.
after building
py-kms/docker-py3-kms
I am left with this error.Modification to start.sh:
modifications made to the Dockerfile that still need a pull request/fix:
(These changes are in PR #33)