[solved]linuxncrsh ---- reconnect after shutdown

More
24 Apr 2016 09:58 - 05 May 2016 17:49 #73790 by bkt
After shutdown command, i try to reconnect with linuxcncrsh .... without succes ...... for realize these i MUST SHUTDOWN THE PC AND RESTART...... is normal these? .... I use static Ip conf in local with switch ethernet ..... No ip modification I set ufw allow on 5007 and ssh get Ok connection (on pc port 22, but when connetc lcn to 5007 I'm unable to connect) over the same ip address.

Lcnc after shutdown is still running ......

Regards
Giorgio
Last edit: 05 May 2016 17:49 by bkt.

Please Log in or Create an account to join the conversation.

More
29 Apr 2016 15:25 #74060 by dgarrett
Repeating reply posted on user list to make it available on this forum

This is probably not a joints_axes-specific problem.

It seems you have a startup mechanism for linuxcnc on the host (maybe
rc.local? you didn't specify) that works at power-up.

Whatever mechanism you use to start could be scripted to start
remotely.

Example (joints_axes13, run-in-place):

#-------------------------------------------------------
#Terminal_1
# cat the startup script:

$ ssh lhost cat /home/git/linuxcnc-dev/lstartup.sh 
#!/bin/bash
# RIP (Run-In-Place) example

LHOME=/home/git/linuxcnc-dev           # my git directory
INI=~/linuxcnc/configs/ltest/ltest.ini # linuxcncrsh ini

cd $LHOME
source scripts/rip-environment

echo "Starting linuxcnc with $INI"
linuxcnc $INI
echo "Finished linuxcnc with $INI"

# run the startup script
$ ssh lhost /home/git/linuxcnc-dev/lstartup.sh
Starting linuxcnc with /home/dgarrett/linuxcnc/configs/ltest/ltest.ini

#-------------------------------------------------------
#Terminal_2
$ telnet lhost 5007
Trying 192.168.0.41...
Connected to u41.
Escape character is '^]'.
hello EMC me 1
HELLO ACK EMCNETSVR 1.1
set enable EMCTOO 
set enable EMCTOO
get enable
get enable
ENABLE ON
shutdown
shutdown
Connection closed by foreign host.

#Terminal_1
Finished linuxcnc with /home/dgarrett/linuxcnc/configs/ltest/ltest.ini
$ 
$ ssh lhost /home/git/linuxcnc-dev/lstartup.sh
Starting linuxcnc with /home/dgarrett/linuxcnc/configs/ltest/ltest.ini

#-------------------------------------------------------
#Terminal_2
$ telnet lhost 5007
Trying 192.168.0.41...
Connected to u41.
Escape character is '^]'.
hello EMC me 1
HELLO ACK EMCNETSVR 1.1
set enable EMCTOO
set enable EMCTOO
get enable
get enable
ENABLE ON
#-------------------------------------------------------
Notes:
1) In the example, ssh has been configured for
automatic login
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

More
04 May 2016 17:09 #74238 by bkt
when I see these reply .... I see the light ... I use Qprocess and I think the process is stil running after shutdown of my app.

Regards
Giorgio

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum