Semi-ATE / spyder-remote

Plugin for spyder (>=5) that adds remote capabilities to spyder.
https://semi-ate.github.io/spyder-remote/
MIT License
4 stars 4 forks source link

spyder-remote-server (restart) problem #18

Open nerohmot opened 4 years ago

nerohmot commented 4 years ago
(SCT8) sct@MiniSCT-1:~$ conda deactivate
(base) sct@MiniSCT-1:~$ spyder-remote-server start
(base) sct@MiniSCT-1:~$ Before daemonization
Unable to acquire PID file.

(base) sct@MiniSCT-1:~$ 

also as root this doesn't work ...

(base) root@MiniSCT-1:/home/sct# spyder-remote-server start
(base) root@MiniSCT-1:/home/sct# Before daemonization
Unable to acquire PID file.

(base) root@MiniSCT-1:/home/sct# 

Yesterday we installed and ran it for the first time, so there was no "old" PID file, now there apparently IS, and he is choking on it ... maybe a permission problem ? In any case, I presume that spyder-remote-server start should be run as root (systemd is as root after all) right ?

nerohmot commented 4 years ago

Ok, so the PID file is located in /home/conda/forge/lib/python3.8/site-packages/spyder_remote_server and the permissions are:

-rw-rw-r--  1 sct  sct       5 Oct 26 17:52 daemon.pid

both the root and the sct user should be able to delete it ... is is not a permission problem ... maybe we interpret wrongly how this file is to be used ...

I deleted it by hand, and then the daemon is starting nicely :+1:

(base) root@MiniSCT-1:/home/conda/forge/lib/python3.8/site-packages/spyder_remote_server# ls -la
total 80
drwxrwxr-x  5 sct  sct    4096 Oct 26 17:52 .
drwxrwx--- 61 root conda  4096 Oct 26 17:19 ..
-rw-rw-r--  1 sct  sct      97 Oct 26 17:17 __init__.py
drwxrwxr-x  2 sct  sct    4096 Oct 26 17:17 __pycache__
-rw-rw-r--  1 sct  sct     832 Oct 26 17:17 api.py
-rw-rw-r--  1 sct  sct    2273 Oct 26 17:17 cli.py
-rw-rw-r--  1 sct  sct   10021 Oct 26 17:17 conda_api.py
-rw-rw-r--  1 sct  sct    5985 Oct 26 17:17 config.py
-rw-rw-r--  1 sct  sct     401 Oct 26 17:17 constants.py
-rw-rw-r--  1 sct  sct       5 Oct 26 17:52 daemon.pid
-rw-rw-r--  1 sct  sct    1778 Oct 26 17:17 daemon.py
drwxrwxr-x  2 sct  sct    4096 Oct 26 17:17 scripts
-rw-rw-r--  1 sct  sct   11913 Oct 26 17:17 server.py
drwxrwxr-x  3 sct  sct    4096 Oct 26 17:17 templates
-rw-rw-r--  1 sct  sct    3596 Oct 26 17:17 utils.py
(base) root@MiniSCT-1:/home/conda/forge/lib/python3.8/site-packages/spyder_remote_server# rm daemon.pid 
(base) root@MiniSCT-1:/home/conda/forge/lib/python3.8/site-packages/spyder_remote_server# exit
exit
(base) sct@MiniSCT-1:~/.conda$ spyder-remote-server start
(base) sct@MiniSCT-1:~/.conda$ Before daemonization
Parent yei!

(base) sct@MiniSCT-1:~/.conda$
goanpeca commented 4 years ago

nerohmot

I guess the daemon ended "unexpectedely" and this happened, I can in the meantime add the deletion of PID files to the stop command, so at least it allows to clean.

When I update to use systemd, this daemoniker pth might not be needed anyway.

Will look into this.