Open kefeimo opened 1 year ago
Perhaps add a start-volttron command or volttron-start command that does the following
import os
os.spawnl(os.P_DETACH, 'some_long_running_command')
where the long running command is volttron -vv -l volttron.log ( I am not sure you need the dev/null, but may I am not 100% sure.
@kefeimo is step 4 done before you shutdown the platform? If so that would error out and the process would continue to block which is what you are seeing.
It seems we should be able to detect this.
Yes. Step 4 is done before shutdown the platform. And yes, it was "able to detect this". But the point is merely detecting is not enough--as the following screenshot suggested a user will lose linkage to the volttron-instance
Recap:
running volttron platform and view the volttron.log, then stop viewing
run volttron -vv
command again to trigger the error
observed the detection "Attempted to bind Volttron to already bound address ipc://@/home/kefei/.volttron/run/vip.socket, stopping"
vctl
command not working any more
the volttron process is still running (inspect by ps aux
)
Agreed just wanting clarification.
need the dev/null,
I don't think "need the dev/null," is needed but it is in the README
The dev/null is for long running through ssh connections. the stderror gets corrupted and your platform won't be able to respond if you leave your ssh session and come back from a different ssh session.
At least that is what it is there for from volttron 4.
Describe the bug For volttron 10.0.3a2, to start the instance one needs to use
volttron -vv -l volttron.log &>/dev/null &
.To Reproduce Steps to reproduce the behavior:
source env/bin/activate
volttron -vv -l volttron.log &>/dev/null &
vctl status
(working this time)volttron -vv -l volttron.log &>/dev/null &
vctl status
(NOT working this time) A walkaround is to kill the original processps aux | grep volttron
kill -9 <volttron-procss-id>
Expected behavior Expect the platform is robust enough to handle running "volttron-start-like" command more than once but only point to the identical instance
Screenshots![image](https://user-images.githubusercontent.com/28743873/214894182-5b28c495-80a3-4648-8090-6f61ecd517c0.png)
Additional info The
volttron -vv -l volttron.log &>/dev/null &
can be wrapped with a more user-interface-like command. The current one is very bash-like.